Skip to content

Instantly share code, notes, and snippets.

@LemonHaze420
Last active November 23, 2024 17:31
Show Gist options
  • Save LemonHaze420/d398bd707221378100fea04b6ac88a35 to your computer and use it in GitHub Desktop.
Save LemonHaze420/d398bd707221378100fea04b6ac88a35 to your computer and use it in GitHub Desktop.
Searchin strings in IDA with python
import idaapi as ida
try:
the_string = ida_kernwin.ask_str("", 0, "Please enter a string to search for.")
b = bytearray()
b.extend(map(ord, the_string))
address = ida.get_first_seg().start_ea
while address != BADADDR:
if b == get_bytes(address, len(b)):
print ("Found at 0x%X" % address)
address += 1
except:
pass
@LemonHaze420
Copy link
Author

seems pretty slow :/

@LemonHaze420
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment