Compiles shellcode
source (str): shellcode in strings
isThumb (boolean): Thumb or ARM Mode
isNeedHead (boolean): It shows up if true
Make XOR Encoder with Shellcode
sc(str): shellcode
isThumb(boolean): ARM or Thumb Mode
>>> sc = MakeXorShellcode(bindshell, isThumb=True)
Print syserr(2) screen to debug
XOR Encoder to avoid some bad codes like 0x0a, 0x00 and so on
scSize(int): shellcode length
xorkey(int): XOR key
SC(str): shellcode
checks bad chars in shellcode string
sc(str): shellcode
bc(list): bad chars like 0x00, 0x0a
disassembles code in arch with mode
code(str): assemble code
arch(str): Architechture (so far ARM only)
mode(str): Mode (THUMB or ARM)
>>> rv = disasm(code, 'ARM', 'THUMB')
encodes shellcode with key to avoid all of bad chars such as 0x00
>>> print encodeShellcode(sc, findXorKey(sc))
'à"¢á/ë¢ã í-`kl-qj'
find XOR key to scramble and to avoid all of bad chars such as 0x00
sc(str): shellcode
bc(list): bad chars to avoid
>>> print findXorKey(sc)
2
parses getdent’s struct to human readable.
print hex code in human-readable
fixes up value for register
reg(str): register
value(int): real value
struct.unpack(2-bytes)
struct.unpack(4-bytes)