File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+
3+ """
4+ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/)
5+ See the file 'doc/COPYING' for copying permission
6+ """
7+
8+ from lib .core .enums import PRIORITY
9+ from random import randrange
10+ __priority__ = PRIORITY .NORMAL
11+
12+ def dependencies ():
13+ pass
14+
15+ def generateIP ():
16+ blockOne = randrange (0 , 255 , 1 )
17+ blockTwo = randrange (0 , 255 , 1 )
18+ blockThree = randrange (0 , 255 , 1 )
19+ blockFour = randrange (0 , 255 , 1 )
20+ if blockOne == 10 :
21+ return generateIP ()
22+ elif blockOne == 172 :
23+ return generateIP ()
24+ elif blockOne == 192 :
25+ return generateIP ()
26+ else :
27+ return str (blockOne ) + '.' + str (blockTwo ) + '.' + str (blockThree ) + '.' + str (blockFour )
28+
29+ def tamper (payload , ** kwargs ):
30+ """
31+ Append a HTTP Request Parameter to bypass
32+ WAF (usually application based ) Ban
33+ protection bypass.
34+
35+ Mehmet INCE
36+ """
37+
38+ headers = kwargs .get ("headers" , {})
39+ headers ["X-Forwarded-For" ] = generateIP ()
40+ return payload
You can’t perform that action at this time.
0 commit comments