联通用户正常的账号经过加密才能上网,不知哪位高人把它的算法弄了出来,C#,PHP,C语言,易语言,C++都有源码
我参照着PHP源码翻译了过来,可是搞的焦头烂额,里面各个循环数组函数通过GOOGLE感觉懂了,可总是和别人算出来的不一样,
哪位高人思路清晰的帮看下啊
我写的AU3#include <Array.au3>
#Include <String.au3>
Dim $num,$maskArray[17],$decodeString[126]
cnc("037988886666")
Func cnc($num)
;~ MsgBox(0,"ds",StringLen($num))
$string = "9012345678abcdeABCDEFGHIJKLMNfghijklmnUVWXYZxyzuvwopqrstOPQRST"
$maskArray[16] = 25
$maskArray[15] = 35
$maskArray[14] = 182
$maskArray[13] = 236
$maskArray[12] = 43
$maskArray[11] = 41
$maskArray[10] = 53
$maskArray[9] = 18
$maskArray[8] = 226
$maskArray[7] = 215
$maskArray[6] = 24
$maskArray[5] = 117
$maskArray[4] = 35
$maskArray[3] = 201
$maskArray[2] = 52
$maskArray[1] = 17
;$decodeString = _StringRepeat("x",StringLen($num));检测$num的数量并替换为“X”
Local $l = 37 ,$k = 0 ,$u = 0 ,$x = 0 ,$decodeString[128],$decodeString2,$t
For $i = 1 To StringLen($num) - 1 Step 1 ;从0循环到8,
For $j = 1 To StringLen($string) - 1 Step 1 ;从0循环到25
If StringMid($num, $i, 1) == StringMid($string, $j, 1) Then ;如果123456789的第一位 与 9012345678abcdeABC 一样 则
If $i<16 Then
$u = $maskArray[$i]
Else
$x = Mod ( $i, 16 )
$u = $maskArray[$x]
EndIf
$u = (($u ^ ($l * 3)) ^ $k) + $j
$x = Mod ( $u, 62 )
$decodeString[$i] = StringMid($string, $x, StringLen($x))
$l = $l ^ ($x+9433)
ExitLoop
EndIf
Next
If $decodeString[$i] == "" Then $decodeString[$i] = $i
$k = $k + 5
$decodeString2 = $decodeString2&$decodeString[$i]
$num = "2:"&$decodeString2
Next
MsgBox(0,"sds",$num)
EndFunc
;3
PHP源码:
代码显示不正常,这是源码博客,可以高亮显示
PHP源码
C#的源码:
http://blog.upall.cn/wp-content/plugins/wordpress-toolbar/toolbar.php?wptbto=http%3A%2F%2Fwww.udnz.com%2Fcode-2896.htm&wptbhash=aHR0cDovL2Jsb2cudXBhbGwuY24vOTA5Lmh0bWw8d3B0Yj7msrPljZfogZTpgJrlrr3luKbotKblj7fliqDlr4bnrpfms5UgW%2BmZhHBocOOAgUpT5rqQ56CBXTx3cHRiPmh0dHA6Ly9ibG9nLnVwYWxsLmNuPHdwdGI%2B5YyX6KGX5bCP5be34oSi |