Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 887adfc

Browse files
committed
Minor adjustments to extra/ libraries
1 parent c398353 commit 887adfc

4 files changed

Lines changed: 44 additions & 34 deletions

File tree

doc/THANKS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ Davide Guerri <[email protected]>
116116
David Guimaraes <[email protected]>
117117
for reporting a few bugs
118118

119+
Chris Hall <[email protected]>
120+
for coding the prettyprint.py library
121+
119122
Kristian Erik Hermansen <[email protected]>
120123
for reporting a bug
121124
for donating to sqlmap development

extra/cloak/__init__.py

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
11
#!/usr/bin/env python
22

33
"""
4-
$Id$
4+
cloak.py - Simple file encryption/compression utility
5+
Copyright (C) 2010 Miroslav Stampar, Bernardo Damele A. G.
6+
57
6-
This file is part of the sqlmap project, http://sqlmap.sourceforge.net.
8+
This library is free software; you can redistribute it and/or
9+
modify it under the terms of the GNU Lesser General Public
10+
License as published by the Free Software Foundation; either
11+
version 2.1 of the License, or (at your option) any later version.
712
8-
Copyright (c) 2007-2010 Bernardo Damele A. G. <[email protected]>
9-
Copyright (c) 2006 Daniele Bellucci <[email protected]>
13+
This library is distributed in the hope that it will be useful,
14+
but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16+
Lesser General Public License for more details.
1017
11-
sqlmap is free software; you can redistribute it and/or modify it under
12-
the terms of the GNU General Public License as published by the Free
13-
Software Foundation version 2 of the License.
14-
15-
sqlmap is distributed in the hope that it will be useful, but WITHOUT ANY
16-
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17-
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18-
details.
19-
20-
You should have received a copy of the GNU General Public License along
21-
with sqlmap; if not, write to the Free Software Foundation, Inc., 51
22-
Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18+
You should have received a copy of the GNU Lesser General Public
19+
License along with this library; if not, write to the Free Software
20+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2321
"""
2422

2523
pass

extra/cloak/cloak.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,5 @@ def main():
8888
sys.stdout.write(data)
8989
sys.stdout.close()
9090

91-
9291
if __name__ == '__main__':
93-
main()
92+
main()
Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
1-
require 'msf/core'
1+
##
2+
# $Id$
3+
##
4+
5+
##
6+
# This file is part of the Metasploit Framework and may be subject to
7+
# redistribution and commercial restrictions. Please see the Metasploit
8+
# Framework web site for more information on licensing and terms of use.
9+
# http://metasploit.com/framework/
10+
##
211

12+
require 'msf/core'
313

414
class Metasploit3 < Msf::Auxiliary
515

616
include Msf::Exploit::Remote::HttpClient
717
include Msf::Auxiliary::WMAPScanUniqueQuery
818
include Msf::Auxiliary::Scanner
919

10-
1120
def initialize(info = {})
12-
super(update_info(info,
21+
super(update_info(info,
1322
'Name' => 'SQLMAP SQL Injection External Module',
1423
'Description' => %q{
15-
This module launch a sqlmap session.
24+
This module launch a sqlmap session.
1625
sqlmap is an automatic SQL injection tool developed in Python.
1726
Its goal is to detect and take advantage of SQL injection
1827
vulnerabilities on web applications. Once it detects one
@@ -25,48 +34,48 @@ def initialize(info = {})
2534
statement, read specific files on the file system and much
2635
more.
2736
},
28-
'Author' => [ 'bernardo.damele [at] gmail.com', 'daniele.bellucci [at] gmail.com' ],
37+
'Author' => [ 'Bernardo Damele A. G. <bernardo.damele[at]gmail.com>' ],
2938
'License' => BSD_LICENSE,
30-
'Version' => '$Revision$',
39+
'Version' => '$Revision: 9212 $',
3140
'References' =>
3241
[
3342
['URL', 'http://sqlmap.sourceforge.net'],
3443
]
3544
))
36-
45+
3746
register_options(
3847
[
3948
OptString.new('METHOD', [ true, "HTTP Method", 'GET' ]),
4049
OptString.new('PATH', [ true, "The path/file to test for SQL injection", 'index.php' ]),
4150
OptString.new('QUERY', [ false, "HTTP GET query", 'id=1' ]),
42-
OptString.new('BODY', [ false, "The data string to be sent through POST", '' ]),
51+
OptString.new('DATA', [ false, "The data string to be sent through POST", '' ]),
4352
OptString.new('OPTS', [ false, "The sqlmap options to use", ' ' ]),
44-
OptPath.new('SQLMAP_PATH', [ true, "The sqlmap >= 0.6.1 full path ", '/sqlmap/sqlmap.py' ]),
53+
OptPath.new('SQLMAP_PATH', [ true, "The sqlmap >= 0.6.1 full path ", '/sqlmap/sqlmap.py' ]),
4554
OptBool.new('BATCH', [ true, "Never ask for user input, use the default behaviour", true ])
4655
], self.class)
4756
end
48-
57+
4958
# Modify to true if you have sqlmap installed.
5059
def wmap_enabled
5160
false
5261
end
5362

5463
# Test a single host
5564
def run_host(ip)
56-
57-
sqlmap = datastore['SQLMAP_PATH']
58-
65+
66+
sqlmap = datastore['SQLMAP_PATH']
67+
5968
if not sqlmap
6069
print_error("The sqlmap script could not be found")
6170
return
6271
end
6372

64-
data = datastore['BODY']
73+
data = datastore['DATA']
6574
method = datastore['METHOD'].upcase
6675

6776
sqlmap_url = (datastore['SSL'] ? "https" : "http")
68-
sqlmap_url += "://" + self.target_host + ":" + datastore['RPORT']
69-
sqlmap_url += "/" + datastore['PATH']
77+
sqlmap_url += "://" + wmap_target_host + ":" + wmap_target_port
78+
sqlmap_url += "/" + datastore['PATH']
7079

7180
if method == "GET"
7281
sqlmap_url += '?' + datastore['QUERY']
@@ -93,3 +102,4 @@ def run_host(ip)
93102
end
94103

95104
end
105+

0 commit comments

Comments
 (0)