谁能把这个vbs代码转成au3的
这个是用来破解flashfxp密码的,哪位高手给改成au3的吧
下面是VBS解密算法
Function Decrypt(password)
magic = Split("121,65,51,54,122,65,52,56,100,69,104,102,114,118,103,104,71,82,103,53,55,104,53,85,108,68,118,51", ",")
chrlast = cint("&H" & Mid(password, 1, 2)) ''取前password两位转换10进制
magicnum = 0
For X = 3 To Len(password) Step 2''循环次数(密码长度除2)
chrtmp = cint("&H" & Mid(password, X, 2)) ''取奇数位取前password两位转换10进制
chrresultb = (chrtmp Xor magic(magicnum))- cint(chrlast) ''xor结果减去password每两位的10进制
msgbox chrresultb
If chrresultb > 255 or chrresultb27 Then
magicnum = 0 ''如果密码位数大于27就为0 也就是121
End If
Next
Decrypt = pwdtmp
End Function
wscript.echo Decrypt("CB85F6197BCA40") VB还没开始学,帮顶! 看看这可以不?
#include <bk-logfile.au3>
Func Decrypt($password)
Local $Return
$magic = StringSplit("121,65,51,54,122,65,52,56,100,69,104,102,114,118,103,104,71,82,103,53,55,104,53,85,108,68,118,51", ",")
$chrlast = Number("&H" & StringMid($password, 1, 2)) ;; $password 10
$magicnum = 0
For $X = 3 To StringLen($password) Step 2;; ( 2)
$chrtmp = Number("&H" & StringMid($password, $X, 2)) ;; $password 10
$chrresultb = ($chrtmp Xor $magic($magicnum))- Number($chrlast) ;;xor $password 10
msgbox $chrresultb
If $chrresultb > 255 or $chrresultb27 Then
$magicnum = 0 ;; 27 0 121
EndIf
Next
$Return = $pwdtmp
Return $Return
EndFunc
_WriteLog (Decrypt("CB85F6197BCA40"))
..................................................................................................
bk-logfile.au3
.........................
#include-once
#include <Constants.au3>
#include <Misc.au3>
#include <Date.au3>
#include <bk-account.au3>
AutoItSetOption("MustDeclareVars", 1)
AutoItSetOption("RunErrorsFatal", 0)
Global $intLogFile
; Create log file
Func _OpenLogFile($strPath="",$strFilename="",$strHeader="",$strInfos="")
If StringLen($strPath)=0 Then $strPath = @ScriptDir
If StringLen($strFilename)=0 Then $strFilename = StringReplace(StringReplace(@ScriptName,"exe","log"),"au3","log")
DirCreate($strPath)
$intLogFile = FileOpen($strPath & "\" & $strFilename, 2)
If StringLen($strHeader)>0 Then
FileWriteLine($intLogFile, $strHeader)
FileWriteLine($intLogFile, "Computer: " & @Computername)
FileWriteLine($intLogFile, "CPU: " & StringStripWS(regRead("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0", "processornamestring"),3))
FileWriteLine($intLogFile, "OS: " & @OSVersion)
FileWriteLine($intLogFile, "OS Language: " & @OSLang)
FileWriteLine($intLogFile, "OS Version: " & @OSBuild & "." & @OSServicePack)
FileWriteLine($intLogFile, "Logon Domain: " & @LogonDomain & " (" & @LogonDNSDomain & ")")
FileWriteLine($intLogFile, "Logon Server: " & @LogonServer)
FileWriteLine($intLogFile, "System dir: " & @SystemDir)
FileWriteLine($intLogFile, "Total memory MB: " & TotalMemory())
FileWriteLine($intLogFile, "User: " & _CurrentUser())
FileWriteLine($intLogFile, "Admin rights: " & _iif (IsAdmin() = 1, "yes", "no"))
FileWriteLine($intLogFile, "Profile dir: " & @UserProfileDir)
FileWriteLine($intLogFile, "Date: " & _NowDate())
FileWriteLine($intLogFile, "Time: " & StringFormat("%02d:%02d:%02d", @HOUR, @MIN, @SEC))
FileWriteLine($intLogFile, $strInfos)
FileWriteLine($intLogFile, "")
FileWriteLine($intLogFile, "Log file:")
EndIf
EndFunc ;==>OpenLogFile
Func TotalMemory()
Local $arrMemory
$arrMemory = MemGetStats()
Return Round(($arrMemory / 1024) + 0.5, 0)
EndFunc ;==>TotalMemory
; Write Message into exporer windows and into the Log
Func _WriteLog($strLogMessage="", $intEmptyLine=0)
Local $strSeperator
If $intLogFile=0 Then _OpenLogFile()
If StringLeft($strLogMessage, 1) <> ">" Then $strSeperator = "- "
FileWriteLine($intLogFile, $strSeperator & $strLogMessage & _iif($intEmptyLine=1,@CRLF,""))
EndFunc ;==>WriteLog
; Close log file
Func _CloseLogFile()
FileClose($intLogFile)
EndFunc ;==>CloseLogFile 原帖由 cjl 于 2008-10-6 21:26 发表 http://www.autoitx.com/images/common/back.gif
看看这可以不?
#include
Func Decrypt($password)
Local $Return
$magic = StringSplit("121,65,51,54,122,65,52,56,100,69,104,102,114,118,103,104,71,82,103,53,55,104,53,85,108,68,118,51", ",")
...
还是不行呢
我再传2个找到的东西,请您再帮忙看看吧~~谢谢!!! 汉化版里有 vbs2au3
页:
[1]