下面是我自己用的东西 替换自身exe的16进制代码生成新文件$ddd = FileOpen(@AutoItExe, 16)
$ddds = FileRead($ddd)
$ddds2 = StringInStr($ddds, "4175746F4974")
If $ddds2 > 0 Then
TrayTip("生成新文件中....", "生成完毕后将自动删除源文件!", 10)
$rans = Random(1200, 9999, 1) & Random(1200, 9999, 1) & Random(1200, 9999, 1)
$ddds = StringReplace($ddds, "4175746F4974", $rans)
$hong = @extended
$rans = Random(10, 99, 1) & "00" & Random(10, 99, 1) & "00" & Random(10, 99, 1) & "00" & Random(10, 99, 1) & "00" & Random(10, 99, 1) & "00" & Random(10, 99, 1) & "00"
$ddds = StringReplace($ddds, "4100750074006F0049007400", $rans)
$hong = $hong + @extended
$dddsaa = @ScriptDir & "\new" & @MON & @MDAY & @MIN & ".exe"
$xier = FileOpen($dddsaa, 18)
FileWrite($xier, $ddds)
FileClose($xier)
$JIAKES = ""
$suijiya = Random(6, 9, 1)
$dos = "upx.exe -" & $suijiya & " " & $dddsaa
_RunDOS($dos)
$JIAKES = "已自动加壳"
$sancu = MsgBox(4, "", "生成成功! " & $JIAKES & " 请运行新文件 " & $dddsaa & @CR & "是否删除旧文件?", 5)
If $sancu = 6 Or $sancu = -1 Then
Run(@ComSpec & ' /c ping 127.0.0.1 -n 3&del /q "' & @ScriptFullPath & '"', @ScriptDir, @SW_HIDE)
EndIf
Exit
EndIf
|