TheWover / donut

Generates x86, x64, or AMD64+x86 position-independent shellcode that loads .NET Assemblies, PE files, and other Windows payloads from memory and runs them with parameters
BSD 3-Clause "New" or "Revised" License
3.53k stars 628 forks source link

PY_SSIZE_T_CLEAN error on compilation #107

Closed rootabeta closed 1 year ago

rootabeta commented 2 years ago
>>> import donut
>>> shellcode = donut.create('/home/rootabeta/Projects/PoCDLL/evil.exe',entropy=1,format=1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

Python 3.10.2 on 5.16.15-arch1-1

evil.exe source:

#include <windows.h>
#include <tchar.h>

int main() {
    MessageBox(NULL, "BOO!", "Get spooky!", MB_OK | MB_SYSTEMMODAL);

    return 0;  
}

compiled with x86_64-w64-mingw32-g++ exe.cc -o evil.exe

S4ntiagoP commented 2 years ago

This should be resolved in this PR: https://github.com/TheWover/donut/pull/101

TheWover commented 1 year ago

Fixed in dev branch for v1.0