Skip to content

Improve Error messages #40#44

Open
Ansh5748 wants to merge 2 commits intohoneynet:mainfrom
Ansh5748:feature/error-handling
Open

Improve Error messages #40#44
Ansh5748 wants to merge 2 commits intohoneynet:mainfrom
Ansh5748:feature/error-handling

Conversation

@Ansh5748
Copy link

Closes #40

This PR implements a robust error handling system for the honeyscanner tool:

Key Changes:

  • Added ErrorHandler class for centralized error management
  • Created structured error messages for different scenarios
  • Integrated error handling throughout main components
  • Enhanced argument validation with clear feedback
  • Replaced raw tracebacks with user-friendly messages

Tests Performed:

  1. Invalid IP Test:
    python3 honeyscanner/main.py --target-ip invalid_ip
    Result: Displays proper error message for invalid IP format

  2. Invalid Honeypot Type Test:
    python3 honeyscanner/main.py --target-ip 1.1.1.1 --honeypot-type invalid
    Result: Shows available honeypot type choices

  3. Valid Honeypot Type Test:
    python3 honeyscanner/main.py --target-ip 1.1.1.1 --honeypot-type cowrie
    Result: Handles execution with proper error catching

  4. Timeout Test:
    python3 honeyscanner/main.py --target-ip 8.8.8.8 --timeout 1
    Result: Properly handles timeout scenarios

The error handling system now provides clear, actionable feedback to users while maintaining detailed logging for debugging.

- Added ErrorHandler class
- Created structured error messages
- Integrated error handling in main components
- Added argument validation
- Improved user feedback
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.

Improve error messages

1 participant