Commits

Daniel Plohmann committed 1e54d5d

cleanup, refactoring

Comments (0)

Files changed (4)

                  + "Try setting the field \"idascope_root_dir\" to the path where \"IDAscope.py\" is located."
             sys.exit(-1)
 
-    def setup_shared_modules(self):
+    def setupSharedModules(self):
         """
         Setup shared IDAscope modules.
         """
         self.ida_proxy = IdaProxy()
         print ("[\\] this took %3.2f seconds.\n" % (time.time() - time_before))
 
-    def setup_widgets(self):
+    def setupWidgets(self):
         """
         Setup IDAscope widgets.
         """
         self.idascope_widgets.append(FunctionInspectionWidget(self))
         self.idascope_widgets.append(WinApiWidget(self))
         self.idascope_widgets.append(CryptoIdentificationWidget(self))
-        self.setup_IDAscope_form()
+        self.setupIDAscopeForm()
         print ("[\\] this took %3.2f seconds.\n" % (time.time() - time_before))
 
-    def setup_IDAscope_form(self):
+    def setupIDAscopeForm(self):
         """
         Orchestrate the already initialized widgets in tabs on the main window.
         """
         """
         When creating the form, setup the shared modules and widgets
         """
-        self.print_banner()
+        self.printBanner()
         self.parent = self.FormToPySideWidget(form)
         self.parent.setWindowIcon(self.icon)
-        self.setup_shared_modules()
-        self.setup_widgets()
+        self.setupSharedModules()
+        self.setupWidgets()
 
-    def print_banner(self):
+    def printBanner(self):
         banner = "#############################################\n" \
                + "  ___ ____    _                             \n" \
                + " |_ _|  _ \  / \   ___  ___ ___  _ __   ___ \n" \
                 self.tabs.setCurrentIndex(tab_index)
         return
 
-    def register_hotkey(self, shortcut, py_function_pointer):
+    def registerHotkey(self, shortcut, py_function_pointer):
         """
         Can be used by IDAscope widgets to register hotkeys.
         Uses a global list HOTKEYS of function pointers that link to the desired functionality.

__init__.py

Empty file removed.

config.json

-{
-    "config_path_sep": "\\",
-    "paths": {
-        "idascope_root_dir": "",
-        "semantics_file": "idascope\\data\\semantics.json",
-        "winapi_keywords_file": "idascope\\data\\winapi_keywords.json",
-        "winapi_rootdir": "C:\\WinAPI\\"
-        },
-    "winapi": {
-        "search_hotkey": "ctrl+y",
-        "load_keyword_database": true,
-        "online_enabled": true
-        }
-}

idascope/widgets/WinApiWidget.py

         """
         Register hotkeys with IDAscope in order to ease the use of this widget.
         """
-        self.parent.register_hotkey(self.parent.config.winapi_shortcut, self._navigateToHighlightedIdentifier)
+        self.parent.registerHotkey(self.parent.config.winapi_shortcut, self._navigateToHighlightedIdentifier)
 
     def _createGui(self):
         """