mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-07-30 01:50:01 +03:00
Change IP for new request
Bypass Firewall protections that ban IP when you submit some sql injection attempt
This commit is contained in:
parent
263730f4ee
commit
ff9f2f8e40
29
tamper/bypassip.py
Normal file
29
tamper/bypassip.py
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
"""
|
||||||
|
Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/)
|
||||||
|
See the file 'doc/COPYING' for copying permission
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os,sys
|
||||||
|
from lib.core.enums import PRIORITY
|
||||||
|
from lib.core.data import logger
|
||||||
|
from lib.core.common import singleTimeWarnMessage
|
||||||
|
|
||||||
|
__priority__ = PRIORITY.LOWEST
|
||||||
|
|
||||||
|
def dependencies():
|
||||||
|
singleTimeWarnMessage("For use Bypassip Tamper, Unix system is required, and root privileges\n Set --delay time for uniq IP by request")
|
||||||
|
if sys.platform == 'win32':
|
||||||
|
logger.error("Bypass IP Tamper only work in Unix systems")
|
||||||
|
raise SystemExit
|
||||||
|
singleTimeWarnMessage("Initiating Tor..")
|
||||||
|
os.system("service tor restart")
|
||||||
|
|
||||||
|
def tamper(payload, **kwargs):
|
||||||
|
"""
|
||||||
|
Use a different IP address for each request
|
||||||
|
"""
|
||||||
|
logger.debug("Changing Public IP...")
|
||||||
|
os.system("pkill -sighup tor")
|
||||||
|
return payload if payload else payload
|
Loading…
Reference in New Issue
Block a user