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

Skip to content

Commit 759b720

Browse files
committed
documentation update
1 parent 415d5f2 commit 759b720

3 files changed

Lines changed: 90 additions & 78 deletions

File tree

doc/README.sgml

Lines changed: 88 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ Options:
429429
--method=METHOD HTTP method, GET or POST (default GET)
430430
--data=DATA Data string to be sent through POST
431431
--cookie=COOKIE HTTP Cookie header
432-
--cookie-urlencode URL-encode generated cookie injections
432+
--cookie-urlencode URL Encode generated cookie injections
433433
--drop-set-cookie Ignore Set-Cookie header from response
434434
--user-agent=AGENT HTTP User-Agent header
435435
-a USERAGENTSFILE Load a random HTTP User-Agent header from file
@@ -868,7 +868,52 @@ back-end DBMS: MySQL >= 5.0.0
868868

869869
<p>
870870
Option: <tt>-r</tt>
871-
#TODO
871+
872+
<p>
873+
One of the possibilities of sqlmap is loading of complete HTTP
874+
request packet stored in textual file. That way you can skip usage of
875+
bunch of other options.
876+
877+
<p>
878+
Sample content of a HTTP request file:
879+
880+
<tscreen><verb>
881+
POST /sqlmap/mysql/post_int.php HTTP/1.1
882+
Host: 157.247.180.194
883+
User-Agent: Mozilla/4.0
884+
885+
id=1
886+
</verb></tscreen>
887+
888+
<p>
889+
Example usage:
890+
891+
<tscreen><verb>
892+
893+
$ python sqlmap.py -r request.txt
894+
895+
[...]
896+
[11:54:27] [INFO] parsing HTTP request from 'request.txt'
897+
[...]
898+
[11:52:21] [INFO] testing if POST parameter 'id' is dynamic
899+
[11:52:22] [INFO] confirming that POST parameter 'id' is dynamic
900+
[11:52:22] [INFO] POST parameter 'id' is dynamic
901+
[11:52:22] [INFO] testing sql injection on POST parameter 'id' with 0 parenthesis
902+
[11:52:22] [INFO] testing unescaped numeric injection on POST parameter 'id'
903+
[11:52:22] [INFO] confirming unescaped numeric injection on POST parameter 'id'
904+
[11:52:22] [INFO] POST parameter 'id' is unescaped numeric injectable with 0 parenthesis
905+
[11:52:22] [INFO] testing if User-Agent parameter 'User-Agent' is dynamic
906+
[11:52:22] [WARNING] User-Agent parameter 'User-Agent' is not dynamic
907+
[11:52:22] [INFO] testing for parenthesis on injectable parameter
908+
[11:52:22] [INFO] the injectable parameter requires 0 parenthesis
909+
[11:52:22] [INFO] testing MySQL
910+
[11:52:22] [INFO] confirming MySQL
911+
[11:52:22] [INFO] retrieved: 3
912+
[11:52:22] [INFO] the back-end DBMS is MySQL
913+
web server operating system: Linux Ubuntu 8.04 (Hardy Heron)
914+
web application technology: PHP 5.2.4, Apache 2.2.8
915+
back-end DBMS: MySQL >= 5.0.0
916+
</verb></tscreen>
872917

873918

874919
<sect2>Process Google dork results as target urls
@@ -1108,18 +1153,24 @@ values that you provided? [Y/n]
11081153
</verb></tscreen>
11091154

11101155

1111-
<sect2>URL-encode generated cookie injections
1156+
<sect2>URL Encode generated cookie injections
11121157

11131158
<p>
11141159
Option: <tt>-</tt><tt>-cookie-urlencode</tt>
1115-
#TODO
1160+
1161+
sqlmap by default doesn't URL Encode generated cookie injections, but you can force it by
1162+
using this flag. Cookie content encoding is not declared by standard in any way, so it's
1163+
solely the matter of web application's behaviour.
11161164

11171165

11181166
<sect2>Ignore <tt>Set-Cookie</tt> header from response
11191167

