PHP转为AU3输出不同,有人能解决吗!
本帖最后由 manbutianya 于 2014-6-7 20:56 编辑PHP:<?php
echo "hello";
echo "为什么不同";
$key="6N0Y6NI252N1KYCNN";
$userid= MdString($key,"122555@qq.com");
$password= MdString($key,"wu123456");
function MdString($key,$string){
$len= strlen($key);
for($i=0; $i<strlen($string); $i++)
{
$k = $i % $len;
$code .= $string[$i] ^ $key[$k];
echo"<br/>";
echo $i;
echo"<br/>";
echo $k;
echo"<br/>";
echo $code;
echo"<br/>";
echo"<br/>";
}
return base64_encode($code);
}
echo"<br/>";
echo $userid;
echo"<br/>";
echo $password;
?>AU3:
#PRE_UseX64=n
#include <Base64.au3>
#include <MsgBoxConstants.au3>
$key = "6N0Y6NI252N1KYCNN"
$userid = _MdString($key,"122555@qq.com")
$password = _MdString($key,"wu123456");
MsgBox(0, "用户名",$userid&@CRLF&$password)
Func _MdString($key,$string)
$len= StringLen($key) ;取字符串长度
Local $code = ""
For $i=0 ToStringLen($string) Step 1
$k = Mod($i,$len) ;取模
;MsgBox(0, "用户密码",StringMid ($string, $i,1)&@CRLF&StringMid ($key, $k,1))
$code &= BitXOR(StringMid ($string, $i,1),StringMid ($key, $k,1))
MsgBox(0, "代码",$code)
Next
;MsgBox(0, "$k",$k)
$code = Base64($code,0);
Return $code
EndFunc
按位异或代码就不同了,有人能解决吗? 不知道PHP 语言函数意思!其它也很好软件!看这模式差不多!! 加密是PHP,要转换成AU3啊,PHP不是我们能选择的啊 这么久了,都没人帮忙,版主帮帮下吧
页:
[1]