{"id":30020866,"url":"https://github.com/sammwyy/dishost","last_synced_at":"2026-02-16T14:33:12.808Z","repository":{"id":292590862,"uuid":"950343192","full_name":"sammwyy/Dishost","owner":"sammwyy","description":"A powerful and flexible IP range scanner with configurable health checks.","archived":false,"fork":false,"pushed_at":"2025-03-18T02:59:53.000Z","size":8,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-19T01:11:42.356Z","etag":null,"topics":["cybersecurity","discovery","hack","hacking","host","masscan","pentest","pentest-tool","pentesting","ping","scanner"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sammwyy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-03-18T02:35:46.000Z","updated_at":"2025-07-22T01:15:01.000Z","dependencies_parsed_at":"2025-05-10T23:42:32.862Z","dependency_job_id":null,"html_url":"https://github.com/sammwyy/Dishost","commit_stats":null,"previous_names":["sammwyy/dishost"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sammwyy/Dishost","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sammwyy%2FDishost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sammwyy%2FDishost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sammwyy%2FDishost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sammwyy%2FDishost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sammwyy","download_url":"https://codeload.github.com/sammwyy/Dishost/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sammwyy%2FDishost/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29510195,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cybersecurity","discovery","hack","hacking","host","masscan","pentest","pentest-tool","pentesting","ping","scanner"],"created_at":"2025-08-06T02:16:51.435Z","updated_at":"2026-02-16T14:33:12.793Z","avatar_url":"https://github.com/sammwyy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DisHost\r\n\r\nA powerful and flexible IP range scanner with configurable health checks.\r\n\r\n[![Python](https://img.shields.io/badge/Python-3.6+-blue.svg)](https://www.python.org/downloads/) [![License](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\r\n\r\n## Overview\r\n\r\nDisHost (Discovery + Host) is a command-line tool written in Python that scans IP ranges and performs various health checks. It's designed to be versatile, efficient, and user-friendly, providing flexible configuration options and multiple output formats.\r\n\r\n## Features\r\n\r\n- **Flexible IP Range Specification**:\r\n  - CIDR notation (e.g., `192.168.1.0/24`)\r\n  - Start-End IP range (e.g., `10.0.0.1` to `10.0.0.254`)\r\n\r\n- **Multiple Health Check Types**:\r\n  - **ICMP**: Basic ping test\r\n  - **TCP**: Port connectivity test\r\n  - **HTTP/HTTPS**: Web service health checks with extensive configuration options\r\n\r\n- **HTTP/HTTPS Check Options**:\r\n  - Custom URL paths\r\n  - HTTP method selection\r\n  - Custom headers\r\n  - Expected status code verification\r\n  - Response content validation\r\n\r\n- **Efficient Performance**:\r\n  - Multi-threaded scanning\r\n  - Configurable timeout values\r\n  - Progress bar visualization\r\n\r\n- **Output Options**:\r\n  - Terminal display with color-coded results\r\n  - JSON export\r\n  - CSV export\r\n\r\n## Installation\r\n\r\n### Prerequisites\r\n\r\n- Python 3.6 or higher\r\n- pip (Python package manager)\r\n\r\n### Setup\r\n\r\n1. Clone the repository or download the script:\r\n\r\n    ```bash\r\n    git clone https://github.com/sammwyy/dishost.git\r\n    # or just download dishost.py\r\n    ```\r\n\r\n2. Install required packages:\r\n\r\n    ```bash\r\n    pip install requests rich\r\n    ```\r\n\r\n3. Make the script executable (Linux/macOS):\r\n\r\n    ```bash\r\n    chmod +x dishost.py\r\n    ```\r\n\r\n## Usage\r\n\r\n### Basic Syntax\r\n\r\n```bash\r\npython dishost.py [IP Range Options] [Health Check Options] [Output Options]\r\n```\r\n\r\n### IP Range Options (Required)\r\n\r\nYou must use either CIDR notation or start-end range:\r\n\r\n- `--cidr CIDR`: Specify IP range in CIDR notation (e.g., `192.168.1.0/24`)\r\n- `--start IP` and `--end IP`: Specify start and end IP addresses (e.g., `--start 1.1.1.0 --end 1.1.2.5`)\r\n\r\n### Health Check Options\r\n\r\n- `--check {icmp,tcp,http,https}`: Health check type (default: `icmp`)\r\n- `--port PORT`: Port number for TCP/HTTP/HTTPS checks\r\n- `--timeout SECONDS`: Connection timeout in seconds (default: `1.0`)\r\n- `--count COUNT`: Number of ping packets for ICMP check (default: `1`)\r\n\r\n### HTTP/HTTPS Specific Options\r\n\r\n- `--path PATH`: URL path (default: `/`)\r\n- `--method METHOD`: HTTP method (default: `GET`)\r\n- `--headers HEADERS`: HTTP headers in format \"Key1:Value1,Key2:Value2\"\r\n- `--expect-code CODE`: Expected HTTP status code (default: `200`)\r\n- `--expect-text TEXT`: Text that should be in the HTTP response\r\n\r\n### Output Options\r\n\r\n- `--json FILENAME`: Save results to JSON file\r\n- `--csv FILENAME`: Save results to CSV file\r\n- `--no-progress`: Hide progress bar\r\n- `--threads COUNT`: Maximum number of threads (default: `50`)\r\n\r\n### Examples\r\n\r\n#### ICMP (Ping) Check\r\n\r\n```bash\r\n# Scan a CIDR range with ICMP\r\npython dishost.py --cidr 192.168.1.0/24 --check icmp\r\n\r\n# Scan with 3 ping packets and 2-second timeout\r\npython dishost.py --cidr 10.0.0.0/24 --check icmp --count 3 --timeout 2.0\r\n```\r\n\r\n#### TCP Port Check\r\n\r\n```bash\r\n# Check if SSH (port 22) is accessible\r\npython dishost.py --start 10.0.0.1 --end 10.0.0.10 --check tcp --port 22\r\n\r\n# Check for open SMTP ports with longer timeout\r\npython dishost.py --cidr 192.168.1.0/24 --check tcp --port 25 --timeout 3.0\r\n```\r\n\r\n#### HTTP/HTTPS Check\r\n\r\n```bash\r\n# Basic HTTP check\r\npython dishost.py --cidr 192.168.1.0/24 --check http --port 80\r\n\r\n# Check a specific health endpoint\r\npython dishost.py --cidr 10.0.0.0/24 --check http --port 8080 --path /health\r\n\r\n# Check HTTPS with custom headers and expected response text\r\npython dishost.py --cidr 172.16.0.0/16 --check https --port 443 \\\r\n  --path /api/status --method GET \\\r\n  --headers \"Authorization:Bearer token123,Accept:application/json\" \\\r\n  --expect-code 200 --expect-text \"status\\\":\\\"UP\"\r\n```\r\n\r\n#### Output Options examples\r\n\r\n```bash\r\n# Save results to files\r\npython dishost.py --cidr 192.168.1.0/24 --check icmp --json results.json --csv results.csv\r\n\r\n# Use more threads for faster scanning\r\npython dishost.py --cidr 10.0.0.0/16 --check tcp --port 80 --threads 100\r\n```\r\n\r\n## Output Format\r\n\r\n### Terminal Output\r\n\r\nThe terminal output includes:\r\n\r\n- Scan summary (total, up, down)\r\n- Detailed results for each IP\r\n- Color-coded status indicators (green for up, red for down)\r\n\r\nExample:\r\n\r\n```bash\r\nScan Summary\r\nTotal IPs scanned: 254\r\nUP: 12 | DOWN: 242 | Other: 0\r\n\r\nDetailed Results:\r\nIP: 192.168.1.1 | Status: up | Protocol: icmp | latency: 1.25ms\r\nIP: 192.168.1.2 | Status: up | Protocol: icmp | latency: 2.34ms\r\n...\r\n```\r\n\r\n### JSON Output\r\n\r\nThe JSON output includes:\r\n\r\n- Metadata (timestamp, counts)\r\n- Detailed results for each IP\r\n\r\nExample structure:\r\n\r\n```json\r\n{\r\n  \"metadata\": {\r\n    \"timestamp\": \"2025-03-17T14:30:22.123456\",\r\n    \"total_hosts\": 254,\r\n    \"up_hosts\": 12,\r\n    \"down_hosts\": 242\r\n  },\r\n  \"results\": [\r\n    {\r\n      \"ip\": \"192.168.1.1\",\r\n      \"protocol\": \"icmp\",\r\n      \"status\": \"up\",\r\n      \"latency\": 1.25\r\n    },\r\n    ...\r\n  ]\r\n}\r\n```\r\n\r\n### CSV Output\r\n\r\nCSV output contains all fields from the scan results, with one row per IP.\r\n\r\n## Architecture\r\n\r\nDisHost follows an object-oriented design with these main components:\r\n\r\n- **HealthChecker**: Base class for health checks with protocol-specific subclasses\r\n- **IPScanner**: Handles IP generation and parallel scanning\r\n- **ResultManager**: Manages output display and file saving\r\n\r\n## Troubleshooting\r\n\r\n### Common Issues\r\n\r\n1. **Permission errors**: When using ICMP checks, you may need elevated privileges:\r\n\r\n   ```bash\r\n   # On Linux/macOS\r\n   sudo python dishost.py --cidr 192.168.1.0/24 --check icmp\r\n   \r\n   # On Windows (run as Administrator)\r\n   ```\r\n\r\n2. **Firewall restrictions**: Ensure your firewall allows outgoing ICMP/TCP/HTTP traffic.\r\n\r\n3. **Rate limiting**: Some networks or hosts may rate-limit ping requests. Try increasing the timeout or reducing threads.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Please feel free to submit a Pull Request.\r\n\r\n## Acknowledgments\r\n\r\n- [Rich](https://github.com/Textualize/rich) - For terminal formatting and progress bars\r\n- [Requests](https://requests.readthedocs.io/) - For HTTP/HTTPS functionality\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsammwyy%2Fdishost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsammwyy%2Fdishost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsammwyy%2Fdishost/lists"}