11201168
<p>
11211169
Option: <tt>-</tt><tt>-drop-set-cookie</tt>
1122-
#TODO
1170+
1171+
Sometimes there is a need for ignoring any session cookie(s) returned by web server and/or
1172+
usage of only the custom supplied value (see option <tt>-</tt><tt>-cookie</tt>). In such cases
1173+
option <tt>-</tt><tt>-drop-set-cookie</tt> should be used.
11231174

11241175

11251176
<sect2>HTTP <tt>User-Agent</tt> header
@@ -1317,7 +1368,21 @@ Connection: close
13171368

13181369
<p>
13191370
Option: <tt>-</tt><tt>-auth-cert</tt>
1320-
#TODO
1371+
1372+
This option should be used in cases when the web server requires proper user's
1373+
certificate for authentication. Supplied values should be in the form: <tt>key_file,
1374+
cert_file</tt>, where <tt>key_file</tt> should be the name of a PEM formatted file that
1375+
contains your private key, while <tt>cert_file</tt> should be the name for a PEM formatted
1376+
certificate chain file.
1377+
1378+
<p>
1379+
Example:
1380+
1381+
<tscreen><verb>
1382+
$ python sqlmap.py -u "http://www.example.com/process.php?id=1" \
1383+
--auth-cert key.pem,cert.pem
1384+
[...]
1385+
</verb></tscreen>
13211386

13221387

13231388
<sect2>HTTP proxy
@@ -1451,7 +1516,10 @@ Option: <tt>-</tt><tt>-scope</tt>
14511516

14521517
<p>
14531518
Option: <tt>-</tt><tt>-ignore-proxy</tt>
1454-
#TODO
1519+
1520+
This option should be used in cases like when you want to run sqlmap
1521+
against the machine inside a local area network skipping default
1522+
usage of a system wide set HTTP proxy server.
14551523

14561524

14571525
<sect1>Injection
@@ -5186,85 +5254,29 @@ Option: <tt>-</tt><tt>-gpage</tt>
51865254
#TODO
51875255

51885256

5189-
<sect2>Update Microsoft SQL Server XML signature file
5257+
<sect2>Update <tt>sqlmap</tt>
51905258

51915259
<p>
51925260
Option: <tt>-</tt><tt>-update</tt>
5193-
#TODO
51945261

51955262
<p>
5196-
5197-
It is possible to update sqlmap to the latest stable version available on
5198-
project's <htmlurl url="http://sourceforge.net/projects/sqlmap/files/"
5199-
name="SourceForge File List page"> by running it with the
5200-
<tt>-</tt><tt>-update</tt> option.
5263+
Using this option you can update the program to the latest version
5264+
directly from source repository together with the latest
5265+
Microsoft SQL Server XML versions file from Chip Andrews'
5266+
<htmlurl url="http://www.sqlsecurity.com/FAQs/SQLServerVersionDatabase/tabid/63/Default.aspx"
5267+
name="SQLSecurity.com site">.
52015268

