当前位置: 首页>>代码示例>>Python>>正文


Python option_list.OptionList类代码示例

本文整理汇总了Python中core.data.options.option_list.OptionList的典型用法代码示例。如果您正苦于以下问题:Python OptionList类的具体用法?Python OptionList怎么用?Python OptionList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了OptionList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_options

 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
开发者ID:Adastra-thw,项目名称:w3af,代码行数:30,代码来源:sed.py

示例2: get_options

 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
开发者ID:Adastra-thw,项目名称:w3af,代码行数:29,代码来源:generic.py

示例3: get_options

 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
开发者ID:HamzaKo,项目名称:w3af,代码行数:28,代码来源:detailed.py

示例4: get_options

 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
开发者ID:Adastra-thw,项目名称:w3af,代码行数:9,代码来源:shared_hosting.py

示例5: get_options

    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
开发者ID:Adastra-thw,项目名称:w3af,代码行数:10,代码来源:console.py

示例6: get_options

    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
开发者ID:Adastra-thw,项目名称:w3af,代码行数:10,代码来源:content_negotiation.py

示例7: get_options

    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
开发者ID:Adastra-thw,项目名称:w3af,代码行数:25,代码来源:web_diff.py

示例8: _get_option_objects

    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
开发者ID:Adastra-thw,项目名称:w3af,代码行数:11,代码来源:question_infrastructure_1.py

示例9: _get_option_objects

    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
开发者ID:Adastra-thw,项目名称:w3af,代码行数:11,代码来源:question_infrastructure_4.py

示例10: get_options

    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
开发者ID:HamzaKo,项目名称:w3af,代码行数:11,代码来源:finger_bing.py

示例11: get_options

    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
开发者ID:HamzaKo,项目名称:w3af,代码行数:11,代码来源:csv_file.py

示例12: get_options

    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
开发者ID:HamzaKo,项目名称:w3af,代码行数:11,代码来源:symfony.py

示例13: get_options

    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
开发者ID:R41nB0W,项目名称:w3af,代码行数:11,代码来源:xml_file.py

示例14: get_options

    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
开发者ID:Adastra-thw,项目名称:w3af,代码行数:11,代码来源:export_requests.py

示例15: get_options

    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
开发者ID:Adastra-thw,项目名称:w3af,代码行数:11,代码来源:wordnet.py


注:本文中的core.data.options.option_list.OptionList类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。