{"id":19404955,"url":"https://github.com/theleopard65/port-scanner","last_synced_at":"2026-06-13T12:33:49.033Z","repository":{"id":244260674,"uuid":"814197118","full_name":"TheLeopard65/Port-Scanner","owner":"TheLeopard65","description":"This is a simple Python script designed to perform a TCP port scan on a specified target. It uses the socket module to establish connections with each port and reports whether each port is open or closed. The script also includes error handling for common exceptions such as host resolution failures and connection errors.","archived":false,"fork":false,"pushed_at":"2024-06-13T16:38:01.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T00:44:40.856Z","etag":null,"topics":["connection","exceptional-handlling","networking","port","python-script","python3","scanner","socket","sys","tcp"],"latest_commit_sha":null,"homepage":"","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/TheLeopard65.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-06-12T14:21:39.000Z","updated_at":"2024-06-13T16:38:16.000Z","dependencies_parsed_at":"2024-06-13T18:34:12.561Z","dependency_job_id":null,"html_url":"https://github.com/TheLeopard65/Port-Scanner","commit_stats":null,"previous_names":["theleopard65/port-scanner"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TheLeopard65/Port-Scanner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheLeopard65%2FPort-Scanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheLeopard65%2FPort-Scanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheLeopard65%2FPort-Scanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheLeopard65%2FPort-Scanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheLeopard65","download_url":"https://codeload.github.com/TheLeopard65/Port-Scanner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheLeopard65%2FPort-Scanner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34285190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["connection","exceptional-handlling","networking","port","python-script","python3","scanner","socket","sys","tcp"],"created_at":"2024-11-10T11:36:50.933Z","updated_at":"2026-06-13T12:33:49.028Z","avatar_url":"https://github.com/TheLeopard65.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Port-Scanner\n\nThis repository contains multiple scripts to perform port scanning on a given target. The port scanning functionality is implemented in three different languages: Bash, Python, and PowerShell. Each script supports two types of scans: **full** scan (scanning ports 1-65535) and **half** scan (scanning ports 1-1024).\n\n## Scripts\n\n1. **Bash-Scanner.sh**: A Bash script to scan ports using `nc` (Netcat) to check for open ports.\n2. **PY-Scanner.py**: A Python script that uses the `socket` library to scan the specified range of ports.\n3. **PS-Scanner.ps1**: A PowerShell script that uses the `System.Net.Sockets.TcpClient` class to perform port scans.\n\n## Features\n\n- **Full Scan**: Scans all 65535 ports (may take a long time).\n- **Half Scan**: Scans ports 1-1024 (faster than a full scan).\n\n## Prerequisites\n\n### For Bash-Scanner.sh\n- A Linux-based system with Bash.\n- Netcat (`nc`) installed.\n\n### For PY-Scanner.py\n- Python 3.x installed.\n\n### For PS-Scanner.ps1\n- A Windows system with PowerShell.\n\n---\n\n- Here is the command to install the prerequisites:\n\n```\nsudo apt install powershell netcat-traditional python3 -y\n```\n\n---\n\n## Usage\n\n### Bash-Scanner.sh\n\nTo use the `Bash-Scanner.sh` script, open a terminal and run the following command:\n\n```bash\n./Bash-Scanner.sh \u003ctarget\u003e \u003cfull/half\u003e\n```\n\n- `\u003ctarget\u003e`: The target domain or IP address.\n- `\u003cfull/half\u003e`: The type of scan (`full` for all ports 1-65535, `half` for ports 1-1024).\n\nExample:\n\n```bash\n./Bash-Scanner.sh example.com full\n```\n\n### PY-Scanner.py\n\nTo use the `PY-Scanner.py` script, run the following command in the terminal:\n\n```bash\npython3 PY-Scanner.py \u003ctarget\u003e \u003cfull/half\u003e\n```\n\n- `\u003ctarget\u003e`: The target domain or IP address.\n- `\u003cfull/half\u003e`: The type of scan (`full` for all ports 1-65535, `half` for ports 1-1024).\n\nExample:\n\n```bash\npython3 PY-Scanner.py example.com half\n```\n\n### PS-Scanner.ps1\n\nTo use the `PS-Scanner.ps1` script, run the following command in PowerShell:\n\n```powershell\n.\\PS-Scanner.ps1 -target \u003ctarget\u003e -scanType \u003cfull/half\u003e\n```\n\n- `\u003ctarget\u003e`: The target domain or IP address.\n- `\u003cfull/half\u003e`: The type of scan (`full` for all ports 1-65535, `half` for ports 1-1024).\n\nExample:\n\n```powershell\n.\\PS-Scanner.ps1 -target example.com -scanType full\n```\n\n## Output\n\nEach script will display:\n\n- The target (both domain name and resolved IP).\n- The start time of the scan.\n- The type of scan and port range being used.\n- For each open port, the script will print `PORT \u003cport_number\u003e : OPEN`.\n\n## License\n\nThis repository is licensed under the MIT License. See the LICENSE file for more information.\n\n---\n\nFeel free to fork and modify the scripts as needed. Happy scanning!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheleopard65%2Fport-scanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheleopard65%2Fport-scanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheleopard65%2Fport-scanner/lists"}