52025269
<tscreen><verb>
5203-
$ python sqlmap.py --update -v 4
5204-
5205-
[hh:mm:53] [DEBUG] initializing the configuration
5206-
[hh:mm:53] [DEBUG] initializing the knowledge base
5207-
[hh:mm:53] [DEBUG] cleaning up configuration parameters
5208-
[hh:mm:53] [DEBUG] setting the HTTP method to perform HTTP requests through
5209-
[hh:mm:53] [DEBUG] creating HTTP requests opener object
5210-
[hh:mm:53] [INFO] updating sqlmap
5211-
[hh:mm:53] [DEBUG] checking if a new version is available
5212-
[hh:mm:55] [TRAFFIC OUT] HTTP request:
5213-
GET /doc/VERSION HTTP/1.1
5214-
Host: sqlmap.sourceforge.net
5215-
User-agent: sqlmap/0.8 (http://sqlmap.sourceforge.net)
5216-
Connection: close
5270+
$ python sqlmap.py --update
52175271

5218-
[hh:mm:55] [TRAFFIC IN] HTTP response (OK - 200):
5219-
Date: Fri, 01 Aug 2008 14:50:55 GMT
5220-
Server: Apache/1.3.33 (Unix) PHP/4.3.10
5221-
Last-Modified: Thu, 31 Jul 2008 11:10:19 GMT
5222-
ETag: "9fcc53e-4-48919d9b"
5223-
Accept-Ranges: bytes
5224-
Content-Length: 4
5225-
Connection: close
5226-
Content-Type: text/plain
5227-
X-Pad: avoid browser bug
5228-
5229-
[hh:mm:55] [INFO] you are already running sqlmap latest stable version
5230-
[hh:mm:55] [INFO] updating Microsoft SQL Server XML versions file
5231-
[hh:mm:56] [TRAFFIC OUT] HTTP request:
5232-
GET /FAQs/SQLServerVersionDatabase/tabid/63/Default.aspx HTTP/1.1
5233-
Host: www.sqlsecurity.com
5234-
User-agent: sqlmap/0.8 (http://sqlmap.sourceforge.net)
5235-
Cookie: .ASPXANONYMOUS=dvus03cqyQEkAAAANDI0M2QzZmUtOGRkOS00ZDQxLThhMTUtN2ExMWJiNWVjN2My0;
5236-
language=en-US
5237-
Connection: close
5238-
5239-
[hh:mm:02] [TRAFFIC IN] HTTP response (OK - 200):
5240-
Cache-Control: private
5241-
Connection: close
5242-
Date: Fri, 01 Aug 2008 14:50:50 GMT
5243-
Content-Length: 167918
5244-
Content-Type: text/html; charset=utf-8
5245-
Server: Microsoft-IIS/6.0
5246-
X-Powered-By: ASP.NET
5247-
X-AspNet-Version: 2.0.50727
5248-
Set-Cookie: .ASPXANONYMOUS=dvus03cqyQEkAAAANDI0M2QzZmUtOGRkOS00ZDQxLThhMTUtN2ExMWJiNWVjN2My0;
5249-
expires=Fri, 10-Oct-2008 01:30:49 GMT; path=/; HttpOnly
5250-
Set-Cookie: language=en-US; path=/; HttpOnly
5251-
5252-
[hh:mm:02] [INFO] no new Microsoft SQL Server versions since the last update
5253-
[hh:mm:02] [DEBUG] parsing XML queries file
5272+
[...]
5273+
[hh:mm:27] [INFO] updating sqlmap to latest development version from the subversion repository
5274+
[hh:mm:28] [INFO] updated to the latest revision 1356
5275+
[hh:mm:29] [INFO] updating Microsoft SQL Server XML versions file
5276+
[hh:mm:33] [INFO] no new Microsoft SQL Server versions since the last update
5277+
[...]
52545278
</verb></tscreen>
52555279

5256-
<p>
5257-
As you can see, sqlmap first checks if a new stable version is available,
5258-
and then in case it is, downloads it, unzips it and updates the Microsoft SQL
5259-
Server XML versions file from Chip Andrews'
5260-
<htmlurl url="http://www.sqlsecurity.com/FAQs/SQLServerVersionDatabase/tabid/63/Default.aspx"
5261-
name="SQLSecurity.com site">.
5262-
5263-
<p>
5264-
Note that the default configuration file <tt>sqlmap.conf</tt> is backupped
5265-
to <tt>sqlmap.conf.bak</tt> each time a new stable version is available and
5266-
your copy is outdated.
5267-
52685280

52695281
<sect2>Save options on a configuration INI file
52705282

lib/parse/cmdline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ def cmdLineParser():
407407
help="Use google dork results from specified page number")
408408

409409
miscellaneous.add_option("--update", dest="updateAll", action="store_true",
410-
help="Update Microsoft SQL Server XML signature file")
410+
help="Update sqlmap")
411411

412412
miscellaneous.add_option("--save", dest="saveCmdline", action="store_true",
413413
help="Save options on a configuration INI file")

sqlmap.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ eta = False
408408
# Default: 1
409409
googlePage = 1
410410

411-
# Update Microsoft SQL Server XML signature file.
411+
# Update sqlmap.
412412
# Valid: True or False
413413
updateAll = False
414414

0 commit comments

Comments
 (0)