Created
August 2, 2021 16:56
-
-
Save alexander-hanel/2f9460168f51b369ca502079d892ddbb to your computer and use it in GitHub Desktop.
x64dbg Address Export to IDA for Import Rebuilding
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
from idaapi import * | |
import idautils | |
import idc | |
class X64DBG_ADDR_TO_IDA: | |
def __init__(self): | |
self.fileName = ida_kernwin.ask_file(0, "*.*", 'X64DBG Address Exported') | |
self.content = [] | |
self.getFile() | |
self.renameAddr() | |
def getFile(self): | |
try: | |
self.content = open(self.fileName, 'r').readlines() | |
except: | |
return | |
def renameAddr(self): | |
""" | |
3502BC7C 75A241B3 ³A¢u advapi32.LookupPrivilegeValueW | |
3502BC80 75A24304 .C¢u advapi32.OpenProcessToken | |
3502BC84 75A1CA64 dʡu advapi32.OpenSCManagerW | |
""" | |
for addr in self.content: | |
list_addr_name = addr.split() | |
if len(list_addr_name) != 4: | |
continue | |
api_addr = int(list_addr_name[0],16) | |
api_name = list_addr_name[3].split('.')[1] | |
idc.set_name(api_addr, api_name, SN_NOWARN) | |
X64DBG_ADDR_TO_IDA() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment