本文整理汇总了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
示例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
示例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
示例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
示例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
示例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
示例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
示例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
示例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
示例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
示例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
示例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
示例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
示例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
示例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