def get_options(self): ''' :return: A list of option objects for this plugin. ''' ol = OptionList() targets = ','.join(str(tar) for tar in cf.cf.get('targets')) d = 'A comma separated list of URLs' o = opt_factory('target', targets, d, 'url_list') ol.add(o) d = 'Target operating system (' + '/'.join( self._operating_systems) + ')' h = 'This setting is here to enhance w3af performance.' # This list "hack" has to be done becase the default value is the one # in the first position on the list tmp_list = self._operating_systems[:] tmp_list.remove(cf.cf.get('target_os')) tmp_list.insert(0, cf.cf.get('target_os')) o = opt_factory('target_os', tmp_list, d, 'combo', help=h) ol.add(o) d = 'Target programming framework (' + '/'.join( self._programming_frameworks) + ')' h = 'This setting is here to enhance w3af performance.' # This list "hack" has to be done because the default value is the one # in the first position on the list tmp_list = self._programming_frameworks[:] tmp_list.remove(cf.cf.get('target_framework')) tmp_list.insert(0, cf.cf.get('target_framework')) o = opt_factory('target_framework', tmp_list, d, 'combo', help=h) ol.add(o) return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' ol = OptionList() d = 'Stream edition expressions' h = ('Stream edition expressions are strings that tell the sed plugin' ' which transformations to apply to the HTTP requests and' ' responses. The sed plugin uses regular expressions, some' ' examples:\n' '\n' ' - qh/User/NotLuser/\n' ' This will make sed search in the the re[q]uest [h]eader' ' for the string User and replace it with NotLuser.\n' '\n' ' - sb/[fF]orm/form\n' ' This will make sed search in the re[s]ponse [b]ody for'\ ' the strings form or Form and replace it with form.\n' '\n' 'Multiple expressions can be specified separated by commas.') o = opt_factory('expressions', self._expressions, d, 'list', help=h) ol.add(o) d = 'Fix the content length header after mangling' o = opt_factory('fix_content_len', self._user_option_fix_content_len, d, 'boolean') ol.add(o) return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' ol = OptionList() d = 'IP address that the webserver will use to receive requests' h = 'w3af runs a webserver to serve the files to the target web application \ when doing remote file inclusions. This setting configures where the webserver\ is going to listen for requests.' o = opt_factory('listen_address', self._listen_address, d, STRING, help=h) ol.add(o) d = 'TCP port that the webserver will use to receive requests' o = opt_factory('listen_port', self._listen_port, d, PORT) ol.add(o) d = 'Use w3af site to test for remote file inclusion' h = 'The plugin can use the w3af site to test for remote file inclusions, which is\ convenient when you are performing a test behind a NAT firewall.' o = opt_factory('use_w3af_site', self._use_w3af_site, d, BOOL, help=h) ol.add(o) return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' ol = OptionList() d = 'IP address that the webserver will use to receive requests' h = 'w3af runs a webserver to serve the files to the target web app'\ ' when doing remote file inclusions. This setting configures on'\ ' what IP address the webserver is going to listen.' o = opt_factory('listen_address', self._listen_address, d, 'ip', help=h) ol.add(o) d = 'Port that the webserver will use to receive requests' h = 'w3af runs a webserver to serve the files to the target web app'\ ' when doing remote file inclusions. This setting configures on'\ ' what IP address the webserver is going to listen.' o = opt_factory('listen_port', self._listen_port, d, 'port', help=h) ol.add(o) d = 'Instead of including a file in a local webserver; include the '\ ' result of exploiting a XSS bug within the same target site.' o = opt_factory('use_xss_bug', self._use_XSS_vuln, d, 'boolean') ol.add(o) return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' ol = OptionList() d = 'When comparing, also compare the content of files.' o = opt_factory('content', self._content, d, BOOL) ol.add(o) d = 'The local directory used in the comparison.' o = opt_factory('local_dir', self._local_dir, d, STRING) ol.add(o) d = 'The remote directory used in the comparison.' o = opt_factory('remote_url_path', self._remote_url_path, d, URL_OPTION_TYPE) ol.add(o) d = 'When comparing content of two files, ignore files with these'\ 'extensions.' o = opt_factory('banned_ext', self._ban_url, d, LIST) ol.add(o) return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' options = [ ('username', self.username, 'string', 'Username for using in the authentication'), ('password', self.password, 'string', 'Password for using in the authentication'), ('username_field', self.username_field, 'string', 'Username HTML field name'), ('password_field', self.password_field, 'string', 'Password HTML field name'), ('data_format', self.data_format, 'string', 'The format for the POST-data or query string'), ('auth_url', self.auth_url, 'url', 'Auth URL - URL for POSTing the authentication information'), ('method', self.method, 'string', 'The HTTP method to use'), ('check_url', self.check_url, 'url', 'Check session URL - URL in which response body check_string will be searched'), ('check_string', self.check_string, 'string', 'String for searching on check_url page to determine if user\ is logged in the web application'), ] ol = OptionList() for o in options: ol.add(opt_factory(o[0], o[1], o[3], o[2])) return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' ol = OptionList() d = 'Wordlist to use in directory bruteforcing process.' o = opt_factory('dir_wordlist', self._dir_list, d, INPUT_FILE) ol.add(o) d = 'Wordlist to use in file bruteforcing process.' o = opt_factory('file_wordlist', self._file_list, d, INPUT_FILE) ol.add(o) d = 'If set to True, this plugin will bruteforce directories.' o = opt_factory('bf_directories', self._bf_directories, d, BOOL) ol.add(o) d = 'If set to True, this plugin will bruteforce files.' o = opt_factory('bf_files', self._bf_files, d, BOOL) ol.add(o) d = 'If set to True, this plugin will bruteforce all directories, not'\ ' only the root directory.' h = 'WARNING: Enabling this will make the plugin send tens of thousands'\ ' of requests.' o = opt_factory('be_recursive', self._be_recursive, d, BOOL, help=h) ol.add(o) return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' opt_list = OptionList() desc = 'Use time delay (sleep() technique)' _help = 'If set to True, w3af will checks insecure eval() usage by' \ ' analyzing of time delay result of script execution.' opt = opt_factory('use_time_delay', self._use_time_delay, desc, 'boolean', help=_help) opt_list.add(opt) desc = 'Use echo technique' _help = 'If set to True, w3af will checks insecure eval() usage by' \ ' grepping result of script execution for test strings.' opt = opt_factory('use_echo', self._use_echo, desc, 'boolean', help=_help) opt_list.add(opt) return opt_list
def get_options(self): ''' :return: A list of option objects for this plugin. ''' options = [ ('username', self.username, 'string', 'Username for using in the authentication process'), ('password', self.password, 'string', 'Password for using in the authentication process'), ('username_field', self.username_field, 'string', 'Username parameter name (ie. "uname" if the HTML looks' ' like <input type="text" name="uname">...)'), ('password_field', self.password_field, 'string', 'Password parameter name (ie. "pwd" if the HTML looks' ' like <input type="password" name="pwd">...)'), ('auth_url', self.auth_url, 'url', 'URL where the username and password will be sent using a POST' ' request'), ('check_url', self.check_url, 'url', 'URL used to verify if the session is still active by looking for' ' the check_string.'), ('check_string', self.check_string, 'string', 'String for searching on check_url page to determine if the' 'current session is active.'), ] ol = OptionList() for o in options: ol.add(opt_factory(o[0], o[1], o[3], o[2], help=o[3])) return ol
def _get_option_objects(self): ''' We get here when the user wants to complete this step of the wizard, and he didn't pressed Previous. :return: The option objects ''' ol = OptionList() return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' ol = OptionList() d = 'Fetch the first "result_limit" results from the bing search' o = opt_factory('result_limit', self._result_limit, d, 'integer') ol.add(o) return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' d1 = 'Wordlist to use in the file name bruteforcing process.' o1 = opt_factory('wordlist', self._wordlist, d1, 'string') ol = OptionList() ol.add(o1) return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' ol = OptionList() d = 'Enables verbose output for the console' o = opt_factory('verbose', self.verbose, d, 'boolean') ol.add(o) return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' ol = OptionList() d = 'CGI-BIN dirs where to search for vulnerable scripts.' h = 'Pykto will search for vulnerable scripts in many places, one of'\ ' them is inside cgi-bin directory. The cgi-bin directory can be'\ ' anything and change from install to install, so its a good idea'\ ' to make this a user setting. The directories should be supplied'\ ' comma separated and with a / at the beggining and one at the end.'\ ' Example: "/cgi/,/cgibin/,/bin/"' o = opt_factory('cgi_dirs', self._cgi_dirs, d, LIST, help=h) ol.add(o) d = 'Admin directories where to search for vulnerable scripts.' h = 'Pykto will search for vulnerable scripts in many places, one of'\ ' them is inside administration directories. The admin directory'\ ' can be anything and change from install to install, so its a'\ ' good idea to make this a user setting. The directories should'\ ' be supplied comma separated and with a / at the beggining and'\ ' one at the end. Example: "/admin/,/adm/"' o = opt_factory('admin_dirs', self._admin_dirs, d, LIST, help=h) ol.add(o) d = 'PostNuke directories where to search for vulnerable scripts.' h = 'The directories should be supplied comma separated and with a'\ 'forward slash at the beginning and one at the end. Example:'\ '"/forum/,/nuke/"' o = opt_factory('nuke_dirs', self._nuke, d, LIST, help=h) ol.add(o) d = 'The path to the nikto scan_databse.db file.' h = 'The default scan database file is fine in most cases.' o = opt_factory('db_file', self._db_file, d, INPUT_FILE, help=h) ol.add(o) d = 'The path to the w3af_scan_databse.db file.' h = 'This is a file which has some extra checks for files that are not'\ ' present in the nikto database.' o = opt_factory('extra_db_file', self._extra_db_file, d, INPUT_FILE, help=h) ol.add(o) d = 'Test all files with all root directories' h = 'Define if we will test all files with all root directories.' o = opt_factory('mutate_tests', self._mutate_tests, d, BOOL, help=h) ol.add(o) return ol
def _get_option_objects(self): ''' :return: A list of options for this question. ''' self._d1 = 'Target URL' o1 = opt_factory('target', 'http://example.com', self._d1, 'url_list') ol = OptionList() ol.add(o1) return ol
def _get_option_objects(self): ''' :return: A list of options for this question. ''' self._d1 = 'Find other virtual hosts using MSN search' o1 = opt_factory(self._d1, False, self._d1, 'boolean') ol = OptionList() ol.add(o1) return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' ol = OptionList() d = 'The name of the output file where the HTTP requests will be saved' o = opt_factory('output_file', self.output_file, d, OUTPUT_FILE) ol.add(o) return ol
def _get_option_objects(self): ''' :return: A list of options for this question. ''' self._d1 = 'Is the target web application reachable from the Internet?' o1 = opt_factory(self._d1, True, self._d1, 'boolean') ol = OptionList() ol.add(o1) return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' ol = OptionList() d = 'File name where this plugin will write to' o = opt_factory('output_file', self._file_name, d, OUTPUT_FILE) ol.add(o) return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' ol = OptionList() d = 'Only use the first wnResults (wordnet results) from each category.' o = opt_factory('wn_results', self._wordnet_results, d, 'integer') ol.add(o) return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' ol = OptionList() d = 'Skip symfony detection and search for the csrf (mis)protection.' o = opt_factory('override', self._override, d, 'boolean') ol.add(o) return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' ol = OptionList() d1 = 'Only search emails for domain of target' o1 = opt_factory('only_target_domain', self._only_target_domain, d1, 'boolean') ol.add(o1) return ol
def __init__(self, parentwidg, w3af, plugin, save_btn, rvrt_btn, overwriter=None): super(OnlyOptions, self).__init__() if overwriter is None: overwriter = {} self.set_spacing(5) self.w3af = w3af self.parentwidg = parentwidg self.widgets_status = {} self.tab_widget = {} self.propagAnyWidgetChanged = helpers.PropagateBuffer( self._changedAnyWidget) self.propagLabels = {} self.saved_successfully = False # options self.options = OptionList() options = plugin.get_options() # let's use the info from the core coreopts = self.w3af.plugins.get_plugin_options( plugin.ptype, plugin.pname) if coreopts is None: coreopts = {} # let's get the real info for opt in options: if opt.get_name() in coreopts: opt.set_value(coreopts[opt.get_name()].get_value_str()) if opt.get_name() in overwriter: opt.set_value(overwriter[opt.get_name()]) self.options.append(opt) # buttons save_btn.connect("clicked", self._save_panel, plugin) save_btn.set_sensitive(False) rvrt_btn.set_sensitive(False) rvrt_btn.connect("clicked", self._revertPanel) self.save_btn = save_btn self.rvrt_btn = rvrt_btn # middle (the heart of the panel) if self.options: tabbox = gtk.HBox() heart = self._createNotebook() tabbox.pack_start(heart, expand=True) tabbox.show() self.pack_start(tabbox, expand=True, fill=False) self.show()
def get_options(self): ''' :return: A list of option objects for this plugin. ''' ol = OptionList() d = 'If two strings have a diff ratio less than diff_ratio, then they'\ ' are really different.' o = opt_factory('diff_ratio', self._diff_ratio, d, 'float') ol.add(o) return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' ol = OptionList() d = 'Apply URL fuzzing to all URLs, including images, videos, zip, etc.' h = 'Don\'t change this unless you read the plugin code.' o = opt_factory('fuzz_images', self._fuzz_images, d, 'boolean', help=h) ol.add(o) return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' ol = OptionList() d = 'Maximum recursion depth for spidering process' h = 'The plugin will spider the archive.org site related to the target' h += ' site with the maximum depth specified in this parameter.' o = opt_factory('max_depth', self._max_depth, d, 'integer', help=h) ol.add(o) return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' ol = OptionList() d = 'Generate a fingerprint file.' h = 'Define if we will generate a fingerprint file based on the' h += ' findings made during this execution.' o = opt_factory('genFpF', self._gen_fp, d, 'boolean', help=h) ol.add(o) return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' ol = OptionList() d = 'Users file to use in bruteforcing' o = opt_factory('usersFile', self._users_file, d, INPUT_FILE) ol.add(o) d = 'Passwords file to use in bruteforcing' o = opt_factory('passwdFile', self._passwd_file, d, INPUT_FILE) ol.add(o) d = 'This indicates if we will use usernames from SVN headers collected by w3af plugins in bruteforce.' o = opt_factory('useSvnUsers', self._use_SVN_users, d, BOOL) ol.add(o) d = 'This indicates if the bruteforce should stop after finding the first correct user and password.' o = opt_factory('stopOnFirst', self._stop_on_first, d, BOOL) ol.add(o) d = 'This indicates if the bruteforce should try password equal user in logins.' o = opt_factory('passEqUser', self._pass_eq_user, d, BOOL) ol.add(o) d = 'This indicates if the bruteforce should try l337 passwords' o = opt_factory('useLeetPasswd', self._l337_p4sswd, d, BOOL) ol.add(o) d = 'This indicates if the bruteforcer should use emails collected by w3af plugins as users.' o = opt_factory('useEmails', self._useMails, d, BOOL) ol.add(o) d = 'This indicates if the bruteforce should use password profiling to collect new passwords.' o = opt_factory('useProfiling', self._use_profiling, d, BOOL) ol.add(o) d = 'This indicates how many passwords from profiling will be used.' o = opt_factory('profilingNumber', self._profiling_number, d, INT) ol.add(o) d = 'Combo of username and passord, file to use in bruteforcing' o = opt_factory('comboFile', self._combo_file, d, INPUT_FILE) ol.add(o) d = 'Separator string used in Combo file to split username and password' o = opt_factory('comboSeparator', self._combo_separator, d, STRING) ol.add(o) return ol
def get_options(self): ''' :return: A list of option objects for this plugin. ''' opt_list = OptionList() desc = 'String equal ratio (0.0 to 1.0)' h = 'Two pages are considered equal if they match in more'\ ' than eq_limit.' opt = opt_factory('eq_limit', self._eq_limit, desc, 'float', help=h) opt_list.add(opt) return opt_list
def get_options(self): ''' :return: A list of option objects for this plugin. ''' ol = OptionList() d1 = 'Destination http port number to analize' o1 = opt_factory('httpPort', self._http_port, d1, INT, help=d1) ol.add(o1) d2 = 'Destination httpS port number to analize' o2 = opt_factory('httpsPort', self._https_port, d2, INT, help=d2) ol.add(o2) return ol