Port Scanner using Python

 

Code Example


What are Network Ports?

Network ports are the communication endpoints for a machine that is connected to the Internet. When a service listens on a port it can receive data from a client application, process it, and communicate a response. Port scanning is part of the first phase of a penetration test and allows you to find all network entry points available on a target system.


Common TCP Ports Listing :

  • 21 - FTP (File Transfer Protocol)
  • 22 - SSH (Secure Shell)
  • 23 - Telnet
  • 25 - SMTP (Mail)
  • 80 - HTTP (Web)
  • 110 - POP3 (Mail)
  • 143 - IMAP (Mail)
  • 443 - HTTPS (Secure Web)
  • 445 - SMB (Microsoft File Sharing)
  • 3389 - RDP (Remote Desktop Protocol)


    To Run port scanner: 

    (venv) C:\Users\kuntal\Desktop\New folder\code-example\Port Scanner>python portscanner.py 192.168.1.103


    Screenshot :




    Click Here For Raw Code


    Quiz Level 1

    Quiz Level 2


    Request Me



  • Comments

    1. I think nmap is best for scanning purpose in linux

      ReplyDelete

    Post a Comment

    Popular posts from this blog

    How To Create .ENV File in Python

    Create a Large file for Test Data Processing using Python

    How to solve the Liner Equation using Python