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
There is a circular include where include/donut.h#L85 includes format.h while include/format.h#L35 includes donut.h. This could potentially cause issues where included symbols do not get defined.
Since format.c only uses donut.h for the error macros, they can be refactored out into a separate errors.h file which can be included separately in format.c without needing to include all of donut.h.
The DPRINT macro has to be re-implemented because it is needed for format.c but is only defined in donut.h and loader/loader.h. loader/loader.h#L101 also includes donut.h so it cannot be used since this would result in another circular include.
There is a circular include where include/donut.h#L85 includes
format.h
while include/format.h#L35 includesdonut.h
. This could potentially cause issues where included symbols do not get defined.Since
format.c
only usesdonut.h
for the error macros, they can be refactored out into a separateerrors.h
file which can be included separately informat.c
without needing to include all ofdonut.h
.The
DPRINT
macro has to be re-implemented because it is needed forformat.c
but is only defined indonut.h
andloader/loader.h
. loader/loader.h#L101 also includesdonut.h
so it cannot be used since this would result in another circular include.