Python idautils.GetIdbDir() Examples

The following are 5 code examples of idautils.GetIdbDir(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module idautils , or try the search function .
Example #1
Source Project: IDASynergy   Author: CubicaLabs   File: IDASynergy.py    License: MIT License 6 votes vote down vote up
def wait_ready():
    global already_loaded
    if menu is None:
        if os.path.dirname(idautils.GetIdbDir()) == os.getcwd():
            create_menu()

    # Couldn't find a better way: IDA Hooks do not provide any event to
    # know when this happens. To be improved.
    prev_status = idc.SetStatus(IDA_STATUS_READY)
    idc.SetStatus(prev_status)

    if prev_status == IDA_STATUS_READY and (menu is not None):
        if not already_loaded:
            already_loaded = True
            menu.insert_hooks()
        return 0

    return 1000 
Example #2
Source Project: lighthouse   Author: gaasedelen   File: ida_api.py    License: MIT License 5 votes vote down vote up
def get_database_directory(self):
        return idautils.GetIdbDir() 
Example #3
Source Project: UEFI_RETool   Author: yeggor   File: dep_graph.py    License: MIT License 5 votes vote down vote up
def test():
    json_file = os.path.join(idautils.GetIdbDir().replace(
        'modules', 'log'), 'examples', 'ida_log_all_tpt480s.json')
    g = run(json_file)
    if g and DEBUG:
        print('[{}] graph created and displayed'.format(NAME)) 
Example #4
Source Project: UEFI_RETool   Author: yeggor   File: uefi_analyser.py    License: MIT License 5 votes vote down vote up
def init(self):
        self._last_directory = idautils.GetIdbDir()
        ui.init_menu(MenuHandler(self))
        self._welcome()
        return idaapi.PLUGIN_KEEP 
Example #5
Source Project: smda   Author: danielplohmann   File: IdaInterface.py    License: BSD 2-Clause "Simplified" License 5 votes vote down vote up
def getIdbDir(self):
        return idautils.GetIdbDir()