Skip to content

Persist last used IP and Port configuration in conf.json #3

Description

@msalihberk

Currently, every time the C2 server is restarted, the operator has to manually re-enter the listening IP address and port number. We should persist these configuration values so the server remembers the last used settings.

Expected Behavior:

When a user updates the IP (Option 3) or Port (Option 4), the new values should be automatically saved into confs/conf.json.

On application startup, the server should read these keys. If they exist, they should be displayed as the active/default configuration, eliminating the need to set them on every run.

Steps to implement:

  1. Update the conf.json structure to include optional "last_ip" and "last_port" keys.

  2. mainclass/system.py: Create centralized configuration functions to both read from and write to conf.json using json.load() and json.dump(), enabling Shadow.py to automatically fetch saved data on startup and persist updates whenever the IP or Port changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions