def __init__(self, w3af): super(ScanRunBody, self).__init__() self.w3af = w3af self.helpChapter = ("Browsing_the_Knowledge_Base", "Site_structure", "Requests_and_Responses") self.connect("switch-page", self.changed_page) # KB Browser # this one does not go inside a scrolled window, because that's handled # in each widget of itself kbbrowser = KBBrowser(w3af) l = gtk.Label(_("KB Browser")) self.append_page(kbbrowser, l) # urlstree, the tree pan = entries.RememberingHPaned(w3af, "pane-urltreegraph") urlsgraph = URLsGraph(w3af) urlstree = URLsTree(w3af, urlsgraph) scrollwin1 = gtk.ScrolledWindow() scrollwin1.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) scrollwin1.add_with_viewport(urlstree) scrollwin1.show() pan.pack1(scrollwin1) pan.pack2(urlsgraph) pan.show() l = gtk.Label("URLs") self.append_page(pan, l) # Request Response navigator httplog = httpLogTab.httpLogTab(w3af) l = gtk.Label(_("Request/Response navigator")) self.append_page(httplog, l) self.show()
def _buildExplVuln(self): """The pane with the exploit list and vulnerabilities tree.""" hpan = entries.RememberingHPaned(self.w3af, "pane-epxlvuln", 300) vpan = entries.RememberingVPaned(self.w3af, "pane-expl-desc", 300) # left-bottom plugin_cfg = ConfigPanel() # left-top exploitlist = ExploitTree(self.w3af, plugin_cfg) scrollwin1 = gtk.ScrolledWindow() scrollwin1.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) scrollwin1.add_with_viewport(exploitlist) scrollwin1.show() vpan.pack1(scrollwin1) vpan.pack2(plugin_cfg) vpan.show() # Right vuln_vbox = gtk.VBox() interac = VulnerabList(self.w3af, exploitlist) exploitlist.vulnerabs = interac scrollwin2 = gtk.ScrolledWindow() scrollwin2.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) scrollwin2.add_with_viewport(interac) scrollwin2.show() add_button = entries.SemiStockButton( "Add...", gtk.STOCK_ADD, "Manually add a new vulnerability") add_button.show() add_button.connect("clicked", self.add_vuln) vuln_vbox.pack_start(scrollwin2) vuln_vbox.pack_start(add_button, False, False) vuln_vbox.show() # pack it all and show hpan.pack1(vpan) hpan.pack2(vuln_vbox) hpan.show() return hpan
def _buildpan(self, profile_description=None): """Builds the panel.""" pan = entries.RememberingHPaned(self.w3af, "pane-plugconfigbody", 250) leftpan = entries.RememberingVPaned(self.w3af, "pane-plugconfigleft", 320) self.config_panel = ConfigPanel(profile_description) # upper left scrollwin1u = gtk.ScrolledWindow() scrollwin1u.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) self.std_plugin_tree = PluginTree(self.w3af, "standard", self.config_panel) scrollwin1u.add(self.std_plugin_tree) scrollwin1u.show() # lower left scrollwin1l = gtk.ScrolledWindow() scrollwin1l.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) self.out_plugin_tree = PluginTree(self.w3af, "output", self.config_panel) scrollwin1l.add(self.out_plugin_tree) scrollwin1l.show() # pack the left part leftpan.pack1(scrollwin1u) leftpan.pack2(scrollwin1l) leftpan.show() # rigth scrollwin2 = gtk.ScrolledWindow() scrollwin2.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) scrollwin2.add_with_viewport(self.config_panel) scrollwin2.show() # pack it all and show pan.pack1(leftpan) pan.pack2(scrollwin2) pan.show() return pan