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

Skip to content

Commit 736327c

Browse files
committed
Added two tamper scripts contributed by Roberto Salgado
1 parent 067354b commit 736327c

3 files changed

Lines changed: 125 additions & 23 deletions

File tree

doc/THANKS

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ Daniele Bellucci <[email protected]>
3939

4040
Sebastian Bittig <[email protected]> and the rest of the team at
4141
r-tec IT Systeme GmbH
42-
for providing with the DB2 fingerprint and enumeration support patch
42+
for contributing the DB2 support initial patch: fingerprint and
43+
enumeration
4344

4445
Anthony Boynes <[email protected]>
4546
for reporting several bugs
@@ -54,7 +55,7 @@ Gianluca Brindisi <[email protected]>
5455
for reporting a couple of bugs
5556

5657
Jack Butler <[email protected]>
57-
for providing me with the sqlmap site favicon
58+
for contributing the sqlmap site favicon
5859

5960
Ulisses Castro <[email protected]>
6061
for reporting a bug
@@ -70,7 +71,7 @@ Cesar Cerrudo <[email protected]>
7071
http://www.argeniss.com/research/TokenKidnapping.pdf
7172

7273
Karl Chen <[email protected]>
73-
for providing with the multithreading patch for the inference
74+
for contributing the initial multi-threading patch for the inference
7475
algorithm
7576

7677
Y P Chien <[email protected]>
@@ -113,9 +114,9 @@ Adam Faheem <[email protected]>
113114
for reporting a few bugs
114115

115116
James Fisher <[email protected]>
116-
for providing me with two very good feature requests
117+
for contributing two very good feature requests
117118
for his great tool too brute force directories and files names on
118-
web/application servers, Dir Buster, http://tinyurl.com/dirbuster
119+
web/application servers, DirBuster, http://tinyurl.com/dirbuster
119120

120121
Jim Forster <[email protected]>
121122
for reporting a bug
@@ -161,7 +162,7 @@ Nico Golde <[email protected]>
161162

162163
Oliver Gruskovnjak <[email protected]>
163164
for reporting a bug
164-
for providing me with a minor patch
165+
for contributing a minor patch
165166

166167
Davide Guerri <[email protected]>
167168
for suggesting an enhancement
@@ -227,7 +228,7 @@ Sven Klemm <[email protected]>
227228
for reporting two minor bugs with PostgreSQL
228229

229230
Anant Kochhar <[email protected]>
230-
for providing me with feedback on the user's manual
231+
for providing with feedback on the user's manual
231232

232233
Alexander Kornbrust <[email protected]>
233234
for reporting a couple of bugs
@@ -239,10 +240,10 @@ Nicolas Krassas <[email protected]>
239240
for reporting a couple of bugs
240241

241242
Oliver Kuckertz <[email protected]>
242-
for providing a minor patch
243+
for contributing a minor patch
243244

244245
Alex Landa <[email protected]>
245-
for providing a patch adding support for XML output
246+
for contributing a patch adding beta support for XML output
246247

247248
Guido Landi <[email protected]>
248249
for reporting a couple of bugs
@@ -262,7 +263,7 @@ John J. Lee <[email protected]> & others
262263
forms when --forms switch is specified
263264

264265
Nico Leidecker <[email protected]>
265-
for providing me with feedback on a few features
266+
for providing with feedback on a few features
266267
for reporting a couple of bugs
267268
for his great tool icmpsh included in sqlmap tree to get a command
268269
prompt via an out-of-band tunnel over ICMP,
@@ -289,8 +290,7 @@ Michael Majchrowicz <[email protected]>
289290
for suggesting a lot of ideas and features
290291

291292
Ferruh Mavituna <[email protected]>
292-
for providing me with ideas on the implementation of a couple of
293-
new features
293+
for sharing ideas on the implementation of a couple of features
294294

295295
David McNab <[email protected]>
296296
for his XMLObject module that allows XML files to be operated on
@@ -300,11 +300,11 @@ Spencer J. McIntyre <[email protected]>
300300
for reporting a minor bug
301301

302302
Ahmad Maulana <[email protected]>
303-
for providing one tamper scripts, halfversionedmorekeywords.py
303+
for contributing one tamper scripts, halfversionedmorekeywords.py
304304

305305
Enrico Milanese <[email protected]>
306-
for reporting a bugs when using (-a) a single line User-Agent file
307-
for providing me with some ideas for the PHP backdoor
306+
for reporting a minor bug
307+
for sharing some ideas for the PHP backdoor
308308

309309
Devon Mitchell <[email protected]>
310310
for reporting a minor bug
@@ -342,7 +342,7 @@ Shaohua Pan <[email protected]>
342342
for suggesting a few features
343343

344344
Antonio Parata <[email protected]>
345-
for providing me with some ideas for the PHP backdoor
345+
for sharing some ideas for the PHP backdoor
346346

347347
Adrian Pastor <[email protected]>
348348
for donating to sqlmap development
@@ -358,7 +358,7 @@ Mark Pilgrim <[email protected]>
358358

359359
Steve Pinkham <[email protected]>
360360
for suggesting a feature
361-
for providing a new sql injection vector (MSSQL time based)
361+
for contributing a new SQL injection vector (MSSQL time-based blind)
362362
for donating to sqlmap development
363363

