-
Notifications
You must be signed in to change notification settings - Fork 12
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
another Port sniffer #12
base: master
Are you sure you want to change the base?
Conversation
There where regex use for the first time, it works incorrectly. I try to check host, and if "host" looks like a 123.123.123.123 or google.com.ua then "host" is correct, but addresses like a 1.2.3.4.5 pass too, I have no idea, why |
Regexp returns true when any part of the input matches the pattern. |
Done! Check it, please, and tell me if something wrong. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python temp.py --host i.ua --ports 78-82
Host "i.ua" have no open ports in range 78 to 82
in i.ua port 80 is open
time to take answer is 0.3 sec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python temp.py --host 127.0.0.1 --ports 8900-8902
.
8901 ports are open
^^^^^
your code say 'port open' only if remote server respond on your 'hello' - it's wrong
i.ua don't respond for empty query and your script does not see open ports
python temp.py --host localhost --ports 8900-8902
IP or Domain in wrong format
regexp powerful tool but try 'socket' package from python library
If you get tired of reading the code or something is not clear, ask, I will try to answer all your questions