Since the JMP address or SEH address always had to be reversed in some manner
and some '\x' added to them in series of twos..Felt kind of lazy having to do this reversing and
addition of the '\x' characters each time.
so i wrote this script to help me with the reversing and conversion.
Thought this could be useful to others thread members too... Here are the codes:
Code:#!/usr/bin/python import sys def usage(): print "Usage: %s <JMP or SEH Address>\n"%(sys.argv[0]) print "Example: %s 0x0F9A2B7F or %s 0F9A2B7F"%(sys.argv[0],sys.argv[0]) sys.exit() def jmp_format(address): list_address = list(address) if len(address) == 10: for iterate in range(0,2): list_address.pop(0) list_address.reverse() jump_address = '' tmp_list = [] number_first = 0 number_second = 1 for iterate2 in range(0,4): tmp_list.append(list_address[0 + number_second]) tmp_list.append(list_address[0 + number_first]) jump_address += '\\x%s%s'%(tmp_list[0 + number_first],tmp_list[0 + number_second]) number_first += 2 number_second += 2 return jump_address try: address = sys.argv[1] print(jmp_format(address)) except IndexError: usage()
Although to make it easier for me, i "chmod +x "script_name" ed the script,, then copied the script to the /bin/ directory,Code:root@bt:~# python jmp 0x0f9a33d4 \xd4\x33\x9a\x0f
so that i could run it like any normal inbuilt
unix commands like ls,ping,cat etc..... this is optional though
Code:root@bt:~# jmp 0x0f9a33d4 \xd4\x33\x9a\x0f



