Exemple #1
0
 def ev_oldfile(self, fname):
     log("START")
     #in case of race condition
     constants.send_data_to_window(
         shared.COMMUNICATION_MANAGER_WINDOW_ID,
         constants.CHANGE_PROJECT_ID,
         json.dumps({
             "project-id": shared.PROJECT_ID,
             "need-to-pull": shared.MASTER_PAUSE_HOOK
         }))
     pass_to_manager(StartIDAEvent())
     if not shared.MASTER_PAUSE_HOOK:
         shared.PAUSE_HOOK = not ida_auto.auto_is_ok()
     return ida_idp.IDP_Hooks.ev_oldfile(self, fname)
Exemple #2
0
    def init(self):
        msg("[IReal]: Init done\n")
        msg("[IReal]: Waiting for auto analysing\n")
        constants.create_general_config_file()
        constants.create_config_file()
        shared.BASE_URL = constants.get_data_from_config_file("server")
        shared.LOG = constants.get_data_from_config_file("log")

        if idc.GetIdbPath() and ida_auto.auto_is_ok():
            log("Start")
            if not shared.MASTER_PAUSE_HOOK:
                shared.PAUSE_HOOK = False

        else:
            shared.PAUSE_HOOK = True

        if shared.USERID != -1 and shared.IS_COMMUNICATION_MANAGER_STARTED:  #started.
            if not shared.PAUSE_HOOK:
                pass_to_manager(StartIDAEvent())
            constants.send_data_to_window(
                shared.COMMUNICATION_MANAGER_WINDOW_ID,
                constants.CHANGE_PROJECT_ID,
                json.dumps({
                    "project-id": shared.PROJECT_ID,
                    "need-to-pull": shared.MASTER_PAUSE_HOOK
                }))
            constants.send_data_to_window(
                shared.COMMUNICATION_MANAGER_WINDOW_ID, constants.CHANGE_USER,
                json.dumps({
                    "username": shared.USERNAME,
                    "id": shared.USERID,
                    "token": shared.USER_TOKEN
                }))
            constants.send_data_to_window(
                shared.COMMUNICATION_MANAGER_WINDOW_ID,
                constants.CHANGE_BASE_URL, json.dumps({"url":
                                                       shared.BASE_URL}))

        self.idb_hook = LiveHook()
        self.ui_hook = ClosingHook()
        self.idp_hook = LiveHookIDP()
        self.view_hook = CursorChangeHook()
        self.idb_hook.hook()
        self.ui_hook.hook()
        self.idp_hook.hook()
        self.view_hook.hook()
        self.hook()

        return idaapi.PLUGIN_KEEP
Exemple #3
0
    def init(self):
        msg("[IReal]: Init done\n")
        msg("[IReal]: Waiting for auto analysing\n")
        constants.create_config_file()
        if idc.GetIdbPath() and ida_auto.auto_is_ok():
            shared.PAUSE_HOOK = False
        else:
            shared.PAUSE_HOOK = True

        self.idb_hook = LiveHook()
        self.ui_hook = ClosingHook()
        self.idp_hook = LiveHookIDP()
        self.view_hook = CursorChangeHook()
        self.idb_hook.hook()
        self.ui_hook.hook()
        self.idp_hook.hook()
        self.view_hook.hook()
        self.hook()

        return idaapi.PLUGIN_KEEP
Exemple #4
0
 def update(self, ctx):
     if not ida_loader.get_path(ida_loader.PATH_TYPE_IDB):
         return ida_kernwin.AST_DISABLE
     if not ida_auto.auto_is_ok():
         return ida_kernwin.AST_DISABLE
     return super(SaveActionHandler, self).update(ctx)
Exemple #5
0
 def busy(self):
     return not (ida_auto.auto_is_ok())
Exemple #6
0
 def ev_oldfile(self, fname):
     log("START")
     pass_to_manager(StartIDAEvent())
     shared.PAUSE_HOOK = not ida_auto.auto_is_ok()
     return ida_idp.IDP_Hooks.ev_oldfile(self, fname)