Hi I am trying to make a bat file to check the availability from different servers to a specific one, in order to check if there are some firewalls between them,or something that blocks the conecction. The thing is I can't use third parties software like portqry, nmap ... So iam stuck here, every tip will be helpfull.
Thanks in advance XD,
manually you can use telnet
But telnet output cannot be handles so it's not useful for scripting.
Here's one solution which is more or less cheating (as it creates an .exe file) , but is not downloades. As it contains binary data into hex string it's a little bit long ,so I'd had to use pastebin.com
Another way.Using jscript.net/batch hybrid (should be saved as bat) which also creates a small exe file. But setting socket connection timeout is not so trivial task so if the port is not availble it will be waiting a little bit too long: