@@ -41,6 +41,7 @@ def vulnTest():
4141 ("-h" , ("to see full list of options run with '-hh'" ,)),
4242 ("--dependencies --deprecations" , ("sqlmap requires" , "third-party library" , "~DeprecationWarning:" )),
4343 ("-u <url> --data='reflect=1' --flush-session --wizard" , ("Please choose:" , "back-end DBMS: SQLite" , "current user is DBA: True" , "banner: '3." )),
44+ ("-u <url> --data='code=1' --code=200 --technique=B --banner --flush-session" , ("back-end DBMS: SQLite" , "banner: '3." )),
4445 (u"-c <config> --flush-session --smart --roles --statements --hostname --privileges --sql-query=\" SELECT '\u0161 u\u0107 uraj'\" --technique=U" , (u": '\u0161 u\u0107 uraj'" , "on SQLite it is not possible" )),
4546 (u"-u <url> --flush-session --sql-query=\" SELECT '\u0161 u\u0107 uraj'\" --technique=B --no-escape --string=luther --unstable" , (u": '\u0161 u\u0107 uraj'" ,)),
4647 ("--dummy" , ("all tested parameters do not appear to be injectable" , "does not seem to be injectable" , "there is not at least one" , "~might be injectable" )),
@@ -51,15 +52,15 @@ def vulnTest():
5152 ("<piped> -r <request> -l <log> --flush-session --banner --technique=B" , ("banner: '3." , "STDIN" )),
5253 ("-l <log> --flush-session --keep-alive --skip-waf -v 5 --technique=U --union-from=users --banner --parse-errors" , ("banner: '3." , "ORDER BY term out of range" , "~xp_cmdshell" , "Connection: keep-alive" )),
5354 ("-l <log> --offline --banner -v 5" , ("banner: '3." , "~[TRAFFIC OUT]" )),
54- ("-u <url > --flush-session --data='id=1&_=Eewef6oh' --chunked --randomize=_ --random-agent --banner" , ("fetched random HTTP User-Agent header value" , "Parameter: id (POST)" , "Type: boolean-based blind" , "Type: time-based blind" , "Type: UNION query" , "banner: '3." )),
55+ ("-u <base > --flush-session --data='id=1&_=Eewef6oh' --chunked --randomize=_ --random-agent --banner" , ("fetched random HTTP User-Agent header value" , "Parameter: id (POST)" , "Type: boolean-based blind" , "Type: time-based blind" , "Type: UNION query" , "banner: '3." )),
5556 ("-u <base64> -p id --base64=id --data='base64=true' --flush-session --banner --technique=B" , ("banner: '3." ,)),
5657 ("-u <base64> -p id --base64=id --data='base64=true' --flush-session --tables --technique=U" , (" users " ,)),
5758 ("-u <url> --flush-session --banner --technique=B --not-string 'no results'" , ("banner: '3." ,)),
5859 ("-u <url> --flush-session --banner --technique=B --first=1 --last=2" , ("banner: '3.'" ,)),
5960 ("-u <url> --flush-session --encoding=ascii --forms --crawl=2 --threads=2 --banner" , ("total of 2 targets" , "might be injectable" , "Type: UNION query" , "banner: '3." )),
60- ("-u <url > --flush-session --data='{\" id\" : 1}' --banner" , ("might be injectable" , "3 columns" , "Payload: {\" id\" " , "Type: boolean-based blind" , "Type: time-based blind" , "Type: UNION query" , "banner: '3." )),
61- ("-u <url > --flush-session -H 'Foo: Bar' -H 'Sna: Fu' --data='<root><param name=\" id\" value=\" 1*\" /></root>' --union-char=1 --mobile --answers='smartphone=3' --banner --smart -v 5" , ("might be injectable" , "Payload: <root><param name=\" id\" value=\" 1" , "Type: boolean-based blind" , "Type: time-based blind" , "Type: UNION query" , "banner: '3." , "Nexus" , "Sna: Fu" , "Foo: Bar" )),
62- ("-u <url > --flush-session --method=PUT --data='a=1& b=2&c=3&id=1 ' --skip-static --har=<tmp> --dump -T users --start=1 --stop=2" , ("might be injectable" , "Parameter: id (PUT)" , "Type: boolean-based blind" , "Type: time-based blind" , "Type: UNION query" , "2 entries" )),
61+ ("-u <base > --flush-session --data='{\" id\" : 1}' --banner" , ("might be injectable" , "3 columns" , "Payload: {\" id\" " , "Type: boolean-based blind" , "Type: time-based blind" , "Type: UNION query" , "banner: '3." )),
62+ ("-u <base > --flush-session -H 'Foo: Bar' -H 'Sna: Fu' --data='<root><param name=\" id\" value=\" 1*\" /></root>' --union-char=1 --mobile --answers='smartphone=3' --banner --smart -v 5" , ("might be injectable" , "Payload: <root><param name=\" id\" value=\" 1" , "Type: boolean-based blind" , "Type: time-based blind" , "Type: UNION query" , "banner: '3." , "Nexus" , "Sna: Fu" , "Foo: Bar" )),
63+ ("-u <base > --flush-session --method=PUT --data='a=1;id=1; b=2' --param-del='; ' --skip-static --har=<tmp> --dump -T users --start=1 --stop=2" , ("might be injectable" , "Parameter: id (PUT)" , "Type: boolean-based blind" , "Type: time-based blind" , "Type: UNION query" , "2 entries" )),
6364 ("-u <url> --flush-session -H 'id: 1*' --tables -t <tmp>" , ("might be injectable" , "Parameter: id #1* ((custom) HEADER)" , "Type: boolean-based blind" , "Type: time-based blind" , "Type: UNION query" , " users " )),
6465 ("-u <url> --flush-session --banner --invalid-logical --technique=B --predict-output --test-filter='OR boolean' --tamper=space2dash" , ("banner: '3." , " LIKE " )),
6566 ("-u <url> --flush-session --cookie=\" PHPSESSID=d41d8cd98f00b204e9800998ecf8427e; id=1*; id2=2\" --tables --union-cols=3" , ("might be injectable" , "Cookie #1* ((custom) HEADER)" , "Type: boolean-based blind" , "Type: time-based blind" , "Type: UNION query" , " users " )),
@@ -121,7 +122,8 @@ def _thread():
121122 open (request , "w+" ).write (content )
122123 open (log , "w+" ).write ('<port>%d</port><request base64="true"><![CDATA[%s]]></request>' % (port , encodeBase64 (content , binary = False )))
123124
124- url = "http://%s:%d/?id=1" % (address , port )
125+ base = "http://%s:%d/" % (address , port )
126+ url = "%s?id=1" % base
125127 direct = "sqlite3://%s" % database
126128
127129 content = open (os .path .abspath (os .path .join (os .path .dirname (__file__ ), ".." , ".." , "sqlmap.conf" ))).read ().replace ("url =" , "url = %s" % url )
@@ -131,7 +133,7 @@ def _thread():
131133 status = '%d/%d (%d%%) ' % (count , len (TESTS ), round (100.0 * count / len (TESTS )))
132134 dataToStdout ("\r [%s] [INFO] complete: %s" % (time .strftime ("%X" ), status ))
133135
134- for tag , value in (("<url>" , url ), ("<direct>" , direct ), ("<request>" , request ), ("<log>" , log ), ("<config>" , config ), ("<base64>" , url .replace ("id=1" , "id=MZ=%3d" ))):
136+ for tag , value in (("<url>" , url ), ("<base>" , base ), ( "< direct>" , direct ), ("<request>" , request ), ("<log>" , log ), ("<config>" , config ), ("<base64>" , url .replace ("id=1" , "id=MZ=%3d" ))):
135137 options = options .replace (tag , value )
136138
137139 cmd = "%s \" %s\" %s --batch --non-interactive --debug" % (sys .executable , os .path .abspath (os .path .join (os .path .dirname (__file__ ), ".." , ".." , "sqlmap.py" )), options )
0 commit comments