您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

php vbs加密复原

2024/10/29 15:52:24发布24次查看
php vbs加密还原
js加密还原
原过程
var pwd = theform.password.value;var rndnum = 394058;rndnum = rndnum.tostring();var curpos = 0;var tmpstr,encryptstr = ;for(cnt=0;cnt 用php还原$pwd = ;$rndnum = 394058;$curpos = 0;$tmpstr = ;$encryptstr = ;for($cnt=0;$cnt<strlen($pwd);$cnt++) { if($cnt % strlen($rndnum) == 0 ) $curpos = 0; $tmpstr = substr($pwd,$cnt,1); $encryptstr = $encryptstr. fromcharcode(charcodeat($tmpstr) - $cnt - substr($rndnum,$curpos,1)); $curpos +=1; }echo $encryptstr;echo ''<br>'';echo $rndnum;echo ''<br>'';echo encryptstring($encryptstr);function fromcharcode($codes) { if (is_scalar($codes)) $codes= func_get_args(); $str= ''''; foreach ($codes as $code) $str.= chr($code); return $str;}function charcodeat($word) { if (is_array($word)) $arr = $word; else $arr = str_split($word); $bin_str = ''''; foreach ($arr as $value) $bin_str .= decbin(ord($value)); $bin_str = preg_replace(''/^.{4}(.{4}).{2}(.{6}).{2}(.{6})$/'',''$1$2$3'', $bin_str); return bindec($bin_str);}
vbs加密还原
原函数function encryptstring(inputtext , thepassword )''用户口令加密 dim il_bit, il_x, il_y, il_z, il_len, i dim is_out password = inputtext il_len = len(password) il_x = 0 il_y = 0 is_out = for i = 1 to il_len il_bit = ascw(mid(password, i, 1)) ''w系列支持unicode il_y = (il_bit * 13 mod 256) + il_x is_out = is_out & chrw(fix(il_y)) ''取整 int和fix区别: fix修正负数 il_x = il_bit * 13 / 256 next is_out = is_out & chrw(fix(il_x)) password = is_out il_len = len(password) il_x = 0 il_y = 0 is_out = for i = 1 to il_len il_bit = ascw(mid(password, i, 1)) ''取前4位值 il_y = il_bit / 16 + 64 is_out = is_out & chrw(fix(il_y)) ''取后4位值 il_y = (il_bit mod 16) + 64 is_out = is_out & chrw(fix(il_y)) next encryptstring = is_out end function }
用php还原function encryptstring($password){ //密码前端加密部分 $il_len = strlen($password); $il_x = 0; $il_y = 0; $is_out = ; for($i=0;$i< $il_len;$i++){ $il_bit = ord(substr($password, $i, 1)); $il_y = ($il_bit * 13 % 256) + $il_x; $is_out = $is_out. chr(fix($il_y)); $il_x = $il_bit * 13 / 256; } $is_out = $is_out. chr(fix($il_x)); $password = $is_out; $il_len = strlen($password); $il_x = 0; $il_y = 0; $is_out = ; for($i=0;$i<$il_len;$i++){ $il_bit = ord(substr($password, $i, 1)); $il_y = $il_bit / 16 + 64; $is_out = $is_out. chr(fix($il_y)); $il_y = ($il_bit % 16) + 64; $is_out = $is_out. chr(fix($il_y)); } return $is_out; }function fix($il_y) { if(floor($il_y) < 0){ return floor($il_y)+1; }else{ return floor($il_y); }}
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product