Files
Shellcode-Lab/x86_32/0x1_SyscallBasics/Example_Code/ascii_converter.py
Marco Lux bfba9eba5c typo fix
2017-02-01 13:21:01 +01:00

22 lines
331 B
Python

#!/usr/bin/env python
#
# ascii converter for shellcoding-lab at hack4
# ~dash in 2014
#
import sys
import binascii
text = sys.argv[1]
def usage():
print "./%s <string2convert>" % (sys.argv[0])
if len(sys.argv)<2:
usage()
exit()
val = binascii.hexlify(text[::-1])
print "Stringlen: %d" % len(text)
print "String: %s" % val