@@ -13,10 +13,10 @@ class Metasploit3 < Msf::Auxiliary
1313
1414 def initialize ( info = { } )
1515 super ( update_info ( info ,
16- 'Name' => 'SQLMAP SQL Injection External Module' ,
17- 'Description' => %q{
18- This module launch a sqlmap session.
19- sqlmap is an automatic SQL injection tool developed in Python.
16+ 'Name' => 'Sqlmap SQL Injection External Module' ,
17+ 'Description' => %q{
18+ This module launches a sqlmap session.
19+ Sqlmap is an automatic SQL injection tool developed in Python.
2020 Its goal is to detect and take advantage of SQL injection
2121 vulnerabilities on web applications. Once it detects one
2222 or more SQL injections on the target host, the user can
@@ -28,9 +28,9 @@ def initialize(info = {})
2828 statement, read specific files on the file system and much
2929 more.
3030 } ,
31- 'Author' => [ 'Bernardo Damele A. G. <bernardo.damele[at]gmail.com>' ] ,
32- 'License' => BSD_LICENSE ,
33- 'References' =>
31+ 'Author' => [ 'Bernardo Damele A. G. <bernardo.damele[at]gmail.com>' ] ,
32+ 'License' => BSD_LICENSE ,
33+ 'References' =>
3434 [
3535 [ 'URL' , 'http://sqlmap.sourceforge.net' ] ,
3636 ]
@@ -57,8 +57,16 @@ def wmap_enabled
5757 def run_host ( ip )
5858
5959 sqlmap = File . join ( datastore [ 'SQLMAP_PATH' ] , 'sqlmap.py' )
60- if not File . file? ( sqlmap )
61- print_error ( "The sqlmap script could not be found" )
60+ unless File . file? ( sqlmap )
61+ print_error ( "The sqlmap script '#{ sqlmap } ' could not be found" )
62+ return
63+ end
64+ unless File . readable? ( sqlmap )
65+ print_error ( "The sqlmap script '#{ sqlmap } ' is not readable" )
66+ return
67+ end
68+ unless File . executable? ( sqlmap )
69+ print_error ( "The sqlmap script '#{ sqlmap } ' is not executable" )
6270 return
6371 end
6472
0 commit comments