예제 #1
0
    def configure_plugin(self, tv=None):
        """Starts the plugin configuration.

        :param tv: the treeview.
        """
        (path, column) = self.get_cursor()
        if path is None:
            return

        if len(path) == 1:
            plugin_type = self.treestore[path][3]
            desc = self.w3af.plugins.get_plugin_type_desc(plugin_type)
            label = helpers.clean_description(desc)
            self.config_panel.clear(label=label)
        else:
            plugin = self._get_plugin_inst(path)
            longdesc = plugin.get_long_desc()
            longdesc = helpers.clean_description(longdesc)
            self.mainwin.profiles.plugin_config(plugin)
            self.config_panel.config(self, plugin, longdesc)
예제 #2
0
    def configure_plugin(self, tv=None):
        """Starts the plugin configuration.

        :param tv: the treeview.
        """
        (path, column) = self.get_cursor()
        if path is None:
            return

        if len(path) == 1:
            plugin_type = self.treestore[path][3]
            desc = self.w3af.plugins.get_plugin_type_desc(plugin_type)
            label = helpers.clean_description(desc)
            self.config_panel.clear(label=label)
        else:
            plugin = self._get_plugin_inst(path)
            longdesc = plugin.get_long_desc()
            longdesc = helpers.clean_description(longdesc)
            self.mainwin.profiles.plugin_config(plugin)
            self.config_panel.config(self, plugin, longdesc)
예제 #3
0
    def _changed_selection(self, *w):
        """Changed which exploit is selected."""
        exploit = self.get_selected_exploit()
        self.vulnerabs.set_filter(exploit)

        longdesc = exploit.get_long_desc()
        longdesc = helpers.clean_description(longdesc)
        self.config_panel.config(self, exploit, longdesc)

        # un-bold the rest
        for row in self.liststore:
            if row[1] != exploit.pname:
                row[0] = row[1]
예제 #4
0
파일: exploits.py 프로젝트: 0x554simon/w3af
    def _changed_selection(self, *w):
        """Changed which exploit is selected."""
        exploit = self.get_selected_exploit()
        self.vulnerabs.set_filter(exploit)
        
        longdesc = exploit.get_long_desc()
        longdesc = helpers.clean_description(longdesc)
        self.config_panel.config(self, exploit, longdesc)

        # un-bold the rest
        for row in self.liststore:
            if row[1] != exploit.pname:
                row[0] = row[1]
예제 #5
0
    def _makeTable(self, options, prop):
        """Creates the table in which the options are shown.

        :param options: The options to show
        :param prop: The propagation function for this options
        :return: The created table

        For each row, it will put:

            - the option label
            - the configurable widget (textentry, checkbox, etc.)
            - an optional button to get more help (if the help is available)

        Also, the configurable widget gets a tooltip for a small description.
        """
        table = entries.EasyTable(len(options), 3)

        for _, opt in enumerate(options):
            titl = gtk.Label(opt.get_name())
            titl.set_alignment(0.0, 0.5)
            input_widget_klass = entries.wrapperWidgets.get(
                opt.get_type(), entries.TextInput)
            widg = input_widget_klass(self._changedWidget, opt)
            opt.widg = widg
            widg.set_tooltip_text(opt.get_desc())
            if opt.get_help():
                helpbtn = entries.SemiStockButton("", gtk.STOCK_INFO)
                cleanhelp = helpers.clean_description(opt.get_help())
                helpbtn.connect("clicked", self._showHelp, cleanhelp)
            else:
                helpbtn = None
            table.auto_add_row(titl, widg, helpbtn)
            self.widgets_status[widg] = (titl, opt.get_name(),
                                         "<b>%s</b>" % opt.get_name())
            self.propagLabels[widg] = prop
        table.show()
        return table
예제 #6
0
    def _makeTable(self, options, prop):
        """Creates the table in which the options are shown.

        :param options: The options to show
        :param prop: The propagation function for this options
        :return: The created table

        For each row, it will put:

            - the option label
            - the configurable widget (textentry, checkbox, etc.)
            - an optional button to get more help (if the help is available)

        Also, the configurable widget gets a tooltip for a small description.
        """
        table = entries.EasyTable(len(options), 3)

        for _, opt in enumerate(options):
            titl = gtk.Label(opt.get_name())
            titl.set_alignment(0.0, 0.5)
            input_widget_klass = entries.wrapperWidgets.get(opt.get_type(),
                                                            entries.TextInput)
            widg = input_widget_klass(self._changedWidget, opt)
            opt.widg = widg
            widg.set_tooltip_text(opt.get_desc())
            if opt.get_help():
                helpbtn = entries.SemiStockButton("", gtk.STOCK_INFO)
                cleanhelp = helpers.clean_description(opt.get_help())
                helpbtn.connect("clicked", self._showHelp, cleanhelp)
            else:
                helpbtn = None
            table.auto_add_row(titl, widg, helpbtn)
            self.widgets_status[widg] = (titl, opt.get_name(),
                                         "<b>%s</b>" % opt.get_name())
            self.propagLabels[widg] = prop
        table.show()
        return table