This is a simple Java-based port scanner that scans a specified range of ports on a given host to determine which ports are open.
- Scans ports in the range from 1 to 65535.
- Checks if ports are open on a specified host.
- Configurable timeout for port checking.
- Java Development Kit (JDK) 8 or later.
-
Clone the repository:
git clone https://github.com/your-username/java-port-scanner.git cd java-port-scanner
-
Compile the Java code:
javac App.java
-
Run the application:
java App
By default, the application will scan the
localhost
for open ports in the range of 1 to 65535.
To customize the host and port range, modify the following variables in the App.java
file:
String host = "localhost"; // Replace with the target host
int startPort = 1; // Replace with the starting port number
int endPort = 65535; // Replace with the ending port number