예제 #1
0
    def checkStackChange(self, index):

        if index == gcommon.VIEW_SUMMARY:
            self.createcase.showSummary()

        elif index == gcommon.CASE_WINDOW:

            # stuff to get case analysis rolling..
            self.clearTrees()

            # When the tab swtiches after case creation
            if not hasattr(self, "case_obj"):
                set_case_info(self.created_dir, self)

            # Add the tempalte api to each
            for tab in self.analysis_tabs:

                tab.tapi = tutil.templateutil(self.case_obj) 
                tab.tm   = tmmod.TemplateManager()
                tab.rm   = rpmod.report_manager(self)
                tab.gf   = gf.generate_forms(self)
                tab.rh   = rf.report_handler(self, tab.active_tabs, tab.rm, tab.gf)
                tab.gcommon = gcommon

            # ....
            # export menu
            self.connect( self.actionExport_Plugins, SIGNAL("triggered(bool)"), self.plugintab.rh.saveAllPlugins) 
            self.connect( self.actionExport_Searches, SIGNAL("triggered(bool)"), self.searchtab.rh.saveAllSearches)
            self.connect( self.actionExport_Paths, SIGNAL("triggered(bool)"), self.searchtab.rh.saveAllPaths)
            self.connect( self.actionExport_Plugins_and_Searches, SIGNAL("triggered(bool)"), self.searchtab.rh.savePluginsSearches)

            self.file_drawn = 1
            self.filetab.draw()
예제 #2
0
    def attach_template_methods(self, mod, case_obj):
                
        tree = case_obj.tree
        tapi = tutil.templateutil(case_obj)

        # lets templates call report directly
        tapi.report = self.report

        # lets templates set the global timestamp
        tapi.set_timestamp = self.set_timestamp

        # attach methods from templaute utils
        for attr in  tutil.templateutil.__dict__:
            if attr[0:2] != "__":
                method_addr = getattr(tapi, attr)
                setattr(mod, attr, method_addr)
예제 #3
0
    def checkStackChange(self, index):

        if index == gcommon.VIEW_SUMMARY:
            self.createcase.showSummary()

        elif index == gcommon.CASE_WINDOW:

            # stuff to get case analysis rolling..
            self.clearTrees()

            # When the tab swtiches after case creation
            if not hasattr(self, "case_obj"):
                set_case_info(self.created_dir, self)

            # Add the tempalte api to each
            for tab in self.analysis_tabs:

                tab.tapi = tutil.templateutil(self.case_obj)
                tab.tm = tmmod.TemplateManager()
                tab.rm = rpmod.report_manager(self)
                tab.gf = gf.generate_forms(self)
                tab.rh = rf.report_handler(self, tab.active_tabs, tab.rm,
                                           tab.gf)
                tab.gcommon = gcommon

            # ....
            # export menu
            self.connect(self.actionExport_Plugins, SIGNAL("triggered(bool)"),
                         self.plugintab.rh.saveAllPlugins)
            self.connect(self.actionExport_Searches, SIGNAL("triggered(bool)"),
                         self.searchtab.rh.saveAllSearches)
            self.connect(self.actionExport_Paths, SIGNAL("triggered(bool)"),
                         self.searchtab.rh.saveAllPaths)
            self.connect(self.actionExport_Plugins_and_Searches,
                         SIGNAL("triggered(bool)"),
                         self.searchtab.rh.savePluginsSearches)

            self.file_drawn = 1
            self.filetab.draw()