ipfromwebpage
Summary:
Takes a webpage or text string and extracts IPv4 and IPv6 addresses. Then prints the IPs (aggregated where possible).
Quickstart:
Run using uvx ipfromwebpage
Usage Options:
- Extract IPs from a URL:
ipfromwebpage <url>where<url>is the fully qualified URL you wish to scrape for IPs. - Extract IPs from text:
ipfromwebpage --input-string "<text>"where<text>is any plain text containing IP addresses (e.g., copy-pasted from a website). - Include reserved IPs: Add
--no-exclusionsflag to include addresses in reserved ranges (0.0.0.0/8, 224.0.0.0/3) that are normally filtered out.
Code Examples:
Example 1: Scraping from a URL
ipfromwebpage https://www.cloudflare.com/ips
================
IPv4 addresses:
103.21.244.0/22
103.22.200.0/22
103.31.4.0/22
104.16.0.0/12
108.162.192.0/18
131.0.72.0/22
141.101.64.0/18
162.158.0.0/15
172.64.0.0/13
173.245.48.0/20
188.114.96.0/20
190.93.240.0/20
197.234.240.0/22
198.41.128.0/17
================
IPv6 addresses:
2400:cb00::/32
2405:8100::/32
2405:b500::/32
2606:4700::/32
2803:f800::/32
2a06:98c0::/29
2c0f:f248::/32
Example 2: Extracting from text string (e.g., copy-pasted content)
ipfromwebpage --input-string "Server IPs: 10.0.0.1, 192.168.1.1
Network range: 172.16.0.0/24
IPv6: 2001:db8::1"
================
IPv4 addresses:
10.0.0.1
172.16.0.0/24
192.168.1.1
================
IPv6 addresses:
2001:db8::1
Example 3: Including reserved/multicast IPs (e.g., from terraform output)
ipfromwebpage --input-string "242.143.224.100/32, 242.143.224.101/32" --no-exclusions
================
IPv4 addresses:
242.143.224.100/31
================
IPv6 addresses:
No addresses found when scraping input string
Note: By default, addresses in the ranges 0.0.0.0/8 and 224.0.0.0/3 are excluded as they are typically reserved or multicast addresses. Use --no-exclusions to include them.
Metadata
Release files for ipfromwebpage 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ipfromwebpage-1.3.0.tar.gz | 4.0 kB | Without provenance | Details for ipfromwebpage-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ipfromwebpage-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for ipfromwebpage-1.3.0-py3-none-any.whl |
Total release size: 9.0 kB
Release files / ipfromwebpage-1.3.0.tar.gz
| Download URL | ipfromwebpage-1.3.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98b8ca79c6e557e2de8d20f55c5539cf86524fd9b30f851a8c241806cbd93bb0
|
|
BLAKE2b-256 checksum How to use checksums |
3a95056924098828b54b09bb6c0803d3e4b5bfc98a140d7019f40c6360d3e4c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.1
|
Release files / ipfromwebpage-1.3.0-py3-none-any.whl
| Download URL | ipfromwebpage-1.3.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c206380fe23bef011d9e6ddc78406b7dd984e8b46820be2cb3676dc1a6c5502
|
|
BLAKE2b-256 checksum How to use checksums |
3aab70ae1f241ae78b02199a00903034af746dae42a4dd43fdc1d2b8af854432
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.1
|
Security for ipfromwebpage 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.