Skip to content

decouple manx from core#3242

Merged
uruwhy merged 33 commits into
masterfrom
VIRTS-5033
Feb 6, 2026
Merged

decouple manx from core#3242
uruwhy merged 33 commits into
masterfrom
VIRTS-5033

Conversation

@uruwhy

@uruwhy uruwhy commented Jan 9, 2026

Copy link
Copy Markdown
Contributor

Description

  • migrate manx's c_session.py to core code at app/contacts/utility/c_tcp_session.py (separate PR in manx plugin will remove the file as it will no longer be used)
  • rename Session class from manx's c_session.py to TCPSession in case future classes are made for sessions based on other protocols (UDP, ICMP, etc)
  • refactor session code to use read/write wrappers rather than accessing the internal reader/writer members of the Session class
  • refactor session refresh to avoid deleting elements while iterating through a list
  • better handling of empty/malformed response from session

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Ran caldera without manx plugin folder and confirmed it started fine.
Ran caldera with manx plugin and interacted with 1 and 2 sessions

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@uruwhy uruwhy requested a review from jlklos January 13, 2026 00:01
@sonarqubecloud

sonarqubecloud Bot commented Feb 4, 2026

Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

jlklos
jlklos previously approved these changes Feb 4, 2026

@jlklos jlklos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New code was tested by running Caldera with and without the Manx plugin present. Confirmed agent sessions behaved as expected in each case.

Comment thread tests/contacts/test_contact_tcp.py Outdated
Comment thread tests/contacts/test_contact_tcp.py Outdated
@sonarqubecloud

sonarqubecloud Bot commented Feb 6, 2026

Copy link
Copy Markdown

1 similar comment
@sonarqubecloud

sonarqubecloud Bot commented Feb 6, 2026

Copy link
Copy Markdown

@uruwhy uruwhy merged commit 473bebe into master Feb 6, 2026
14 checks passed
@uruwhy uruwhy deleted the VIRTS-5033 branch February 6, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants