Port Scanner in Java
public static void main(String[] args) {
URLConnection conn;
for(int port=1;port<65535;port++)
{
try {
ServerSocket serv = new ServerSocket(port);
if(serv.isBound())
{
serv.close();
}
} catch (IOException ex) {
System.out.println(port);
}
}
}
No comments:
Post a Comment