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.
|
--no-color Do not use colors in the output.
|
||||||
|
|
||||||
|
--log Save STDOUT to log.txt
|
||||||
|
|
||||||
==WPSCAN EXAMPLES==
|
==WPSCAN EXAMPLES==
|
||||||
|
|
||||||
Do 'non-intrusive' checks...
|
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.
|
--no-color Do not use colors in the output.
|
||||||
|
|
||||||
|
--log Save STDOUT to log.txt
|
||||||
|
|
||||||
#### WPSCAN EXAMPLES
|
#### WPSCAN EXAMPLES
|
||||||
|
|
||||||
Do 'non-intrusive' checks...
|
Do 'non-intrusive' checks...
|
||||||
|
|||||||
@@ -49,11 +49,13 @@ end
|
|||||||
|
|
||||||
# Override for puts to enable logging
|
# Override for puts to enable logging
|
||||||
def puts(o = '')
|
def puts(o = '')
|
||||||
# remove color for logging
|
if @log
|
||||||
if o.respond_to?(:gsub)
|
if o.respond_to?(:gsub)
|
||||||
temp = o.gsub(/\e\[\d+m/, '')
|
temp = o.gsub(/\e\[\d+m/, '') # remove color for logging
|
||||||
File.open(LOG_FILE, 'a+') { |f| f.puts(temp) }
|
File.open(LOG_FILE, 'a+') { |f| f.puts(temp) }
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
super(o)
|
super(o)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ class WpscanOptions
|
|||||||
:enumerate_usernames,
|
:enumerate_usernames,
|
||||||
:enumerate_usernames_range,
|
:enumerate_usernames_range,
|
||||||
:no_color,
|
:no_color,
|
||||||
|
:log,
|
||||||
:proxy,
|
:proxy,
|
||||||
:proxy_auth,
|
:proxy_auth,
|
||||||
:threads,
|
:threads,
|
||||||
@@ -269,7 +270,8 @@ class WpscanOptions
|
|||||||
['--max-threads', GetoptLong::REQUIRED_ARGUMENT],
|
['--max-threads', GetoptLong::REQUIRED_ARGUMENT],
|
||||||
['--batch', GetoptLong::NO_ARGUMENT],
|
['--batch', GetoptLong::NO_ARGUMENT],
|
||||||
['--no-color', GetoptLong::NO_ARGUMENT],
|
['--no-color', GetoptLong::NO_ARGUMENT],
|
||||||
['--cookie', GetoptLong::REQUIRED_ARGUMENT]
|
['--cookie', GetoptLong::REQUIRED_ARGUMENT],
|
||||||
|
['--log', GetoptLong::NO_ARGUMENT]
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -8,11 +8,13 @@ def main
|
|||||||
# delete old logfile, check if it is a symlink first.
|
# delete old logfile, check if it is a symlink first.
|
||||||
File.delete(LOG_FILE) if File.exist?(LOG_FILE) and !File.symlink?(LOG_FILE)
|
File.delete(LOG_FILE) if File.exist?(LOG_FILE) and !File.symlink?(LOG_FILE)
|
||||||
|
|
||||||
banner()
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
wpscan_options = WpscanOptions.load_from_arguments
|
wpscan_options = WpscanOptions.load_from_arguments
|
||||||
|
|
||||||
|
@log = wpscan_options.log
|
||||||
|
|
||||||
|
banner() # called after @log instance variable set
|
||||||
|
|
||||||
unless wpscan_options.has_options?
|
unless wpscan_options.has_options?
|
||||||
# first parameter only url?
|
# first parameter only url?
|
||||||
if ARGV.length == 1
|
if ARGV.length == 1
|
||||||
|
|||||||
Reference in New Issue
Block a user