regex escaping when using variables

This commit is contained in:
Christian Mehlmauer
2012-09-20 22:26:34 +02:00
parent 55996b4c90
commit 48b0e88c95
6 changed files with 11 additions and 9 deletions

View File

@@ -40,7 +40,8 @@ begin
rescue LoadError => e
puts "[ERROR] #{e}"
if missing_gem = e.to_s[%r{ -- ([^\s]+)}, 1]
missing_gem = e.to_s[%r{ -- ([^\s]+)}, 1]
if missing_gem
puts "[TIP] Try to run 'gem install #{missing_gem}' or 'gem install --user-install #{missing_gem}'. If you still get an error, Please see README file or https://github.com/wpscanteam/wpscan"
end
exit(1)