Skip to content
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

Improve Error messages #40 #44

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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