def init(self): constants.create_general_config_file() shared.BASE_URL = constants.get_data_from_config_file("server") shared.LOG = constants.get_data_from_config_file("log") auth = AuthForm() auth.Compile() auth.Execute() if shared.IS_COMMUNICATION_MANAGER_STARTED: communication_manager_window_handler = constants.get_window_handler_by_id(shared.COMMUNICATION_MANAGER_WINDOW_ID) constants.send_data_to_window(communication_manager_window_handler, constants.CHANGE_USER, json.dumps({"username":shared.USERNAME, "id": shared.USERID, "token": shared.USER_TOKEN})) if idc.GetIdbPath(): #You open IDA directly with a file. selector = ProjectSelector(request_project_list()) selector.Compile() selector.Execute() if shared.IS_COMMUNICATION_MANAGER_STARTED: communication_manager_window_handler = constants.get_window_handler_by_id(shared.COMMUNICATION_MANAGER_WINDOW_ID) constants.send_data_to_window(communication_manager_window_handler, constants.CHANGE_PROJECT_ID, json.dumps({"project-id": shared.PROJECT_ID})) self._live_hook = LiveHookIDP() self._live_hook.hook() self.hook() return idaapi.PLUGIN_KEEP
def init(self): constants.create_general_config_file() shared.BASE_URL = constants.get_data_from_config_file("server") shared.LOG = constants.get_data_from_config_file("log") auth = AuthForm() auth.Compile() auth.Execute() if shared.IS_COMMUNICATION_MANAGER_STARTED: 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})) if idc.GetIdbPath(): #You open IDA directly with a file. selector = ProjectSelector(request_project_list()) selector.Compile() selector.Execute() if shared.IS_COMMUNICATION_MANAGER_STARTED: 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_BASE_URL, json.dumps({"url": shared.BASE_URL})) if not shared.MASTER_PAUSE_HOOK: if not shared.PAUSE_HOOK: pass_to_manager(StartIDAEvent()) self._live_hook = LiveHookIDP() self._live_hook.hook() self.hook() return idaapi.PLUGIN_KEEP
def ev_oldfile(self, fname): log("START") selector = ProjectSelector(request_project_list()) selector.Compile() selector.Execute() if shared.IS_COMMUNICATION_MANAGER_STARTED: 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})) if shared.MASTER_PAUSE_HOOK: idaapi.register_action(action_manual_pull) idaapi.attach_action_to_menu("Edit/Plugins/IDAHub/Pull from server", "idahub:manual_pull",idaapi.SETMENU_APP) return ida_idp.IDP_Hooks.ev_oldfile(self, fname)
def ev_oldfile(self, fname): log("START") selector = ProjectSelector(request_project_list()) selector.Compile() selector.Execute() return ida_idp.IDP_Hooks.ev_oldfile(self, fname)