class Meta: label = 'baseplugin' stacked_on = 'scan' argument_formatter = common.SmartFormatter epilog = template('help_epilog.mustache')
def stats(self): plugins = plugins_get() version = version_get() print( template('stats_plugin.mustache', { 'version': version, 'plugins': plugins }))
class Meta: label = 'scan' description = 'cms scanning functionality.' stacked_on = 'base' stacked_type = 'nested' epilog = "\n" argument_formatter = common.SmartFormatter epilog = template("help_epilog.mustache") arguments = [ (['-u', '--url'], dict(action='store', help='')), (['-U', '--url-file'], dict(action='store', help='''A file which contains a list of URLs.''')), (['--enumerate', '-e'], dict(action='store', help='R|' + common.template('help_enumerate.mustache'), choices=common.enum_list(common.Enumerate), default='a')), (['--method'], dict(action='store', help='R|' + common.template('help_method.mustache'), choices=common.enum_list(common.ScanningMethod))), (['--verb'], dict(action='store', help="""The HTTP verb to use; the default option is head, except for version enumeration requests, which are always get because we need to get the hash from the file's contents""", default='head', choices=common.enum_list(common.Verb))), (['--number', '-n'], dict(action='store', help='''Number of words to attempt from the plugin/theme dictionary. Default is 1000. Use -n 'all' to use all available.''', default=BasePluginInternal.NUMBER_DEFAULT)), (['--plugins-base-url'], dict(action='store', help="""Location where the plugins are stored by the CMS. Default is the CMS' default location. First %%s in string will be replaced with the url, and the second one will be replaced with the module name. E.g. '%%ssites/all/modules/%%s/'""")), (['--themes-base-url'], dict(action='store', help='''Same as above, but for themes.''')), (['--timeout'], dict(action='store', help="""How long to wait for an HTTP response before timing out (in seconds).""", default=45, type=int)), (['--timeout-host'], dict(action='store', help="""Maximum time to spend per host (in seconds).""", default=1800, type=int)), (['--no-follow-redirects'], dict(action='store_false', help="""Prevent the following of redirects.""", dest="follow_redirects", default=True)), (['--host'], dict(action='store', help="""Override host header with this value.""", default=None)), (['--massscan-override'], dict(action='store_true', help="""Overrides defaults with defaults convenient for mass-scanning of hosts.""", default=False)), (['--threads', '-t'], dict(action='store', help='''Number of threads. Default 4.''', default=4, type=int)), (['--threads-identify'], dict(action='store', help='''Number of threads used for CMS identification.''', default=None, type=int)), (['--threads-scan'], dict(action='store', help='''Threads used for mass scanning.''', default=None, type=int)), (['--threads-enumerate'], dict(action='store', help='''Threads used for plugin enumeration.''', default=None, type=int)), (['--output', '-o'], dict(action='store', help='Output format', choices=common.enum_list(common.ValidOutputs), default='standard')), (['--debug-requests'], dict(action='store_true', help="""Prints every HTTP request made and the response returned from the server for debugging purposes. Disables threading and loading bars.""", default=False)), (['--error-log'], dict(action='store', help='''A file to store the errors on.''', default=None)), (['--resume'], dict(action='store_true', help='''Resume the url_file scan as of the last known scanned url. Must be used in conjunction with --error-log.''', default=None)), ]
def stats(self): plugins = plugins_get() version = version_get() print(template("stats_plugin.mustache", {"version": version, "plugins": plugins}))