From 96d82559cef99b44b581ac8ca6dadc3aafadd034 Mon Sep 17 00:00:00 2001 From: ethicalhack3r Date: Sun, 27 Jan 2013 12:10:10 +0100 Subject: [PATCH] Added symlink check for log file deletion. See Issue #123. --- wpscan.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wpscan.rb b/wpscan.rb index d5b78a26..a8fcbcc8 100755 --- a/wpscan.rb +++ b/wpscan.rb @@ -34,8 +34,8 @@ def output_vulnerabilities(vulns) end end -# delete old logfile -File.delete(LOG_FILE) if File.exist?(LOG_FILE) +# delete old logfile, check if it is a symlink first. +File.delete(LOG_FILE) if File.exist?(LOG_FILE) and !File.symlink?(LOG_FILE) banner()