csicar / Ning

Network-Scanner for Android
216 stars 35 forks source link

add scanning directly of individual ports in the range from 1 to 1024 #100

Open OmlineEditor opened 2 years ago

OmlineEditor commented 2 years ago

if there are devices on the network but they are protected by a firewall and do not respond to ping and broadcast packets, then your program does not see these devices. there are open ports on the devices, for example SMB, but your program does not see it.

To search for such devices, please add scanning directly of individual ports in the range from 1 to 1024 (popular ports)

csicar commented 2 years ago

Scanning up to port 1024 might be a little excessive (i.e. slow), but scanning a few common ports (like bonjour, ssh, http) might be doable.

There are two different types of scans in Ning:

  1. One for finding devices on the network
  2. One for finding open ports and services on a device

In this case we would need to extend the (1.) scan, which can be found here: https://github.com/csicar/Ning/blob/master/app/src/main/java/de/csicar/ning/ScanRepository.kt#L73