1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
import idautils import idc import idaapi import struct
def main(ea_start, ea_end, save_file): print('[*]begin to dump segment') handle_f = open(save_file, 'wb') for byte_addr in range(ea_start, ea_end): byte_value = idaapi.get_byte(byte_addr) handle_f.write(struct.pack('B',byte_value)) handle_f.close() hooks = idaapi.DBG_Hooks() hooks.hook() print('[*]script by freakish, enjoy~~') print('[*]script finish')
ea_start = 0x78AA6BF000 ea_size = 0x2A5000
ea_end = ea_start + ea_size save_file = 'd:/geiri_'+str(ea_start)+'.so'
main(ea_start, ea_end, save_file)
|