Last active
November 23, 2024 17:31
-
-
Save LemonHaze420/d398bd707221378100fea04b6ac88a35 to your computer and use it in GitHub Desktop.
Searchin strings in IDA with python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
seems pretty slow :/