From 0ce885e6e68f8b484189df94ce2d412fc298725b Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 21 Nov 2011 12:47:23 +0000 Subject: [PATCH] adding base64encode tampering script --- plugins/dbms/db2/syntax.py | 2 +- tamper/base64encode.py | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 tamper/base64encode.py diff --git a/plugins/dbms/db2/syntax.py b/plugins/dbms/db2/syntax.py index 8831d82a0..b3ae5323d 100644 --- a/plugins/dbms/db2/syntax.py +++ b/plugins/dbms/db2/syntax.py @@ -1,7 +1,7 @@ #!/usr/bin/env python """ -$Id$ +$Id$ Copyright (c) 2006-2011 sqlmap developers (http://www.sqlmap.org/) See the file 'doc/COPYING' for copying permission diff --git a/tamper/base64encode.py b/tamper/base64encode.py new file mode 100644 index 000000000..5657e3232 --- /dev/null +++ b/tamper/base64encode.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python + +""" +$Id$ + +Copyright (c) 2006-2011 sqlmap developers (http://www.sqlmap.org/) +See the file 'doc/COPYING' for copying permission +""" + +import base64 + +from lib.core.enums import PRIORITY + +__priority__ = PRIORITY.LOWEST + +def dependencies(): + pass + +def tamper(payload): + """ + Base64 all characters in a given payload + + Example: + * Input: 1' AND SLEEP(5)# + * Output: MScgQU5EIFNMRUVQKDUpIw== + """ + + retVal = payload + + if payload: + retVal = base64.b64encode(payload) + + return retVal