mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-07-29 17:39:56 +03:00
Merge ff9f2f8e40
into 55a43a837b
This commit is contained in:
commit
80abf1ede4
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