diff --git a/lib/common_helper.rb b/lib/common_helper.rb index 8175c308..20a6cde5 100644 --- a/lib/common_helper.rb +++ b/lib/common_helper.rb @@ -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(?.*)?\[0m/, '\k') - File.open("log.txt", "a+") { |f| f.puts(temp) } + File.open(LOG_FILE, "a+") { |f| f.puts(temp) } super(o) end \ No newline at end of file diff --git a/wpscan.rb b/wpscan.rb index 9eb91d17..12eb30c9 100755 --- a/wpscan.rb +++ b/wpscan.rb @@ -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()