{"id":23029560,"url":"https://github.com/lpcodes/port-scanner","last_synced_at":"2025-04-02T20:25:25.781Z","repository":{"id":266962944,"uuid":"899885542","full_name":"LpCodes/Port-Scanner","owner":"LpCodes","description":"🔍 A Python-based Port Scanner with flexible options: scan all, range, or specific ports on target IPs. Includes a detailed verbose mode for insights!","archived":false,"fork":false,"pushed_at":"2024-12-07T09:35:22.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T11:12:52.414Z","etag":null,"topics":["pentesting","portscan","portscanner","pyhton3","python"],"latest_commit_sha":null,"homepage":"https://lpcodes.github.io/Port-Scanner/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LpCodes.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-07T09:26:03.000Z","updated_at":"2024-12-10T15:36:39.000Z","dependencies_parsed_at":"2024-12-07T10:33:59.749Z","dependency_job_id":null,"html_url":"https://github.com/LpCodes/Port-Scanner","commit_stats":null,"previous_names":["lpcodes/port-scanner"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LpCodes%2FPort-Scanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LpCodes%2FPort-Scanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LpCodes%2FPort-Scanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LpCodes%2FPort-Scanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LpCodes","download_url":"https://codeload.github.com/LpCodes/Port-Scanner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246886409,"owners_count":20849855,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pentesting","portscan","portscanner","pyhton3","python"],"created_at":"2024-12-15T14:15:44.726Z","updated_at":"2025-04-02T20:25:25.754Z","avatar_url":"https://github.com/LpCodes.png","language":"Python","readme":"\r\n\r\n# Basic Port Scanner with Verbose Mode\r\n\r\nThis Python script is a simple port scanner that can scan all ports, a specific range of ports, or specific ports on a target IP address. It also includes a **verbose mode** that provides detailed output for each port scanned.\r\n\r\n## Features\r\n- Scan all ports (1–65535).\r\n- Scan a range of ports (e.g., 20–80).\r\n- Scan specific ports (e.g., 22, 80, 443).\r\n- **Verbose output** to show detailed status for each port scanned.\r\n- Works on both Linux and Windows.\r\n\r\n---\r\n\r\n## Prerequisites\r\n\r\nBefore using the script, make sure you have **Python 3.x** installed on your system. \r\n\r\n---\r\n\r\n## Installation\r\n\r\n1. **Download the script**: Save the script as `app.py`.\r\n\r\n2. **Make the script executable** (Optional, for Linux/Mac):\r\n   ```bash\r\n   chmod +x app.py\r\n   ```\r\n\r\n---\r\n\r\n## Usage\r\n\r\nYou can use this script via the command line or terminal. The basic syntax is as follows:\r\n\r\n```bash\r\npython app.py -t \u003ctarget_ip\u003e -p \u003cports\u003e [options]\r\n```\r\n\r\n### Arguments:\r\n- `-t, --target` (required): **Target IP address** to scan.\r\n- `-p, --ports` (required): **Ports to scan**. You can specify:\r\n  - `all`: Scan all 65,535 ports.\r\n  - `start-end`: Scan a range of ports (e.g., `20-80`).\r\n  - `port1,port2,...`: Scan specific ports (e.g., `22,80,443`).\r\n\r\n### Optional Flags:\r\n- `-v, --verbose`: Enable **verbose output** for detailed scanning information (e.g., connection attempts, errors).\r\n\r\n---\r\n\r\n## Example Commands\r\n\r\n### 1. **Scan All Ports with Verbose Output**\r\nThis command will scan all ports (1-65535) on the target IP `192.168.1.1` and print detailed messages for each port.\r\n\r\n```bash\r\npython app.py -t 192.168.1.1 -p all -v\r\n```\r\n\r\n#### Output:\r\n```\r\nScanning 192.168.1.1...\r\n[-] Port 1: CLOSED\r\n[-] Port 2: CLOSED\r\n[+] Port 22: OPEN\r\n[+] Port 80: OPEN\r\n...\r\nOpen ports on 192.168.1.1: [22, 80, 443]\r\n```\r\n\r\n### 2. **Scan a Specific Range of Ports with Verbose Output**\r\nThis command will scan ports from `20` to `80` on the target IP `192.168.1.1` and print detailed messages.\r\n\r\n```bash\r\npython app.py -t 192.168.1.1 -p 20-80 -v\r\n```\r\n\r\n#### Output:\r\n```\r\nScanning 192.168.1.1...\r\n[-] Port 20: CLOSED\r\n[+] Port 22: OPEN\r\n[+] Port 80: OPEN\r\n...\r\nOpen ports on 192.168.1.1: [22, 80]\r\n```\r\n\r\n### 3. **Scan Specific Ports without Verbose Output**\r\nThis command will scan only ports `22`, `80`, and `443` on the target IP `192.168.1.1` and print only the list of open ports (no verbose output).\r\n\r\n```bash\r\npython app.py -t 192.168.1.1 -p 22,80,443\r\n```\r\n\r\n#### Output:\r\n```\r\nScanning 192.168.1.1...\r\nOpen ports on 192.168.1.1: [22, 80, 443]\r\n```\r\n\r\n---\r\n\r\n## How It Works\r\n\r\n- **Port Scanning**: The script attempts to create a TCP connection to the specified ports on the target IP address. If the connection succeeds, the port is marked as **open**; otherwise, it is **closed**.\r\n- **Verbose Mode**: In verbose mode (`-v`), the script prints the status for each port being scanned (e.g., `OPEN`, `CLOSED`, or errors).\r\n\r\n---\r\n\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpcodes%2Fport-scanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flpcodes%2Fport-scanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpcodes%2Fport-scanner/lists"}