Open MRchen532 opened 6 years ago
Can you please elaborate on what you are trying to achieve?
Your software's implementation function is port scanning, but it can not be achieved, would like to ask the input command is ./portScanner --ports 1-80 --ip 10.211.55.3 --scan SYN?
And what system environment did you develop?
This code uses raw sockets, which requires you to run the tool with root privileges. Run the executable with sudo prepended to your command.
thanks,there is also a problem that can detect the service condition but does not show the port live state,why?
[root@CentOS7 PortScanner-master]# ./portScanner --ports 1-85 --ip 192.168.122.1 Scan Configurations Target Ip-Address : 192.168.122.1 No of Ports to scan : 85 Scans to be performed : SYN NULL FIN XMAS ACK UDP Scanning.. Service Detection for port 24 failed due to connect error Service Detection for port 43 failed due to connect error Scan took 0.900710 secs IP address: 192.168.122.1
22 SSH-2.0-OpenSSH_7.4 24 UNKNOWN 43 UNKNOWN 80 Apache/2.4.6 (CentOS) PHP/5.4.16
Scan results like this
Under what circumstances did you develop?Very strange
The service detection is implemented only for few ports, see ps_version.c for it's implementation logic. Also, please read the Readme.pdf file to understand the functionality implemented.
"This tool supports IPv4 and can perform six types of scans namely TCP SYN, NULL, FIN, Xmas, ACK scans and UDP scan. This basic tool stores the results of each scan and makes a conclusion on whether a port is open, closed, filtered, unfiltered or open-filtered. Along with these scans it also finds the version of service running on few pre-defined standard ports like SSH, Whois, HTTP etc.,"
I have already checked it carefully, but it does not show the port status, only the service probe information.
[root@CentOS7 PortScanner-master 8]# ./portScanner --ports 1-85 --ip 192.168.122.1 --scan SYN Scan Configurations Target Ip-Address : 192.168.122.1 No of Ports to scan : 85 Scans to be performed : SYN Scanning.. Service Detection for port 24 failed due to connect error Service Detection for port 43 failed due to connect error Scan took 0.329824 secs IP address: 192.168.122.1
22 SSH-2.0-OpenSSH_7.4 24 UNKNOWN 43 UNKNOWN 80 Apache/2.4.6 (CentOS) PHP/5.4.16
You see, there is no port open or other status
Cannot implement probe after generating executable file, why