Added more CLI options

This commit is contained in:
FireFart
2014-03-01 14:09:05 +01:00
parent c4ca7e471a
commit be672cbcba
5 changed files with 39 additions and 6 deletions

View File

@@ -94,6 +94,10 @@ def help
puts '--wordlist | -w <wordlist> Supply a wordlist for the password bruter and do the brute.'
puts '--threads | -t <number of threads> The number of threads to use when multi-threading requests. (will override the value from conf/browser.conf.json)'
puts '--username | -U <username> Only brute force the supplied username.'
puts '--cache-ttl <cache-ttl> Typhoeus cache TTL'
puts '--request-timeout <request-timeout> Request Timeout'
puts '--connect-timeout <connect-timeout> Connect Timeout'
puts '--max-threads <max-threads> Maximum Threads'
puts '--help | -h This help screen.'
puts '--verbose | -v Verbose output.'
puts

View File

@@ -32,7 +32,11 @@ class WpscanOptions
:debug_output,
:version,
:user_agent,
:random_agent
:random_agent,
:cache_ttl,
:request_timeout,
:connect_timeout,
:max_threads
]
attr_accessor *ACCESSOR_OPTIONS
@@ -138,7 +142,7 @@ class WpscanOptions
!to_h.empty?
end
def random_agent=(a)
def random_agent=(useless)
@user_agent = get_random_user_agent
end
@@ -246,7 +250,11 @@ class WpscanOptions
['--exclude-content-based', GetoptLong::REQUIRED_ARGUMENT],
['--basic-auth', GetoptLong::REQUIRED_ARGUMENT],
['--debug-output', GetoptLong::NO_ARGUMENT],
['--version', GetoptLong::NO_ARGUMENT]
['--version', GetoptLong::NO_ARGUMENT],
['--cache_ttl', GetoptLong::REQUIRED_ARGUMENT],
['--request_timeout', GetoptLong::REQUIRED_ARGUMENT],
['--connect_timeout', GetoptLong::REQUIRED_ARGUMENT],
['--max_threads', GetoptLong::REQUIRED_ARGUMENT]
)
end