8218 Posted February 11, 2014 Share Posted February 11, 2014 Is there any way using autoit to write a small script that can check if ports 5060-5069 are open? Link to comment Share on other sites More sharing options...
FireFox Posted February 11, 2014 Share Posted February 11, 2014 Hi, UDP is connectionless, and you need a remote server to check if the port is opened. A response received indicates it's opened, timeout indicates not. Br, FireFox. Link to comment Share on other sites More sharing options...
8218 Posted February 11, 2014 Author Share Posted February 11, 2014 Thanks for your reply. How does that work if firewalls are blocking the packets, but the port is in fact open? Link to comment Share on other sites More sharing options...
FireFox Posted February 11, 2014 Share Posted February 11, 2014 The packet is not sent and timeout occurs. Link to comment Share on other sites More sharing options...
8218 Posted February 11, 2014 Author Share Posted February 11, 2014 So a timeout either indicates a firewall-blocked packet or that the port is not open. How do I differate between these? Link to comment Share on other sites More sharing options...
FireFox Posted February 11, 2014 Share Posted February 11, 2014 I would say you can't without testing. However, with some hope there could be different error codes (of the UDPOpen/Send functions). Br, FireFox. Link to comment Share on other sites More sharing options...
8218 Posted February 11, 2014 Author Share Posted February 11, 2014 Thanks for the replies, I will see what I can do Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 11, 2014 Moderators Share Posted February 11, 2014 You can use the Firewall UDF in my signature to check. You could always specifically open the ports, or use the _ListAuthorizedPorts function to display what is open or not. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
8218 Posted February 11, 2014 Author Share Posted February 11, 2014 You can use the Firewall UDF in my signature to check. You could always specifically open the ports, or use the _ListAuthorizedPorts function to display what is open or not. Thanks a lot Link to comment Share on other sites More sharing options...
8218 Posted February 12, 2014 Author Share Posted February 12, 2014 Fast question: To do this I don't actually have to use UDPSend() right? UDPOpen() should return an error right away if the port is closed, right? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 12, 2014 Moderators Share Posted February 12, 2014 Try it: UDPOpen(<IP Address>, <port>, 0) If $aArray[0] = 0 Then ; your code here ;-Or- If @error Then ;your code here "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now