Skip to content

Commit

Permalink
Fix various Python 3.12 SyntaxWarning
Browse files Browse the repository at this point in the history
  • Loading branch information
elboulangero committed Sep 17, 2024
1 parent 19baddb commit 4d77c17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion empire/server/data/agent/ironpython_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@ def run_command(self, command, cmdargs=None):
if (-not $($o.User)) {
$o = 'N/A'
} else {
$o = "$($o.Domain)\$($o.User)"
$o = "$($o.Domain)\\$($o.User)"
}
} catch {
$o = 'N/A'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,22 +333,22 @@ def search_file_perms():

fdperms = {
"WWDIRSROOT": {
"cmd": "find / \( -wholename '/home/homedir*' -prune \) -o \( -type d -perm -0002 \) -exec ls -ld '{}' ';' 2>/dev/null | grep root",
"cmd": r"find / \( -wholename '/home/homedir*' -prune \) -o \( -type d -perm -0002 \) -exec ls -ld '{}' ';' 2>/dev/null | grep root",
"msg": "World Writeable Directories for User/Group 'Root'",
"results": [],
},
"WWDIRS": {
"cmd": "find / \( -wholename '/home/homedir*' -prune \) -o \( -type d -perm -0002 \) -exec ls -ld '{}' ';' 2>/dev/null | grep -v root",
"cmd": r"find / \( -wholename '/home/homedir*' -prune \) -o \( -type d -perm -0002 \) -exec ls -ld '{}' ';' 2>/dev/null | grep -v root",
"msg": "World Writeable Directories for Users other than Root",
"results": [],
},
"WWFILES": {
"cmd": "find / \( -wholename '/home/homedir/*' -prune -o -wholename '/proc/*' -prune \) -o \( -type f -perm -0002 \) -exec ls -l '{}' ';' 2>/dev/null",
"cmd": r"find / \( -wholename '/home/homedir/*' -prune -o -wholename '/proc/*' -prune \) -o \( -type f -perm -0002 \) -exec ls -l '{}' ';' 2>/dev/null",
"msg": "World Writable Files",
"results": [],
},
"SUID": {
"cmd": "find / \( -perm -2000 -o -perm -4000 \) -exec ls -ld {} \; 2>/dev/null",
"cmd": r"find / \( -perm -2000 -o -perm -4000 \) -exec ls -ld {} \; 2>/dev/null",
"msg": "SUID/SGID Files and Directories",
"results": [],
},
Expand Down Expand Up @@ -1171,7 +1171,7 @@ def write(self, message):
bigline = "======================================================================================="
print(bigline)
print(
"""
r"""
__ _ ____ _ ________ __
/ / (_)___ __ ___ __/ __ \_____(_) __/ ____/ /_ ___ _____/ /_____ _____
/ / / / __ \/ / / / |/_/ /_/ / ___/ / | / / / / __ \/ _ \/ ___/ //_/ _ \/ ___/
Expand Down

0 comments on commit 4d77c17

Please sign in to comment.