Esempio n. 1
0
 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
Esempio n. 2
0
 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
Esempio n. 3
0
    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
Esempio n. 4
0
 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
Esempio n. 5
0
    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
Esempio n. 6
0
File: sed.py Progetto: weisst/w3af
 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
Esempio n. 7
0
 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
Esempio n. 8
0
 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
Esempio n. 9
0
    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
Esempio n. 10
0
    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
Esempio n. 11
0
    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
Esempio n. 12
0
    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
Esempio n. 13
0
    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
Esempio n. 14
0
    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
Esempio n. 15
0
    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
Esempio n. 16
0
    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
Esempio n. 17
0
    def get_options(self):
        """
        :return: A list of option objects for this plugin.
        """
        ol = OptionList()

        d = "The name of the output file where the vulnerabilities will be saved"
        o = opt_factory("output_file", self.output_file, d, OUTPUT_FILE)
        ol.add(o)

        return ol
Esempio n. 18
0
    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
Esempio n. 19
0
    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
Esempio n. 20
0
    def get_options(self):
        """
        :return: A list of option objects for this plugin.
        """
        ol = OptionList()

        d1 = 'Fetch the first "result_limit" results from the Bing search'
        o = opt_factory("result_limit", self._result_limit, d1, "integer")
        ol.add(o)

        return ol
Esempio n. 21
0
    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
Esempio n. 22
0
    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
Esempio n. 23
0
    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
Esempio n. 24
0
    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
Esempio n. 25
0
    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
Esempio n. 26
0
    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
Esempio n. 27
0
    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
Esempio n. 28
0
File: hmap.py Progetto: weisst/w3af
    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
Esempio n. 29
0
    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
Esempio n. 30
0
    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
Esempio n. 31
0
    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
Esempio n. 32
0
    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
Esempio n. 33
0
    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
Esempio n. 34
0
    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
Esempio n. 35
0
    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
Esempio n. 36
0
    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
Esempio n. 37
0
    def get_options(self):
        '''
        :return: A list of option objects for this plugin.
        '''
        opt_list = OptionList()

        desc = "Origin HTTP header value"
        _help = "Define value used to specify the 'Origin' HTTP header for"\
                " HTTP request sent to test application behavior"
        opt = opt_factory('origin_header_value',
                          self.origin_header_value, desc, "string", help=_help)
        opt_list.add(opt)

        return opt_list
Esempio n. 38
0
    def get_options(self):
        '''
        :return: A list of option objects for this plugin.
        '''
        ol = OptionList()

        d = 'Extensions that w3af will try to upload through the form.'
        h = 'When finding a form with a file upload, this plugin will try to'\
            ' upload a set of files with the extensions specified here.'
        o = opt_factory('extensions', self._extensions, d, 'list', help=h)

        ol.add(o)

        return ol
Esempio n. 39
0
    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
Esempio n. 40
0
    def get_options(self):
        '''
        :return: A list of option objects for this plugin.
        '''
        d1 = 'Try to identify the remote operating system based on the remote users'
        o1 = opt_factory('identify_os', self._identify_OS, d1, 'boolean')

        d2 = 'Try to identify applications installed remotely using the available users'
        o2 = opt_factory('identify_apps',
                         self._identify_applications, d2, 'boolean')

        ol = OptionList()
        ol.add(o1)
        ol.add(o2)
        return ol
Esempio n. 41
0
    def get_options(self):
        '''
        :return: A list of option objects for this plugin.
        '''
        ol = OptionList()

        d = 'ClamAV daemon socket path'
        h = 'Communication with ClamAV is performed over an Unix socket, in'\
            ' order to be able to use this plugin please start a clamd daemon'\
            ' and provide the unix socket path.'
        # TODO: Maybe I should change this STRING to INPUT_FILE?
        o = opt_factory('clamd_socket', self._clamd_socket, d, STRING, help=h)
        ol.add(o)

        return ol
Esempio n. 42
0
    def get_options(self):
        '''
        :return: A list of option objects for this plugin.
        '''
        ol = OptionList()

        d = 'Wordlist to use in the manifest file name bruteforcing process.'
        o = opt_factory('wordlist', self._wordlist, d, 'string')
        ol.add(o)

        d = 'File extensions to use when brute forcing Gears Manifest files'
        o = opt_factory('manifestExtensions', self._extensions, d, 'list')
        ol.add(o)

        return ol
Esempio n. 43
0
    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._output_file_name, d, OUTPUT_FILE)
        ol.add(o)

        d = 'True if debug information will be appended to the report.'
        o = opt_factory('verbose', self._verbose, d, 'boolean')
        ol.add(o)

        return ol
Esempio n. 44
0
    def get_options(self):
        '''
        :return: A list of option objects for this plugin.
        '''
        ol = OptionList()

        d = 'Wordlist to use in the manifest file name bruteforcing process.'
        o = opt_factory('wordlist', self._wordlist, d, 'string')
        ol.add(o)

        d = 'File extensions to use when brute forcing Gears Manifest files'
        o = opt_factory('manifestExtensions', self._extensions, d, 'list')
        ol.add(o)

        return ol
Esempio n. 45
0
    def get_options(self):
        """
        :return: A list of option objects for this plugin.
        """
        ol = OptionList()

        d = "IP address that the spider_man proxy will use to receive requests"
        o = opt_factory("listen_address", self._listen_address, d, "string")
        ol.add(o)

        d = "Port that the spider_man HTTP proxy server will use to receive requests"
        o = opt_factory("listen_port", self._listen_port, d, "integer")
        ol.add(o)

        return ol
Esempio n. 46
0
    def get_options(self):
        '''
        :return: A list of option objects for this plugin.
        '''
        ol = OptionList()

        d = 'ClamAV daemon socket path'
        h = 'Communication with ClamAV is performed over an Unix socket, in'\
            ' order to be able to use this plugin please start a clamd daemon'\
            ' and provide the unix socket path.'
        # TODO: Maybe I should change this STRING to INPUT_FILE?
        o = opt_factory('clamd_socket', self._clamd_socket, d, STRING, help=h)
        ol.add(o)

        return ol
Esempio n. 47
0
 def get_options(self):
     '''
     :return: A list of option objects for this plugin.
     '''
     ol = OptionList()
     
     d1 = 'Identify persistent cross site scripting vulnerabilities'
     h1 = 'If set to True, w3af will navigate all pages of the target one'\
          ' more time, searching for persistent cross site scripting'\
          ' vulnerabilities.'
     o1 = opt_factory('persistent_xss', self._check_persistent_xss, d1,
                      'boolean', help=h1)
     ol.add(o1)
     
     return ol
Esempio n. 48
0
    def get_options(self):
        '''
        :return: A list of option objects for this plugin.
        '''
        ol = OptionList()

        d = 'IP address that the spider_man proxy will use to receive requests'
        o = opt_factory('listen_address', self._listen_address, d, 'string')
        ol.add(o)

        d = 'Port that the spider_man HTTP proxy server will use to receive requests'
        o = opt_factory('listen_port', self._listen_port, d, 'integer')
        ol.add(o)

        return ol
Esempio n. 49
0
    def _get_option_objects(self):
        '''
        :return: A list of options for this question.
        '''

        d1 = 'Target URL'
        o1 = opt_factory('target', '', d1, 'url_list')

        o2 = opt_factory('target_os', 'unknown', d1, 'string')
        o3 = opt_factory('target_framework', 'unknown', d1, 'string')

        ol = OptionList()
        ol.add(o1)
        ol.add(o2)
        ol.add(o3)

        return ol