ucenter-创始人密码加密方式

 

文件:\uc_server\control\admin\admin.php

 

$configfile = UC_ROOT.'./data/config.inc.php';

$config = file_get_contents($configfile);
      $salt = substr(uniqid(rand()), 0, 6);
      $md5newpw = md5(md5($newpw).$salt);
      $config = preg_replace("/define\('UC_FOUNDERSALT',\s*'.*?'\);/i", "define('UC_FOUNDERSALT', '$salt');", $config);
      $config = preg_replace("/define\('UC_FOUNDERPW',\s*'.*?'\);/i", "define('UC_FOUNDERPW', '$md5newpw');", $config);
      $fp = @fopen($configfile, 'w');
      @fwrite($fp, $config);
      @fclose($fp);

你可能感兴趣的:(职场,密码,休闲,ucenter,创始人)