/* xor.idc XORs each byte in the selected area with a byte specified by the user. Needed for honeynet.org's scan33. Eloy Paris November 2004 */ #include static xor(void) { auto start, end, ptr; auto key; start = SelStart(); if (start == BADADDR) return; end = SelEnd(); if (end == BADADDR) return; end = end - 1; /* Otherwise we'll be off by one */ key = AskLong(0, "Number to XOR selected area with:"); if (key == -1) return; Message("XORing with 0x%x %d bytes starting at 0x%08x... ", key, end - start + 1, start); for (ptr = start; ptr <= end; ptr++) PatchByte(ptr, Byte(ptr) ^ key); Message("done.\n"); }