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

Fix various Python 3.12 SyntaxWarning #748

Merged

Conversation

elboulangero
Copy link

Python 3.12 is getting more chatty about some syntax warnings:

/usr/share/powershell-empire/empire/server/data/agent/ironpython_agent.py:1388: SyntaxWarning: invalid escape sequence '\$'
  """
/usr/share/powershell-empire/empire/server/data/module_source/python/privesc/linuxprivchecker.py:336: SyntaxWarning: invalid e
scape sequence '\('
  "cmd": "find / \( -wholename '/home/homedir*' -prune \) -o \( -type d -perm -0002 \) -exec ls -ld '{}' ';' 2>/dev/null | gre
p root",
/usr/share/powershell-empire/empire/server/data/module_source/python/privesc/linuxprivchecker.py:341: SyntaxWarning: invalid e
scape sequence '\('
  "cmd": "find / \( -wholename '/home/homedir*' -prune \) -o \( -type d -perm -0002 \) -exec ls -ld '{}' ';' 2>/dev/null | gre
p -v root",
/usr/share/powershell-empire/empire/server/data/module_source/python/privesc/linuxprivchecker.py:346: SyntaxWarning: invalid e
scape sequence '\('
  "cmd": "find / \( -wholename '/home/homedir/*' -prune -o -wholename '/proc/*' -prune \) -o \( -type f -perm -0002 \) -exec l
s -l '{}' ';' 2>/dev/null",
/usr/share/powershell-empire/empire/server/data/module_source/python/privesc/linuxprivchecker.py:351: SyntaxWarning: invalid e
scape sequence '\('
  "cmd": "find / \( -perm -2000 -o -perm -4000 \) -exec ls -ld {} \; 2>/dev/null",
/usr/share/powershell-empire/empire/server/data/module_source/python/privesc/linuxprivchecker.py:1174: SyntaxWarning: invalid 
escape sequence '\_'
  """

@Cx01N Cx01N self-requested a review September 17, 2024 12:43
HJFR pushed a commit to HJFR/Empire that referenced this pull request Sep 17, 2024
@vinnybod
Copy link

@elboulangero lgtm, thanks! Can you please add an entry to the changelog and then I will merge it.

@elboulangero
Copy link
Author

Done! Thanks for the quick feedback

@vinnybod vinnybod merged commit dbf87fc into BC-SECURITY:main Sep 19, 2024
vinnybod pushed a commit that referenced this pull request Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants