# XORs the instructions in the current selection #@author AlxCzl #@category Instructions #@keybinding #@menupath #@toolbar #------------------------------------------------------------------------------------------- def main(): """Main""" if not currentSelection: print("[!] Please select the range to be xored") return print('[*] XORing byte range...') addrRange = currentSelection.getAddressRanges().next() currAddr = addrRange.minAddress while currAddr < addrRange.maxAddress: currVal = getByte(currAddr) newVal = currVal ^ 0x42 setByte(currAddr, newVal) currAddr = currAddr.add(1) print('[*] Done.') if __name__ == '__main__': main()