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.38k stars 610 forks source link

OSX can't compile python module. #110

Closed Lz1y closed 1 year ago

Lz1y commented 1 year ago

Seems like libraries aplib only supports windows/POSIX .

➜ ipython3
Python 3.9.13 (main, May 24 2022, 21:28:31)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.24.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import donut
/usr/local/lib/python3.9/site-packages/donut_shellcode-0.9.3-py3.9-macosx-12-x86_64.egg/donut.py:3: UserWarning: Module donut was already imported from /usr/local/lib/python3.9/site-packages/donut_shellcode-0.9.3-py3.9-macosx-12-x86_64.egg/donut.py, but /Users/xxx/Downloads/donut is being added to sys.path
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-7a3b276a39db> in <module>
----> 1 import donut

<frozen zipimport> in load_module(self, fullname)

~/Library/Caches/Python-Eggs/donut_shellcode-0.9.3-py3.9-macosx-12-x86_64.egg-tmp/donut.cpython-39-darwin.so in <module>

~/Library/Caches/Python-Eggs/donut_shellcode-0.9.3-py3.9-macosx-12-x86_64.egg-tmp/donut.cpython-39-darwin.so in __bootstrap__()

ImportError: dlopen(/Users/xxx/Library/Caches/Python-Eggs/donut_shellcode-0.9.3-py3.9-macosx-12-x86_64.egg-tmp/donut.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '_aP_max_packed_size'
TheWover commented 1 year ago

I will check if there is an easy way to deal with this for MacOS. If not, my advice will most likely be to run donut as a docker image using the new Dockerfile

Lz1y commented 1 year ago

@TheWover Thanks a lot, already used docker way.