Added a --no-color argument switch
This commit is contained in:
@@ -95,31 +95,13 @@ def version
|
|||||||
REVISION ? "v#{WPSCAN_VERSION}r#{REVISION}" : "v#{WPSCAN_VERSION}"
|
REVISION ? "v#{WPSCAN_VERSION}r#{REVISION}" : "v#{WPSCAN_VERSION}"
|
||||||
end
|
end
|
||||||
|
|
||||||
# our 1337 banner
|
# Define colors
|
||||||
def banner
|
|
||||||
puts '_______________________________________________________________'
|
|
||||||
puts ' __ _______ _____ '
|
|
||||||
puts ' \\ \\ / / __ \\ / ____| '
|
|
||||||
puts ' \\ \\ /\\ / /| |__) | (___ ___ __ _ _ __ '
|
|
||||||
puts ' \\ \\/ \\/ / | ___/ \\___ \\ / __|/ _` | \'_ \\ '
|
|
||||||
puts ' \\ /\\ / | | ____) | (__| (_| | | | |'
|
|
||||||
puts ' \\/ \\/ |_| |_____/ \\___|\\__,_|_| |_|'
|
|
||||||
puts
|
|
||||||
puts bold(' WordPress Security Scanner by the WPScan Team ')
|
|
||||||
# Alignment of the version (w & w/o the Revision)
|
|
||||||
if REVISION
|
|
||||||
puts " Version #{version}"
|
|
||||||
else
|
|
||||||
puts " Version #{version}"
|
|
||||||
end
|
|
||||||
puts ' Sponsored by the RandomStorm Open Source Initiative'
|
|
||||||
puts ' @_WPScan_, @ethicalhack3r, @erwan_lr, pvdl, @_FireFart_'
|
|
||||||
puts '_______________________________________________________________'
|
|
||||||
puts
|
|
||||||
end
|
|
||||||
|
|
||||||
def colorize(text, color_code)
|
def colorize(text, color_code)
|
||||||
|
if $COLORSWITCH
|
||||||
|
"#{text}"
|
||||||
|
else
|
||||||
"\e[#{color_code}m#{text}\e[0m"
|
"\e[#{color_code}m#{text}\e[0m"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def bold(text)
|
def bold(text)
|
||||||
@@ -142,6 +124,29 @@ def blue(text)
|
|||||||
colorize(text, 34)
|
colorize(text, 34)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# our 1337 banner
|
||||||
|
def banner
|
||||||
|
puts '_______________________________________________________________'
|
||||||
|
puts ' __ _______ _____ '
|
||||||
|
puts ' \\ \\ / / __ \\ / ____| '
|
||||||
|
puts ' \\ \\ /\\ / /| |__) | (___ ___ __ _ _ __ '
|
||||||
|
puts ' \\ \\/ \\/ / | ___/ \\___ \\ / __|/ _` | \'_ \\ '
|
||||||
|
puts ' \\ /\\ / | | ____) | (__| (_| | | | |'
|
||||||
|
puts ' \\/ \\/ |_| |_____/ \\___|\\__,_|_| |_|'
|
||||||
|
puts
|
||||||
|
puts ' WordPress Security Scanner by the WPScan Team '
|
||||||
|
# Alignment of the version (w & w/o the Revision)
|
||||||
|
if REVISION
|
||||||
|
puts " Version #{version}"
|
||||||
|
else
|
||||||
|
puts " Version #{version}"
|
||||||
|
end
|
||||||
|
puts ' Sponsored by the RandomStorm Open Source Initiative'
|
||||||
|
puts ' @_WPScan_, @ethicalhack3r, @erwan_lr, pvdl, @_FireFart_'
|
||||||
|
puts '_______________________________________________________________'
|
||||||
|
puts
|
||||||
|
end
|
||||||
|
|
||||||
def xml(file)
|
def xml(file)
|
||||||
Nokogiri::XML(File.open(file)) do |config|
|
Nokogiri::XML(File.open(file)) do |config|
|
||||||
config.noblanks
|
config.noblanks
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ class WpscanOptions
|
|||||||
:enumerate_timthumbs,
|
:enumerate_timthumbs,
|
||||||
:enumerate_usernames,
|
:enumerate_usernames,
|
||||||
:enumerate_usernames_range,
|
:enumerate_usernames_range,
|
||||||
|
:no_color,
|
||||||
:proxy,
|
:proxy,
|
||||||
:proxy_auth,
|
:proxy_auth,
|
||||||
:threads,
|
:threads,
|
||||||
@@ -257,7 +258,8 @@ class WpscanOptions
|
|||||||
['--request-timeout', GetoptLong::REQUIRED_ARGUMENT],
|
['--request-timeout', GetoptLong::REQUIRED_ARGUMENT],
|
||||||
['--connect-timeout', GetoptLong::REQUIRED_ARGUMENT],
|
['--connect-timeout', GetoptLong::REQUIRED_ARGUMENT],
|
||||||
['--max-threads', GetoptLong::REQUIRED_ARGUMENT],
|
['--max-threads', GetoptLong::REQUIRED_ARGUMENT],
|
||||||
['--batch', GetoptLong::NO_ARGUMENT]
|
['--batch', GetoptLong::NO_ARGUMENT],
|
||||||
|
['--no-color', GetoptLong::NO_ARGUMENT]
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user