打印消息的 AutoIt 汇编代码
AutoIt assembly code to print a message
我正在制作一个程序来显示 hello world
使用 AutoIt。汇编代码用于其他语言的示例中,但不是 AutoIt。代码是:
char code[] =
"\xb8\x04\x00\x00\x00"
"\xbb\x01\x00\x00\x00"
"\xb9\x00\x00\x00\x00"
"\xba\x0f\x00\x00\x00"
"\xcd\x80\xb8\x01\x00"
"\x00\x00\xbb\x00\x00"
"\x00\x00\xcd\x80";
我会尝试使用 AutoIt,所以:
$pt = DLLStructCreate("byte[" & BinaryLen($YourShellcode) & "]")
DllStructSetData($pt, 1, $YourShellcode)
$y=DllStructGetPtr($pt)
_WinAPI_CallWindowProc($y, 0, 0, 0, 0)
但我不确定如何包含此汇编代码来打印 hello world
。怎么做?只是 hello world
使用 asm 和 AutoIt 的一个小例子。
您试过这样做吗?
#include <WinAPI.au3>
Global $YourShellcode = "0xb804000000bb01000000b900000000ba0f000000cd80b801000000bb00000000cd80"
$pt = DLLStructCreate("byte[" & BinaryLen($YourShellcode) & "]")
DllStructSetData($pt, 1, $YourShellcode)
$y=DllStructGetPtr($pt)
_WinAPI_CallWindowProc($y, 0, 0, 0, 0)
我正在制作一个程序来显示 hello world
使用 AutoIt。汇编代码用于其他语言的示例中,但不是 AutoIt。代码是:
char code[] =
"\xb8\x04\x00\x00\x00"
"\xbb\x01\x00\x00\x00"
"\xb9\x00\x00\x00\x00"
"\xba\x0f\x00\x00\x00"
"\xcd\x80\xb8\x01\x00"
"\x00\x00\xbb\x00\x00"
"\x00\x00\xcd\x80";
我会尝试使用 AutoIt,所以:
$pt = DLLStructCreate("byte[" & BinaryLen($YourShellcode) & "]")
DllStructSetData($pt, 1, $YourShellcode)
$y=DllStructGetPtr($pt)
_WinAPI_CallWindowProc($y, 0, 0, 0, 0)
但我不确定如何包含此汇编代码来打印 hello world
。怎么做?只是 hello world
使用 asm 和 AutoIt 的一个小例子。
您试过这样做吗?
#include <WinAPI.au3>
Global $YourShellcode = "0xb804000000bb01000000b900000000ba0f000000cd80b801000000bb00000000cd80"
$pt = DLLStructCreate("byte[" & BinaryLen($YourShellcode) & "]")
DllStructSetData($pt, 1, $YourShellcode)
$y=DllStructGetPtr($pt)
_WinAPI_CallWindowProc($y, 0, 0, 0, 0)