Skip to content

Commit

Permalink
Merge pull request EmpireProject#777 from BC-SECURITY/release/5.9.2-p…
Browse files Browse the repository at this point in the history
…rivate

v5.9.2 into private-main
  • Loading branch information
vinnybod committed Jan 31, 2024
2 parents e08e2f0 + 49ff3a3 commit 0aa8c03
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
6 changes: 5 additions & 1 deletion 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]

## [5.9.2] - 2024-01-31

### Fixed

- Fixed the ForeignKeyConstraint error when refreshing a directory that contains a file with a linked Download (@Vinnybod)
Expand Down Expand Up @@ -764,7 +766,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated shellcoderdi to newest version (@Cx01N)
- Added a Nim launcher (@Hubbl3)

[Unreleased]: https://github.com/BC-SECURITY/Empire-Sponsors/compare/v5.9.1...HEAD
[Unreleased]: https://github.com/BC-SECURITY/Empire-Sponsors/compare/v5.9.2...HEAD

[5.9.2]: https://github.com/BC-SECURITY/Empire-Sponsors/compare/v5.9.1...v5.9.2

[5.9.1]: https://github.com/BC-SECURITY/Empire-Sponsors/compare/v5.9.0...v5.9.1

Expand Down
2 changes: 1 addition & 1 deletion empire/server/common/empire.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

from . import agents, credentials, listeners, stagers

VERSION = "5.9.1 BC Security Fork"
VERSION = "5.9.2 BC Security Fork"

log = logging.getLogger(__name__)

Expand Down
13 changes: 9 additions & 4 deletions empire/test/test_agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def test_update_dir_list(session_local, models, agent, main: MainMenu):


def test_update_dir_list_with_existing_joined_file(
session_local, models, agent, main: MainMenu
session_local, models, agent, main: MainMenu, empire_config
):
with session_local.begin() as db:
message = {
Expand Down Expand Up @@ -286,7 +286,7 @@ def test_update_dir_list_with_existing_joined_file(
download_path = Path("empire/test/avatar.png")
file.downloads.append(
models.Download(
location=download_path.absolute(),
location=str(download_path.absolute()),
filename=download_path.name,
size=download_path.stat().st_size,
)
Expand All @@ -299,8 +299,13 @@ def test_update_dir_list_with_existing_joined_file(
db, agent, "C:\\Users\\vinnybod\\Desktop\\test.txt"
)

assert file.id != file2.id
assert len(file2.downloads) == 0
if empire_config.database.use != "sqlite":
# sqlite reuses ids and apparently doesn't cascade the delete to the
# association table. This can result in files being linked to the wrong
# download after refreshing a directory for sqlite.
assert file.id != file2.id
assert len(file2.downloads) == 0

assert file.name == file2.name

db.query(models.AgentFile).delete()
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "empire-bc-security-fork"
version = "5.9.1"
version = "5.9.2"
description = ""
authors = ["BC Security <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 0aa8c03

Please sign in to comment.