From 4ac2611a569048110da5d8b8fb9bb484ec3186aa Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Fri, 9 Mar 2012 12:09:19 +0000 Subject: [PATCH] Added another tamper script --- tamper/apostrophenullencode.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tamper/apostrophenullencode.py diff --git a/tamper/apostrophenullencode.py b/tamper/apostrophenullencode.py new file mode 100644 index 000000000..4029f2ee1 --- /dev/null +++ b/tamper/apostrophenullencode.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python + +""" +$Id$ + +Copyright (c) 2006-2012 sqlmap developers (http://www.sqlmap.org/) +See the file 'doc/COPYING' for copying permission +""" + +from lib.core.enums import PRIORITY + +__priority__ = PRIORITY.LOWEST + +def dependencies(): + pass + +def tamper(payload): + """ + Replaces apostrophe character with its illegal double unicode counterpart + + Example: + * Input: AND '1'='1' + * Output: AND %00%271%00%27=%00%271%00%27 + """ + + retVal = payload + + if payload: + retVal = payload.replace('\'', '%00%27') + + return retVal