From 0d0f2863af55eb5e368f7f7305258870a0263e40 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 9 Jun 2011 09:38:07 +0000 Subject: [PATCH] adding one more tamper script --- extra/odict/odict.py | 2 -- tamper/appendnullbyte.py | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 tamper/appendnullbyte.py diff --git a/extra/odict/odict.py b/extra/odict/odict.py index 5cac3d1e2..18bf9c295 100644 --- a/extra/odict/odict.py +++ b/extra/odict/odict.py @@ -22,8 +22,6 @@ __author__ = ('Nicola Larosa ,' __docformat__ = "restructuredtext en" -__revision__ = '$Id$' - __version__ = '0.2.2' __all__ = ['OrderedDict', 'SequenceOrderedDict'] diff --git a/tamper/appendnullbyte.py b/tamper/appendnullbyte.py new file mode 100644 index 000000000..a433ef6ac --- /dev/null +++ b/tamper/appendnullbyte.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python + +""" +$Id$ + +Copyright (c) 2006-2011 sqlmap developers (http://sqlmap.sourceforge.net/) +See the file 'doc/COPYING' for copying permission +""" + +import string + +from lib.core.enums import PRIORITY + +__priority__ = PRIORITY.LOWEST + +def tamper(payload): + """ + Appends encoded null byte character at the end of payload + Example: "AND 1=1" becomes "AND 1=1%00" + Reference: http://projects.webappsec.org/w/page/13246949/Null-Byte-Injection + """ + + retVal = payload + + if payload: + retVal = "%s%%00" % payload + + return retVal