Comment on Tutorial - Simple Port Scanner application using Java By Syed M Hussain

Comment Added by : Asad

Comment Added at : 2014-02-13 05:55:26

Comment on Tutorial : Simple Port Scanner application using Java By Syed M Hussain
Try this


public class PortScanner


public static void main(String args[])
int startPortRange=0;
int stopPortRange=0;

startPortRange = Integer.parseInt(args[0]);
stopPortRange = Integer.parseInt(args[1]);

for(int i=startPortRange; i <=stopPortRange; i++)
Socket ServerSok = new Socket("",i);

System.out.println("Port in use: " + i );

catch (Exception e)
System.out.println("Port not in use: " + i );

View Tutorial

Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. how to create inode address using c++
View Tutorial          By: pooja at 2014-06-24 05:50:33

2. it is unfair to leave this portal without thanking
View Tutorial          By: anil kumar at 2009-12-30 23:40:25

3. hi i want to run a c program in java program but i
View Tutorial          By: jyothi at 2014-11-27 06:40:27

4. where i can find jar files?
please tell me

View Tutorial          By: chandu at 2012-06-17 14:14:28

5. two of them are equal and third one is less than b
View Tutorial          By: nani at 2011-10-28 10:55:58

View Tutorial          By: Aashish at 2012-06-06 17:56:36

7. hi...i have done a project based on spinners..the
View Tutorial          By: Nagini at 2015-04-11 05:01:43

8. I am still going through the tutorial, but it seem
View Tutorial          By: shadowwraith at 2011-06-08 08:00:57

9. hi
View Tutorial          By: raj at 2010-02-12 02:48:09

10. In this code what should i add in place of "y
View Tutorial          By: manju at 2011-11-10 09:01:50