php vbs加密还原
来源:互联网 发布:淘宝购物车不小心删除 编辑:程序博客网 时间:2024/04/30 01:39
js加密还原
原过程
vbs加密还原
原过程
var pwd = theform.PassWord.value;var rndNum = 394058;rndNum = rndNum.toString();var curPos = 0;var tmpStr,EnCryptStr = "";for(Cnt=0;Cnt<pwd.length;Cnt++){ if(Cnt % rndNum.length == 0 ) curPos = 0; tmpStr = pwd.substring(Cnt,Cnt+1); EnCryptStr += String.fromCharCode(tmpStr.charCodeAt(0) - Cnt - rndNum.substring(curPos,curPos+1)); curPos +=1;}theform.PassWord.value = EnCryptStr;//Assigned the EncryptPassword value to the PassWord TextFiledtheform.EnRndNum.value = rndNum;
用php还原$pwd = "";$rndNum = "394058";$curPos = 0;$tmpStr = "";$EnCryptStr = "";for($Cnt=0;$Cnt&lt;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 ''&lt;br&gt;'';echo $rndNum;echo ''&lt;br&gt;'';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); }}
0 0
- php vbs加密还原
- 加密 解密VBS 脚本
- php base64解码图片 base64加密图片还原
- 双重加密VBS, VBE文件
- 数据库加密备份,还原
- 安装加密批处理VBS脚本源代码
- vbs加密程序screnc遇到问题
- php 数据库备份、还原
- php 数据库备份、还原
- php加密
- php加密
- PHP加密
- PHP---加密
- php加密
- PHP 加密
- php加密
- php加密
- php加密
- Android 线程池及多线程下载,Progressbar动态更新以及文件保存sd卡
- 获取当前域名
- word怎么打拼音声调的三种方法介绍
- Windows环境下eclipse提交到远程wordcount程序报错 at org.apache.hadoop.util.Shell.runCommand(Shell.java:545)
- erlang 调试程序
- php vbs加密还原
- 如何对web.config进行加密和解密
- XUtils的使用、混淆
- java生成excel并下载(poi)
- C++和C的语法区别_输入输出
- Ubuntu 服务器之间文件共享(nfs)
- Ubuntu服务器向多台服务器同时上传文件脚本
- UVa10635--Prince and Princess(LCS转LIS)
- MySQL定时执行