364364
Adam Pridgen <[email protected]>
@@ -402,6 +402,9 @@ Richard Safran <[email protected]>
402402
Tomoyuki Sakurai <[email protected]>
403403
for submitting to the FreeBSD project the sqlmap 0.5 port
404404

405+
Roberto Salgado <[email protected]>
406+
for contributing two tamper scripts
407+
405408
Pedro Jacques Santos Santiago <[email protected]>
406409
for reporting considerable amount of bugs
407410

@@ -415,7 +418,7 @@ Jorge Santos <[email protected]>
415418
for reporting a minor bug
416419

417420
Sven Schluter <[email protected]>
418-
for providing with a patch for waiting a number of seconds between
421+
for contributing a patch for waiting a number of seconds between
419422
each HTTP request
420423

421424
Ryan Sears <[email protected]>
@@ -433,8 +436,7 @@ Brian Shura <[email protected]>
433436
for reporting a bug
434437

435438
Sumit Siddharth <[email protected]>
436-
for providing me with ideas on the implementation of a couple of
437-
features
439+
for sharing ideas on the implementation of a couple of features
438440

439441
Andre Silva <[email protected]>
440442
for reporting a bug
@@ -458,15 +460,15 @@ Jason Swan <[email protected]>
458460
for suggesting a couple of improvements
459461

460462
Chilik Tamir <[email protected]>
461-
for providing a patch for initial support SOAP requests
463+
for contributing a patch for initial support SOAP requests
462464

463465
Alessandro Tanasi <[email protected]>
464466
for extensively beta-testing sqlmap
465467
for suggesting many features and reporting some bugs
466468
for reviewing the documentation
467469

468470
Andres Tarasco <[email protected]>
469-
for providing me with good feedback
471+
for contributing good feedback
470472

471473
Tom Thumb <[email protected]>
472474
for reporting a major bug
@@ -505,7 +507,7 @@ Carlos Gabriel Vergara <[email protected]>
505507
for suggesting couple of good features
506508

507509
Anthony Zboralski <[email protected]>
508-
for providing me with detailed feedback
510+
for providing with detailed feedback
509511
for reporting a few minor bugs
510512
for donating to sqlmap development
511513

tamper/chardoubleencode.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env python
2+
3+
"""
4+
$Id$
5+
6+
Copyright (c) 2006-2011 sqlmap developers (http://sqlmap.sourceforge.net/)
7+
See the file 'doc/COPYING' for copying permission
8+
"""
9+
10+
import string
11+
12+
from lib.core.enums import PRIORITY
13+
14+
__priority__ = PRIORITY.LOW
15+
16+
def dependencies():
17+
pass
18+
19+
def tamper(payload):
20+
"""
21+
Double url-encodes all characters in a given payload (not processing
22+
already encoded)
23+
24+
Example:
25+
* Input: SELECT FIELD FROM%20TABLE
26+
* Output: %2553%2545%254c%2545%2543%2554%2520%2546%2549%2545%254c%2544%2520%2546%2552%254f%254d%2520%2554%2541%2542%254c%2545
27+
28+
Notes:
29+
* Useful to bypass some weak web application firewalls that do not
30+
double url-decode the request before processing it through their
31+
ruleset
32+
"""
33+
34+
retVal = payload
35+
36+
if payload:
37+
retVal = ""
38+
i = 0
39+
40+
while i < len(payload):
41+
if payload[i] == '%' and (i < len(payload) - 2) and payload[i+1] in string.hexdigits and payload[i+2] in string.hexdigits:
42+
retVal += payload[i:i+3]
43+
i += 3
44+
else:
45+
retVal += '%%25%X' % ord(payload[i])
46+
i += 1
47+
48+
return retVal

tamper/space2pound.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/usr/bin/env python
2+
3+
"""
4+
$Id$
5+
6+
Copyright (c) 2006-2011 sqlmap developers (http://sqlmap.sourceforge.net/)
7+
See the file 'doc/COPYING' for copying permission
8+
"""
9+
10+
import os
11+
import random
12+
import string
13+
14+
from lib.core.common import singleTimeWarnMessage
15+
from lib.core.enums import DBMS
16+
from lib.core.enums import PRIORITY
17+
18+
__priority__ = PRIORITY.LOW
19+
20+
def dependencies():
21+
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s" % (os.path.basename(__file__)[:-3], DBMS.MYSQL))
22+
23+
def tamper(payload):
24+
"""
25+
Replaces space character (' ') with a pound character ('#') followed by
26+
a random string and a new line ('\n')
27+
28+
Example:
29+
* Input: 1 AND 9227=9227
30+
* Output: 1%23PTTmJopxdWJ%0AAND%23cWfcVRPV%0A9227=9227
31+
32+
Requirement:
33+
* MySQL
34+
35+
Tested against:
36+
* MySQL 5.0
37+
38+
Notes:
39+
* Useful to bypass several web application firewalls
40+
"""
41+
42+
retVal = ""
43+
44+
if payload:
45+
for i in xrange(len(payload)):
46+
if payload[i].isspace():
47+
randomStr = ''.join(random.choice(string.ascii_uppercase + string.lowercase) for x in range(random.randint(6, 12)))
48+
retVal += "%%23%s%%0A" % randomStr
49+
else:
50+
retVal += payload[i]
51+
52+
return retVal

0 commit comments

Comments
 (0)