{"id":23991308,"url":"https://github.com/loglux-lab/ip-extractor","last_synced_at":"2026-06-20T14:04:26.054Z","repository":{"id":187950314,"uuid":"677854997","full_name":"loglux-lab/ip-extractor","owner":"loglux-lab","description":"ip-extractor.sh uses nano to extract IP addresses. Results are stored in 'hosts', with duplicates removed. Ideal for sifting through logs and data-rich files.","archived":false,"fork":false,"pushed_at":"2023-08-13T09:07:54.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T05:17:15.432Z","etag":null,"topics":["bash","extract-data","linux-shell","nano","regex","regular-expression"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/loglux-lab.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":"2023-08-12T21:36:51.000Z","updated_at":"2024-08-02T19:46:18.000Z","dependencies_parsed_at":"2025-02-25T05:27:16.757Z","dependency_job_id":null,"html_url":"https://github.com/loglux-lab/ip-extractor","commit_stats":null,"previous_names":["loglux/ip-extractor","loglux-lab/ip-extractor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/loglux-lab/ip-extractor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loglux-lab%2Fip-extractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loglux-lab%2Fip-extractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loglux-lab%2Fip-extractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loglux-lab%2Fip-extractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loglux-lab","download_url":"https://codeload.github.com/loglux-lab/ip-extractor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loglux-lab%2Fip-extractor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34572429,"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-20T02:00:06.407Z","response_time":98,"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":["bash","extract-data","linux-shell","nano","regex","regular-expression"],"created_at":"2025-01-07T19:39:07.601Z","updated_at":"2026-06-20T14:04:26.050Z","avatar_url":"https://github.com/loglux-lab.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IP-Extractor\n\n**ip-extractor.sh** is a Bash script designed to extract IP addresses from any text input via the `nano` editor. It processes the input, saves clean IP lists into several formats, and provides immediate feedback in the console.\n\n---\n\n## 📦 Prerequisites\n\n- Bash-compatible environment (Linux, macOS, WSL, etc.)\n- `nano` editor installed\n- Standard Unix tools: `grep`, `sort`, `tr`, `cat`, `rm`, `sed`, etc.\n\n---\n\n## 🚀 Usage\n\n1. Run the script:\n\n   ```bash\n   ./ip-extractor.sh\n   ```\n\n2. On first run, a file called `load` will be opened in `nano`. Paste your raw text (e.g., log files, traceroutes, firewall logs).\n\n3. Save and exit (`Ctrl + O`, `Enter`, `Ctrl + X`).\n\n4. The script will:\n   - Extract all non-localhost IPv4 addresses\n   - Save them to a file called `hosts`\n   - Remove duplicates\n   - Create two additional files:\n     - `hostcom`: IPs in a comma-separated format\n     - `chost`: IPs in a space-separated format\n   - Display the final list of IPs in console\n   - Inform how many IPs were found\n\n---\n\n## 📁 Output Files\n\n| File      | Description                                 |\n|-----------|---------------------------------------------|\n| `hosts`   | Unique extracted IP addresses, one per line |\n| `hostcom` | Same IPs as in `hosts`, comma-separated     |\n| `chost`   | Same IPs as in `hosts`, space-separated     |\n| `load`    | Temporary input file (deleted after run)    |\n| `loadlast`| Copy of last processed input                |\n\n---\n\n## 🛠 Features\n\n- Clean parsing: skips `127.*.*.*` and non-IP lines\n- Visual feedback (`▓`, `Done!`) during processing\n- Duplicate removal via `sort -u`\n- Auto-relaunches itself if `load` file is empty or missing\n- Multi-format output: plain, comma, and space-separated\n\n---\n\n## 🔁 Notes\n\n- The script only works with **IPv4** addresses.\n- Edit the regex in `grep` if you want to support other formats or behaviours.\n- You can comment or customise the `JobFin` messages for quieter output.\n\n---\n\n## 🙋 Contributing\n\nThis is a lightweight utility meant for quick daily tasks. Feel free to submit enhancements, especially:\n- IPv6 support\n- GUI-based input (e.g. with `zenity`)\n- Output to JSON or CSV\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floglux-lab%2Fip-extractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floglux-lab%2Fip-extractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floglux-lab%2Fip-extractor/lists"}