you might want to try this:


for(int port=1;port<=65535;port++){
try{
Socket s = new Socket("127.0.0.1",port);
} catch(IOException e){
System.out.println("port " + port + " is being...