How to use the command 'ipscan' (with examples)
The ipscan
command, also known as Angry IP Scanner, is a fast network scanner designed with simplicity and ease of use in mind. It allows users to efficiently scan IP addresses and ranges, identifying active hosts and open ports across networks. This command-line utility is capable of providing a wealth of information about network configurations and can be invaluable in both network management and troubleshooting.
Use case 1: Scan a specific IP address
Code:
ipscan 192.168.0.1
Motivation:
The primary motivation for scanning a specific IP address is to quickly determine whether a particular host is active or reachable on a network. This is especially useful for network administrators or IT professionals who need to verify connectivity or diagnose potential issues with a specific device. By targeting a single IP address, you can ensure that the host is online and responding, which is often the first step in troubleshooting network problems.
Explanation:
ipscan
: The command for Angry IP Scanner, which initiates the scanning process.192.168.0.1
: The specific IP address to be scanned, commonly used as a default gateway in many local networks.
Example output:
Scanning... [192.168.0.1]
Host is alive.
Use case 2: Scan a range of IP addresses
Code:
ipscan 192.168.0.1-254
Motivation:
Scanning a range of IP addresses is particularly useful for obtaining an overview of the active devices within an entire subnet or network segment. Network administrators often use this to map out all devices on their network, monitor network usage, and identify unauthorized devices that may have connected to the network.
Explanation:
ipscan
: Initiates the scanning task.192.168.0.1-254
: Specifies the range of IP addresses from 192.168.0.1 to 192.168.0.254. The-
indicates the start and end of the range, allowing the scanner to cover an entire local network.
Example output:
Scanning... [192.168.0.1-254]
192.168.0.1 - Host is alive
192.168.0.2 - Host is alive
192.168.0.10 - Host is alive
Use case 3: Scan a range of IP addresses and save the results to a file
Code:
ipscan 192.168.0.1-254 -o path/to/output.txt
Motivation:
Saving scan results to a file is an essential feature for documentation, reporting, and further analysis. By exporting the scan data, users can maintain records of network configurations and device statuses, which can be referenced in the future for auditing or revisiting historical network states.
Explanation:
ipscan
: Executes the scanning command.192.168.0.1-254
: Scans the range of IP addresses specified.-o path/to/output.txt
: The-o
flag directs the output to a specified file, allowing users to choose where to save the scan results. “path/to/output.txt” is a placeholder indicating where the user should specify the actual file path.
Example output (in output.txt
file):
192.168.0.1 - Host is alive
192.168.0.2 - Host is alive
192.168.0.3 - No response
Use case 4: Scan IPs with a specific set of ports
Code:
ipscan 192.168.0.1-254 -p 80,443,22
Motivation:
Scanning specific ports across a range of IPs helps to identify open or closed ports that are crucial for network services. This is vital for security assessments, such as identifying vulnerabilities, or when verifying that services like HTTP (port 80), HTTPS (port 443), or SSH (port 22) are accessible and functioning correctly.
Explanation:
ipscan
: Triggers the scanning operation.192.168.0.1-254
: Covers the entire range of local IP addresses being scanned.-p 80,443,22
: The-p
flag specifies the ports to be scanned. Ports 80, 443, and 22 are commonly associated with web and secure shell services.
Example output:
Scanning... [192.168.0.1-254 with ports 80,443,22]
192.168.0.1 - 80: Open, 443: Open, 22: Closed
192.168.0.2 - 80: Closed, 443: Open, 22: Open
Use case 5: Scan with a delay between requests to avoid network congestion
Code:
ipscan 192.168.0.1-254 -d 200
Motivation:
Adding a delay between requests is crucial in avoiding network saturation, especially in environments with limited bandwidth where excessive scanning can disrupt normal network operations. By pacing requests, the impact on the network is minimized, ensuring other critical operations remain unaffected.
Explanation:
ipscan
: Launches the network scanning utility.192.168.0.1-254
: Indicates the range of IP addresses targeted for the scan.-d 200
: The-d
flag introduces a delay of 200 milliseconds between each request sent to the IP addresses, effectively moderating the rate of scanning.
Example output:
Scanning with 200ms delay...[192.168.0.1-254]
192.168.0.1 - Host is alive
192.168.0.5 - Host is alive
Use case 6: Display help
Code:
ipscan --help
Motivation:
Accessing the help menu is essential for users unfamiliar with the ipscan
options, or when they need a quick reference to understand the various flags and parameters the tool provides. This functionality aids users in efficiently utilizing all features available within the ipscan
command.
Explanation:
ipscan
: Initiates the command for Angry IP Scanner.--help
: This flag presents the help documentation, which outlines all possible options and usage guidelines for theipscan
tool.
Example output:
Usage: ipscan [options] <IP range>
Options:
...
-p <ports> Specify ports to scan
-o <filename> Save scan results to file
-d <delay> Delay between requests in ms
...
Conclusion:
The ipscan
command is a versatile tool for network scanning, providing simple yet powerful features to monitor, analyze, and troubleshoot network environments. Whether scanning a single IP address, a range of addresses, specific ports, or outputting results for later analysis, ipscan
is indispensable for effective network management tasks.