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

Error Handling for Non-Numeric Input in IP Target Field (Option 1) #10

Open
juampaweb opened this issue May 12, 2024 · 0 comments
Open

Comments

@juampaweb
Copy link

When attempting to add a string (non-numeric) in the "IP Target" field under option 1, an error is thrown. This error should be addressed to provide informative feedback to the user regarding the invalid IP input. This will enable users to re-enter a valid IP address or return to the main menu.

Steps to Reproduce:

Navigate to option 1.
Input a string (non-numeric) in the "IP Target" field.
Observe the error.

Expected Behavior:
When a non-numeric input is detected in the "IP Target" field, the system should provide a clear and descriptive error message informing the user that the entered IP is invalid. The message should prompt the user to either re-enter a valid IP address or return to the main menu.

Additional Information:
This issue affects user experience by preventing seamless interaction with the application.
Implementing proper error handling will enhance usability and reduce user frustration.
Consider providing examples of valid IP formats to assist users in entering correct input.

Describe error:

 Enter IP target : pepe

 ============= SHOW INFORMATION IP ADDRESS =============

 IP target       : pepe
Traceback (most recent call last):
  File "/var/www/html/utils/GhostTrack/GhostTR.py", line 311, in <module>
    main()
  File "/var/www/html/utils/GhostTrack/GhostTR.py", line 302, in main
    execute_option(opt)
  File "/var/www/html/utils/GhostTrack/GhostTR.py", line 232, in execute_option
    call_option(opt)
  File "/var/www/html/utils/GhostTrack/GhostTR.py", line 225, in call_option
    option['func']()
  File "/var/www/html/utils/GhostTrack/GhostTR.py", line 33, in wrapper
    func(*args, **kwargs)
  File "/var/www/html/utils/GhostTrack/GhostTR.py", line 49, in IP_Track
    print(f"{Wh} Type IP         :{Gr}", ip_data["type"])
KeyError: 'type'
(.venv)  utils/GhostTrack $ 
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

No branches or pull requests

1 participant