![]() Print('Time taken:', time.time() - startTime) Target = input('Enter the host to be scanned: ') Following is a Python script for port scanner using socket − Now, we will build a simple port scanner using socket. ![]() In our previous chapter, we discussed what a socket is. User or registered ports: from 1024 to 49151 System or well-known ports: from 0 to 1023 These 65535 ports can be divided into the following three ranges − As it always advisable to close unnecessary ports of our system hence essentially, there are more than 65000 doors (ports) to lock. Both of the protocols have 0 to 65535 ports. As discussed earlier, TCP/IP protocol suite, use for communication over internet, is made up of two protocols namely TCP and UDP. Port scanning is just like a thief who wants to enter into a house by checking every door and window to see which ones are open. Information about OS and MAC address of the target host. Information about the services running on each port. ![]() Now, consider the information we can get after running the port scan − We can configure the port scanner according to our requirements to get maximum information from the target system. Network administrator, penetration tester or a hacker can use this technique. Port scanning may be defined as a surveillance technique, which is used in order to locate the open ports available on a particular host.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |