mirror of
https://github.com/Ekultek/Zeus-Scanner.git
synced 2026-03-11 08:55:51 +00:00
minor edit to skip safe characters in encoding
This commit is contained in:
parent
0162ee134d
commit
008ee37362
1 changed files with 7 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# coding=utf-8
|
||||
|
||||
|
||||
def tamper(payload, **kwargs):
|
||||
def tamper(payload, safe="%&=-_", **kwargs):
|
||||
encodings = {
|
||||
" ": "%20", "!": "%21", '"': "%22", "#": "%23", "$": "%24", "%": "%25", "&": "%26", "'": "%27",
|
||||
"(": "%28", ")": "%29", "*": "%2A", "+": "%2B", ",": "%2C", "-": "%2D", ".": "%2E", "/": "%2F",
|
||||
|
|
@ -35,8 +35,11 @@ def tamper(payload, **kwargs):
|
|||
if isinstance(payload, unicode):
|
||||
payload = str(payload)
|
||||
for char in payload:
|
||||
try:
|
||||
retval += encodings[char]
|
||||
except KeyError:
|
||||
if char not in safe:
|
||||
try:
|
||||
retval += encodings[char]
|
||||
except KeyError:
|
||||
retval += char
|
||||
else:
|
||||
retval += char
|
||||
return retval
|
||||
|
|
|
|||
Loading…
Reference in a new issue