Skip to content

Commit

Permalink
remove deprecated sqlalchemy functions and fix another invalid escape…
Browse files Browse the repository at this point in the history
… sequence (#715)
  • Loading branch information
vinnybod authored Oct 28, 2023
1 parent accf740 commit 4a84a69
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Correct more deprecation warnings for SQLAlchemy and invalid escape sequences (@Vinnybod)
- Added option to start MySQL service on boot to install script (@Cx01N)
- Modernized the Python and IronPython agents with new agent and staging code (@Cx01N)
- Added automatic tasking for sysinfo for stageless agents (@Cx01N)
Expand Down
4 changes: 2 additions & 2 deletions empire/server/core/db/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from sqlalchemy import UniqueConstraint, create_engine, event, text
from sqlalchemy.engine import Engine
from sqlalchemy.exc import OperationalError
from sqlalchemy.orm import sessionmaker
from sqlalchemy.orm import close_all_sessions, sessionmaker

from empire.server.core.db import models
from empire.server.core.db.defaults import (
Expand Down Expand Up @@ -47,7 +47,7 @@ def try_create_engine(engine_url: str, *args, **kwargs) -> Engine:


def reset_db():
SessionLocal.close_all()
close_all_sessions()

if use == "mysql":
cmd = f"DROP DATABASE IF EXISTS {database_config.database_name}"
Expand Down
3 changes: 1 addition & 2 deletions empire/server/core/db/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
text,
)
from sqlalchemy.dialects import mysql
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.ext.hybrid import hybrid_property
from sqlalchemy.orm import Mapped, deferred, relationship
from sqlalchemy.orm import Mapped, declarative_base, deferred, relationship
from sqlalchemy_utc import UtcDateTime, utcnow

from empire.server.core.config import empire_config
Expand Down
2 changes: 1 addition & 1 deletion empire/server/plugins/reverseshell_stager_server.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class Plugin(Plugin):
"Value": "default",
},
"ProxyCreds": {
"Description": "Proxy credentials ([domain\]username:password) to use for request (default, none, or other).",
"Description": "Proxy credentials ([domain\\]username:password) to use for request (default, none, or other).",
"Required": False,
"Value": "default",
},
Expand Down

0 comments on commit 4a84a69

Please sign in to comment.