Skip to content

Fix RuntimeException: Unable to initialize transport handler #134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ic0ns
Copy link
Contributor

@ic0ns ic0ns commented Jun 27, 2025

Summary

  • Added exception handling to prevent scanner crashes when connection to target fails
  • Handles both TransportHandlerConnectException and "Cannot add Tasks to already shutdown executor" errors
  • Scanner now logs connection failures and continues with other probes instead of terminating

Changes

  1. TlsProbe.executeState(): Added try-catch blocks to handle:

    • TransportHandlerConnectException when unable to connect to target
    • RuntimeException for "Cannot add Tasks to already shutdown executor"
    • Generic exceptions with appropriate logging
  2. BleichenbacherAttacker.getServerPublicKey(): Added exception handling for connection failures during public key retrieval

  3. Main.java: Added RuntimeException catch to handle scanner termination gracefully with specific handling for TransportHandlerConnectException

Test plan

  • Verify code compiles successfully with mvn compile
  • Ensure spotless formatting is applied
  • Test scanner behavior when target becomes unreachable during scan
  • Verify scanner continues with other probes after connection failure
  • Check that appropriate warning/error messages are logged

Fixes #112

- Add exception handling in TlsProbe.executeState() to catch TransportHandlerConnectException
- Add exception handling for "Cannot add Tasks to already shutdown executor" errors
- Add exception handling in BleichenbacherAttacker.getServerPublicKey() for connection failures
- Add RuntimeException catch in Main.java to handle scanner termination gracefully
- Log connection failures with appropriate warning/error messages instead of crashing

This prevents the scanner from crashing when a target becomes unreachable during scanning
and allows it to continue with other probes.

Fixes #112
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.

java.lang.RuntimeException: Unable to initialize the transport handler
1 participant