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 19, 2024
1 parent 19baddb commit c151556
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Fixed various Python 3.12 SyntaxWarning

## [5.11.4] - 2024-09-04

### Added
Expand Down
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 c151556

Please sign in to comment.