A open-source Pwntools Extern Functions.
Project description
An Open-Source Pwntools External functions library.
Usage:
pip install PwnModulesfrom PwnModules import *
Features:
Format String Helper
fmt_canary
-
Prototype:
fmt_canary() -
Parameters:
-
While using
fmt_canary()function, It will automaticly exploit the Canary's offset on the stack. -
Be advised, This function only works for simple problems.
-
fmtstraux
-
Prototype:
fmtstraux(int size, bool x64) -
Parameters:
-
SizeThe number of%p -
x64The system arch
-
fmtgen
-
Prototype:
fmtgen(char character, int size, int num, char separator) -
Parameters:
-
characterBy defaultp -
sizeThe number of%character -
numFromnumstart -
separatorby default-
-
fmtstr_payload_64
- Prototype:
fmtstr_payload_64(int offset, dictionary writes, int numbwritten=0, write_size='byte') - Same as the pwntools's
fmtstr_payload, But from other ppl's hand.
IO_FILE_plus_struct
- The extern of the default IO_FILE_Struct.
- Supports
House of Apple
Basic Functions
debug
- Prototype:
debug(IOStream io, int breakpoint) - Parameters:
ioIgnorable, Will be fill by globalioStreambreakpointIgnorable, Will beNoneby default.
get_libc_base
- Prototype:
get_libc_base(string name, int addr) - Parameters:
nameThe name of leaked function.addrThe Address of leaked function.
get_utils
- Prototype:
get_utils(string binaryPath, bool local, string ip, int port) - Parameters:
binaryPathThe path of binary file.localIs using remote connect or local file.ipThe remote host ip address.portThe remote host ip port.
init_env
- Prototype:
init_env(int arch, string logLevel) - Parameters:
archThe context system arch.logLevelThe context log level.
leak_addr
- Prototype:
leak_addr(int i) - Parameters:
iMode.- Mode 0 ---- > x86
- Mode 1 ---- > Big Endian for x64
- Mode 2 ---- > Little Endian for x64
- Mode 3 ---- > Directly receive 8 bytes.
libc_search
- Prototype:
libc_search(string funcName, int leakedAddr, bool onlineMode) - Parameters:
funcNameThe leaked function name.leakedAddrThe leaked function address.onlineModeDecides the function if going to search online.
payload_generator
- Prototype:
payload_generator(int paddingSize, int libcBaseAddr, bool stackAligned) - Parameters:
paddingSizeThe size of padding.libcBaseAddrThe libc base address.stackAlignedIs the stack aligned needed.
recv_int_addr
Ret2Csu
-
Prototype:
Ret2Csu(payload, r12, rdi, r14, r13, csu_front, csu_rear, syscallAddr) -
Parameters:
payload: The forward Payload.r12,rdi,r14,r13: Register values.R12call [r12+rbx*8]RDIThe first argument.R14The second argument.R15The third argument.csu_front,csu_rear: Addresses for the CSU gadget.syscallAddr: The address for the syscall gadget.
search_one_gadget
- Prototype:
search_one_gadget(int index) - Parameters:
indexThe index of one_gadget list.
search_reg_gadgets
- Prototype:
search_reg_gadgets(string reg) - Parameters:
regThe register or string.
show_addr
- Prototype:
show_addr(string msg, int addr) - Parameters:
msgThe output msg.addrThe addr that will be print.
sym_addr
- Prototype:
sym_addr(string sym) - Parameters:
symThe target function's name. By default this function will returnlibcBaseAddress, system, binsh
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file PwnModules-1.8.tar.gz.
File metadata
- Download URL: PwnModules-1.8.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
814fb639406405dd6d33c3afe006294df6538dd1f268a08ac53c4c1ab97dd24d
|
|
| MD5 |
72f460193104b9c51f743672e868728e
|
|
| BLAKE2b-256 |
5a325631103f7367efa110de77fe52fe2643e2964860454ab82a69eac8afd32b
|
File details
Details for the file PwnModules-1.8-py3-none-any.whl.
File metadata
- Download URL: PwnModules-1.8-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7efd691fcae78bb12466635a5b206e7767cc00bfc8b82e246f098c99af95833f
|
|
| MD5 |
9a6940b3592b739e52e7d837bb31c86d
|
|
| BLAKE2b-256 |
b09686a1d41803a182016982a4803c0beb6f2b8ce42da6763c179d9dae78fb83
|