Skip to content

Commit 016118c

Browse files
committed
Some more fixes and adjustments before 0.6.1 release.
1 parent 1f3ffc8 commit 016118c

File tree

5 files changed

+28
-34
lines changed

5 files changed

+28
-34
lines changed

doc/ChangeLog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ sqlmap (0.6.1-1) stable; urgency=low
22

33
* Major bug fix to blind SQL injection bisection algorithm to handle an
44
exception;
5-
* Written a Metasploit 3 auxiliary module to run sqlmap;
5+
* Added a Metasploit 3 auxiliary module to run sqlmap;
66
* Implemented possibility to test for and inject also on LIKE
77
statements;
88
* Implemented --start and --stop options to set the first and the last

extra/msfauxmod/README

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,43 +32,42 @@ msf auxiliary(wmap_sqlmap) > show options
3232

3333
Module options:
3434

35-
Name Current Setting Required Description
36-
---- --------------- -------- -----------
37-
BATCH true yes Never ask for user input, use the default behaviour
38-
DATA no The data string to be sent through POST
39-
METHOD GET yes HTTP Method
40-
OPTS --dbs --current-user no The sqlmap options to use
41-
PATH /sqlmap/mysql/get_int.php yes The path/file to test for SQL injection
42-
Proxies no Use a proxy chain
43-
QUERY id=1 no HTTP GET query
44-
RHOSTS 192.168.1.121 yes The target address range or CIDR identifier
45-
RPORT 80 yes The target port
46-
SQLMAP_PATH /home/inquis/software/sqlmap/trunk/sqlmap/sqlmap.py yes The sqlmap >= 0.6.1 full path
47-
SSL false no Use SSL
48-
THREADS 1 yes The number of concurrent threads
49-
VHOST no HTTP server virtual host
35+
Name Current Setting Required Description
36+
---- --------------- -------- -----------
37+
BATCH true yes Never ask for user input, use the default behaviour
38+
BODY no The data string to be sent through POST
39+
METHOD GET yes HTTP Method
40+
OPTS --dbs --current-user no The sqlmap options to use
41+
PATH /sqlmap/mysql/get_int.php yes The path/file to test for SQL injection
42+
Proxies no Use a proxy chain
43+
QUERY id=1 no HTTP GET query
44+
RHOSTS 192.168.1.121 yes The target address range or CIDR identifier
45+
RPORT 80 yes The target port
46+
SQLMAP_PATH /home/inquis/software/sqlmap/trunk/sqlmap/sqlmap.py yes The sqlmap >= 0.6.1 full path
47+
SSL false no Use SSL
48+
THREADS 1 yes The number of concurrent threads
49+
VHOST no HTTP server virtual host
5050

5151
msf auxiliary(wmap_sqlmap) > run
52-
[*] exec: /home/inquis/software/sqlmap/trunk/sqlmap/sqlmap.py -u 'http://192.168.1.121/sqlmap/mysql/get_int.php?id=1' --method GET --dbs --current-user --batch
52+
[*] exec: /home/inquis/software/sqlmap/trunk/sqlmap/sqlmap.py -u 'http://192.168.1.121:80//sqlmap/mysql/get_int.php?id=1' --method GET --dbs --current-user --batch
5353
SQLMAP:
5454
SQLMAP: sqlmap/0.6.1 coded by Bernardo Damele A. G. <bernardo.damele@gmail.com>
5555
SQLMAP: and Daniele Bellucci <daniele.bellucci@gmail.com>
5656
SQLMAP:
57-
SQLMAP: [*] starting at: 01:31:41
57+
SQLMAP: [*] starting at: 16:23:19
5858
SQLMAP:
59-
SQLMAP: [01:31:42] [WARNING] User-Agent parameter 'User-Agent' is not dynamic
59+
SQLMAP: [16:23:20] [WARNING] User-Agent parameter 'User-Agent' is not dynamic
6060
SQLMAP: back-end DBMS: MySQL >= 5.0.0
6161
SQLMAP:
6262
SQLMAP: current user: 'testuser@localhost'
6363
SQLMAP:
64-
SQLMAP: available databases [4]:
64+
SQLMAP: available databases [3]:
6565
SQLMAP: [*] information_schema
6666
SQLMAP: [*] mysql
67-
SQLMAP: [*] privatedb
6867
SQLMAP: [*] test
6968
SQLMAP:
7069
SQLMAP:
71-
SQLMAP: [*] shutting down at: 01:31:44
70+
SQLMAP: [*] shutting down at: 16:23:21
7271
SQLMAP:
7372
[*] Auxiliary module execution completed
7473
msf auxiliary(wmap_sqlmap) >

extra/msfauxmod/wmap_sqlmap.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def initialize(info = {})
3939
OptString.new('METHOD', [ true, "HTTP Method", 'GET' ]),
4040
OptString.new('PATH', [ true, "The path/file to test for SQL injection", 'index.php' ]),
4141
OptString.new('QUERY', [ false, "HTTP GET query", 'id=1' ]),
42-
OptString.new('DATA', [ false, "The data string to be sent through POST", '' ]),
42+
OptString.new('BODY', [ false, "The data string to be sent through POST", '' ]),
4343
OptString.new('OPTS', [ false, "The sqlmap options to use", ' ' ]),
4444
OptPath.new('SQLMAP_PATH', [ true, "The sqlmap >= 0.6.1 full path ", '/sqlmap/sqlmap.py' ]),
4545
OptBool.new('BATCH', [ true, "Never ask for user input, use the default behaviour", 'true' ])
@@ -56,7 +56,7 @@ def run_host(ip)
5656
return
5757
end
5858

59-
data = datastore['DATA']
59+
data = datastore['BODY']
6060
method = datastore['METHOD'].upcase
6161

6262
sqlmap_url = (datastore['SSL'] ? "https" : "http")

lib/request/connect.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,12 @@ def getPage(**kwargs):
9898

9999
requestMsg += " HTTP/1.1"
100100

101+
if cookie:
102+
cookie = urlencode(cookie).replace("%%", "%")
103+
101104
try:
102105
# Perform HTTP request
103-
headers = forgeHeaders(urlencode(cookie).replace("%%", "%"), ua)
106+
headers = forgeHeaders(cookie, ua)
104107
req = urllib2.Request(url, post, headers)
105108
conn = urllib2.urlopen(req)
106109

sqlmap.conf

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,7 @@
22

33
# Target URL.
44
# Example: http://192.168.1.121/sqlmap/mysql/get_int.php?id=1&cat=2
5-
url = http://127.0.0.1/sqlmap/mysql/get_int.php?id=1
6-
#url = http://127.0.0.1/sqlmap/mysql/get_brackets.php?id=1
7-
#url = http://127.0.0.1/sqlmap/mysql/get_str_like.php?id=1
8-
#url = http://127.0.0.1/sqlmap/mysql/get_str_like_par.php?id=1
9-
#url = http://127.0.0.1/sqlmap/mysql/get_str_like_par2.php?id=1
10-
#url = http://127.0.0.1/sqlmap/mysql/get_str_like_par3.php?id=1
11-
#url = http://127.0.0.1/sqlmap/mysql/get_dstr_like_par.php?id=1
12-
#url = http://127.0.0.1/sqlmap/mysql/get_dstr_like_par2.php?id=1
13-
#url = http://127.0.0.1/sqlmap/mysql/get_int_str.php?id=1&name=luther
5+
url =
146

157
# Rather than providing a target url, let Google return target
168
# hosts as result of your Google dork expression. For a list of Google

0 commit comments

Comments
 (0)