You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+.\d+") now emits a SyntaxWarning ("\d" is an invalid escape sequence, use raw strings for regular expression: re.compile(r"\d+.\d+")). In a future Python version, SyntaxError will eventually be raised, instead of SyntaxWarning.
Patch (trivial):
From: Arnaud Rebillout <arnaudr@kali.org>
Date: Mon, 22 Jul 2024 22:53:10 +0200
Subject: Use raw string for regex pattern
---
unicorn.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/unicorn.py b/unicorn.py
index 496bd57..c06aacf 100755
--- a/unicorn.py
+++ b/unicorn.py
@@ -1238,7 +1238,7 @@ try:
if len(sys.argv) > 2 and sys.argv[2] == "crt":
attack_type = "crt"
payload = sys.argv[1]
- elif re.search('\.ps1$', sys.argv[1]) is not None:
+ elif re.search(r'\.ps1$', sys.argv[1]) is not None:
attack_type = "custom_ps1"
ps1path = sys.argv[1]
The text was updated successfully, but these errors were encountered:
With Python 3.12:
This change is documented at https://docs.python.org/3/whatsnew/3.12.html#other-language-changes:
Patch (trivial):
The text was updated successfully, but these errors were encountered: