當前位置: 首頁>>代碼示例>>Python>>正文


Python OptionList.add方法代碼示例

本文整理匯總了Python中core.data.options.option_list.OptionList.add方法的典型用法代碼示例。如果您正苦於以下問題:Python OptionList.add方法的具體用法?Python OptionList.add怎麽用?Python OptionList.add使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在core.data.options.option_list.OptionList的用法示例。


在下文中一共展示了OptionList.add方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: get_options

# 需要導入模塊: from core.data.options.option_list import OptionList [as 別名]
# 或者: from core.data.options.option_list.OptionList import add [as 別名]
 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,代碼行數:30,代碼來源:detailed.py

示例2: get_options

# 需要導入模塊: from core.data.options.option_list import OptionList [as 別名]
# 或者: from core.data.options.option_list.OptionList import add [as 別名]
    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
開發者ID:Adastra-thw,項目名稱:w3af,代碼行數:32,代碼來源:dir_file_bruter.py

示例3: get_options

# 需要導入模塊: from core.data.options.option_list import OptionList [as 別名]
# 或者: from core.data.options.option_list.OptionList import add [as 別名]
 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,代碼行數:32,代碼來源:sed.py

示例4: get_options

# 需要導入模塊: from core.data.options.option_list import OptionList [as 別名]
# 或者: from core.data.options.option_list.OptionList import add [as 別名]
 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,代碼行數:31,代碼來源:generic.py

示例5: get_options

# 需要導入模塊: from core.data.options.option_list import OptionList [as 別名]
# 或者: from core.data.options.option_list.OptionList import add [as 別名]
 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,代碼行數:11,代碼來源:shared_hosting.py

示例6: get_options

# 需要導入模塊: from core.data.options.option_list import OptionList [as 別名]
# 或者: from core.data.options.option_list.OptionList import add [as 別名]
    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,代碼行數:12,代碼來源:content_negotiation.py

示例7: get_options

# 需要導入模塊: from core.data.options.option_list import OptionList [as 別名]
# 或者: from core.data.options.option_list.OptionList import add [as 別名]
    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,代碼行數:12,代碼來源:console.py

示例8: get_options

# 需要導入模塊: from core.data.options.option_list import OptionList [as 別名]
# 或者: from core.data.options.option_list.OptionList import add [as 別名]
    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,代碼行數:13,代碼來源:csv_file.py

示例9: get_options

# 需要導入模塊: from core.data.options.option_list import OptionList [as 別名]
# 或者: from core.data.options.option_list.OptionList import add [as 別名]
    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,代碼行數:13,代碼來源:finger_bing.py

示例10: get_options

# 需要導入模塊: from core.data.options.option_list import OptionList [as 別名]
# 或者: from core.data.options.option_list.OptionList import add [as 別名]
    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,代碼行數:13,代碼來源:export_requests.py

示例11: get_options

# 需要導入模塊: from core.data.options.option_list import OptionList [as 別名]
# 或者: from core.data.options.option_list.OptionList import add [as 別名]
    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,代碼行數:13,代碼來源:symfony.py

示例12: _get_option_objects

# 需要導入模塊: from core.data.options.option_list import OptionList [as 別名]
# 或者: from core.data.options.option_list.OptionList import add [as 別名]
    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,代碼行數:13,代碼來源:question_infrastructure_1.py

示例13: get_options

# 需要導入模塊: from core.data.options.option_list import OptionList [as 別名]
# 或者: from core.data.options.option_list.OptionList import add [as 別名]
    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,代碼行數:13,代碼來源:xml_file.py

示例14: get_options

# 需要導入模塊: from core.data.options.option_list import OptionList [as 別名]
# 或者: from core.data.options.option_list.OptionList import add [as 別名]
    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,代碼行數:13,代碼來源:wordnet.py

示例15: _get_option_objects

# 需要導入模塊: from core.data.options.option_list import OptionList [as 別名]
# 或者: from core.data.options.option_list.OptionList import add [as 別名]
    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,代碼行數:13,代碼來源:question_infrastructure_4.py


注:本文中的core.data.options.option_list.OptionList.add方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。