From a95475d3f95e264b0988ef84152b68e889007511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=9C=E6=96=B9=E6=9C=89=E9=B1=BC=E5=90=8D=E4=B8=BA?= =?UTF-8?q?=E5=92=B8?= Date: Tue, 26 Mar 2024 23:19:16 +0800 Subject: [PATCH] Update scientific.py use random scientific num --- tamper/scientific.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tamper/scientific.py b/tamper/scientific.py index 9b0ecf776..20099cb01 100644 --- a/tamper/scientific.py +++ b/tamper/scientific.py @@ -6,6 +6,7 @@ See the file 'LICENSE' for copying permission """ import re +import random from lib.core.enums import PRIORITY @@ -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