added basic logging to wpscan
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -6,3 +6,4 @@ coverage
|
|||||||
.idea
|
.idea
|
||||||
.*.swp
|
.*.swp
|
||||||
Gemfile.lock
|
Gemfile.lock
|
||||||
|
log.txt
|
||||||
|
|||||||
@@ -145,3 +145,13 @@ def get_metasploit_url(module_path)
|
|||||||
module_path = module_path.sub(/^\//, "")
|
module_path = module_path.sub(/^\//, "")
|
||||||
"http://www.metasploit.com/modules/#{module_path}"
|
"http://www.metasploit.com/modules/#{module_path}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Override for puts to enable logging
|
||||||
|
def puts(o = "")
|
||||||
|
# remove color for logging
|
||||||
|
temp = o.gsub(/\[\d+m(?<text>.*)?\[0m/, '\k<text>')
|
||||||
|
#temp = o.inspect.gsub(/\\e\[\d+m(?<text>.*)?\\e\[0m/, '\k<text>')
|
||||||
|
File.open("log.txt", "a+") { |f| f.puts(temp) }
|
||||||
|
File.open("log2.txt", "a+") { |f| f.puts(o) }
|
||||||
|
super(o)
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user