Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scientific.py #5665

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tamper/scientific.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"""

import re
import random

from lib.core.enums import PRIORITY

Expand All @@ -29,7 +30,9 @@ def tamper(payload, **kwargs):
"""

if payload:
payload = re.sub(r"[),.*^/|&]", r" 1.e\g<0>", payload)
payload = re.sub(r"(\w+)\(", lambda match: "%s 1.e(" % match.group(1) if not re.search(r"(?i)\A(MID|CAST|FROM|COUNT)\Z", match.group(1)) else match.group(0), payload) # NOTE: MID and CAST don't work for sure
num=random.randint(1,9999999)
payload = re.sub(r"[),.*^/|&]", r" {}.e\g<0>".format(num), payload)
num=random.randint(1,9999999)
payload = re.sub(r"(\w+)\(", lambda match: "%s %d.e(" % (match.group(1),num) if not re.search(r"(?i)\A(MID|CAST|FROM|COUNT)\Z", match.group(1)) else match.group(0), payload) # NOTE: MID and CAST don't work for sure

return payload