2
README
2
README
@@ -222,6 +222,8 @@ You should have received a copy of the GNU General Public License along with thi
|
||||
|
||||
--no-color Do not use colors in the output.
|
||||
|
||||
--log Save STDOUT to log.txt
|
||||
|
||||
==WPSCAN EXAMPLES==
|
||||
|
||||
Do 'non-intrusive' checks...
|
||||
|
||||
@@ -223,6 +223,8 @@ Apple Xcode, Command Line Tools and the libffi are needed (to be able to install
|
||||
|
||||
--no-color Do not use colors in the output.
|
||||
|
||||
--log Save STDOUT to log.txt
|
||||
|
||||
#### WPSCAN EXAMPLES
|
||||
|
||||
Do 'non-intrusive' checks...
|
||||
|
||||
@@ -30,7 +30,7 @@ class Browser
|
||||
#
|
||||
# @return [ Browser ]
|
||||
def initialize(options = {})
|
||||
@cache_dir = options[:cache_dir] || CACHE_DIR + '/browser'
|
||||
@cache_dir = options[:cache_dir] || CACHE_DIR + '/browser'
|
||||
|
||||
# sets browser defaults
|
||||
browser_defaults
|
||||
|
||||
@@ -49,11 +49,13 @@ end
|
||||
|
||||
# Override for puts to enable logging
|
||||
def puts(o = '')
|
||||
# remove color for logging
|
||||
if o.respond_to?(:gsub)
|
||||
temp = o.gsub(/\e\[\d+m/, '')
|
||||
File.open(LOG_FILE, 'a+') { |f| f.puts(temp) }
|
||||
if @log
|
||||
if o.respond_to?(:gsub)
|
||||
temp = o.gsub(/\e\[\d+m/, '') # remove color for logging
|
||||
File.open(LOG_FILE, 'a+') { |f| f.puts(temp) }
|
||||
end
|
||||
end
|
||||
|
||||
super(o)
|
||||
end
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ class WpscanOptions
|
||||
:enumerate_usernames,
|
||||
:enumerate_usernames_range,
|
||||
:no_color,
|
||||
:log,
|
||||
:proxy,
|
||||
:proxy_auth,
|
||||
:threads,
|
||||
@@ -269,7 +270,8 @@ class WpscanOptions
|
||||
['--max-threads', GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--batch', GetoptLong::NO_ARGUMENT],
|
||||
['--no-color', GetoptLong::NO_ARGUMENT],
|
||||
['--cookie', GetoptLong::REQUIRED_ARGUMENT]
|
||||
['--cookie', GetoptLong::REQUIRED_ARGUMENT],
|
||||
['--log', GetoptLong::NO_ARGUMENT]
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
@@ -8,11 +8,13 @@ def main
|
||||
# delete old logfile, check if it is a symlink first.
|
||||
File.delete(LOG_FILE) if File.exist?(LOG_FILE) and !File.symlink?(LOG_FILE)
|
||||
|
||||
banner()
|
||||
|
||||
begin
|
||||
wpscan_options = WpscanOptions.load_from_arguments
|
||||
|
||||
@log = wpscan_options.log
|
||||
|
||||
banner() # called after @log instance variable set
|
||||
|
||||
unless wpscan_options.has_options?
|
||||
# first parameter only url?
|
||||
if ARGV.length == 1
|
||||
|
||||
Reference in New Issue
Block a user