Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wrote a quick script to do port testing with the server.

This script should work with any system that has curl with some little modifications, but I've only tested it in fedora 15. You can find it from codepad and the script will run over all ports if the port range has not been specified.

The first terminal argument will be the range start and second argument will be the range end. For example: php port_test.php 1 24 will run the test on ports 1-24

http://codepad.org/8O1WDywv



You can use bash expansion to do this:

    curl http://open.zorinaq.com:{100..200}/
Unfortunately the server doesn't send back the port number in the HTML. Use this to see which port numbers you can connect to:

    curl -v http://open.zorinaq.com:{100..600}/ 2>&1 | grep 'Connected to'


Oh yes! I forgot totally about bash expansion. :)


and a perl one-liner, just for the sake of it:

   perl -MLWP::Simple=\$ua -le 'print"port $_ - ".$ua->get("http://open.zorinaq.com:$_")->status_line for 1..65535'




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: