Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from idautils import *
- from idc import *
- from ida_ida import *
- xor_counter = 0
- ea = inf_get_min_ea()
- for funcAddr in Functions(get_segm_start(ea), get_segm_end(ea)):
- name = get_func_name(funcAddr)
- instructions_addresses = list(FuncItems(funcAddr))
- for addr in instructions_addresses:
- instruction = print_insn_mnem(addr)
- if instruction == "xor" and print_operand(addr, 1) != print_operand(addr, 0):
- xor_counter += 1
- print("In function {} at addr 0x{} {} {}, {}".format(name, addr, instruction, print_operand(addr, 0), print_operand(addr, 1)))
- print("Total quantity of XOR operation: {}".format(xor_counter))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement