port scanning is used by security testers and hackers to check the security and vulnerabilities of a network.
The connect scan is similar to a syn scan and is risky to use because it relies on the attacked computer's OS. The connect scan includes Nmap asking its underlying Operating network to establish a connection with the target server by issuing the “connect” system call.