bugfixing

This commit is contained in:
Christian Mehlmauer
2013-01-13 23:56:30 +01:00
parent 716e07803c
commit 255bbcdac2
2 changed files with 3 additions and 2 deletions

View File

@@ -24,6 +24,7 @@ CACHE_DIR = ROOT_DIR + "/cache"
WPSCAN_LIB_DIR = LIB_DIR + "/wpscan"
WPSTOOLS_LIB_DIR = LIB_DIR + "/wpstools"
UPDATER_LIB_DIR = LIB_DIR + "/updater"
LOG_FILE = ROOT_DIR + "/log.txt"
WPSCAN_VERSION = "2.0"
@@ -150,6 +151,6 @@ end
def puts(o = "")
# remove color for logging
temp = o.gsub(/\[\d+m(?<text>.*)?\[0m/, '\k<text>')
File.open("log.txt", "a+") { |f| f.puts(temp) }
File.open(LOG_FILE, "a+") { |f| f.puts(temp) }
super(o)
end

View File

@@ -35,7 +35,7 @@ def output_vulnerabilities(vulns)
end
# delete old logfile
File.delete("log.txt")
File.delete(LOG_FILE) if File.exist?(LOG_FILE)
banner()