Various helper functions.
Function | splitter |
Split a iterable into all length variations |
Function | randport |
Get Random TCP port number (above 1024). |
Function | randstr |
Get Random string from A-Za-z0-9 of length x. |
Function | term_rows_cols |
Return terminal rows / cols. |
Function | rshell_stagetxt |
Print Reverse shell staging information to paste into victim reverse shell |
Function | powershell_base64_encode |
Encode a powershell compatible b64 string. |
Split a iterable into all length variations
example: :
import json test = "abcd" output = list(map(list, splitter(test))) print(len(output)) print(json.dumps(output, indent=4, separators=(",", " : "))) print(len(list(splitter("abcdefghijkl"))))
output: :
7 [ [ "a", "bcd" ], [ "a", "b", "cd" ], [ "a", "b", "c", "d" ], [ "a", "bc", "d" ], [ "ab", "cd" ], [ "ab", "c", "d" ], [ "abc", "d" ] ] 2047
Print Reverse shell staging information to paste into victim reverse shell
example: :
stty rows 16 cols 135 export TERM=xterm-256color mkdir -p /dev/shm/V0_Rando/bin cd /dev/shm/V0_Rando ln -fs /dev/null .bash_history export SHELL=/bin/bash export HOME=$(pwd) export PATH=$PATH:$(pwd)/bin python -c 'import pty; pty.spawn("/bin/bash")' || python3 -c 'import pty; pty.spawn("/bin/bash")'