Skip to content

Commit 0ce885e

Browse files
committed
adding base64encode tampering script
1 parent df0b451 commit 0ce885e

2 files changed

Lines changed: 34 additions & 1 deletion

File tree

plugins/dbms/db2/syntax.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22

33
"""
4-
$Id$
4+
$Id$
55
66
Copyright (c) 2006-2011 sqlmap developers (http://www.sqlmap.org/)
77
See the file 'doc/COPYING' for copying permission

tamper/base64encode.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env python
2+
3+
"""
4+
$Id$
5+
6+
Copyright (c) 2006-2011 sqlmap developers (http://www.sqlmap.org/)
7+
See the file 'doc/COPYING' for copying permission
8+
"""
9+
10+
import base64
11+
12+
from lib.core.enums import PRIORITY
13+
14+
__priority__ = PRIORITY.LOWEST
15+
16+
def dependencies():
17+
pass
18+
19+
def tamper(payload):
20+
"""
21+
Base64 all characters in a given payload
22+
23+
Example:
24+
* Input: 1' AND SLEEP(5)#
25+
* Output: MScgQU5EIFNMRUVQKDUpIw==
26+
"""
27+
28+
retVal = payload
29+
30+
if payload:
31+
retVal = base64.b64encode(payload)
32+
33+
return retVal

0 commit comments

Comments
 (0)