cloudcheck 8.1.1rc5__cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
cloudcheck/__init__.py ADDED
@@ -0,0 +1,3 @@
1
+ from .cloudcheck import CloudCheck
2
+
3
+ __all__ = ["CloudCheck"]
@@ -0,0 +1,155 @@
1
+ Metadata-Version: 2.4
2
+ Name: cloudcheck
3
+ Version: 8.1.1rc5
4
+ Summary: Detailed database of cloud providers. Instantly look up a domain or IP address
5
+ Requires-Python: >=3.9
6
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
7
+
8
+ # CloudCheck
9
+
10
+ [![Python Version](https://img.shields.io/badge/python-3.9+-blue)](https://www.python.org)
11
+ [![PyPI](https://img.shields.io/pypi/v/cloudcheck)](https://pypi.org/project/cloudcheck/)
12
+ [![Rust Version](https://img.shields.io/badge/rust-1.70+-orange)](https://www.rust-lang.org)
13
+ [![Crates.io](https://img.shields.io/crates/v/cloudcheck?color=orange)](https://crates.io/crates/cloudcheck)
14
+ [![License](https://img.shields.io/badge/license-GPLv3-blue.svg)](https://github.com/blacklanternsecurity/cloudcheck/blob/master/LICENSE)
15
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
16
+ [![Rust Tests](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/rust-tests.yml/badge.svg?branch=master)](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/rust-tests.yml)
17
+ [![Python Tests](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/python-tests.yml/badge.svg?branch=master)](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/python-tests.yml)
18
+ [![Pipeline Tests](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/pipeline-tests.yml/badge.svg?branch=master)](https://github.com/blacklanternsecurity/cloudcheck/actions/workflows/pipeline-tests.yml)
19
+
20
+ CloudCheck is a simple Rust tool to check whether an IP address or hostname belongs to a cloud provider. It includes:
21
+
22
+ - A Rust CLI
23
+ - A Rust library
24
+ - Python bindings
25
+
26
+ ## Cloud Provider Signatures
27
+
28
+ The latest cloud provider signatures are available in `cloud_providers_v2.json`, which is updated daily via CI/CD. Domains associated with each cloud provider are fetched dynamically from the [v2fly community repository](https://github.com/v2fly/domain-list-community), and CIDRs are fetched from [ASNDB](https://asndb.api.bbot.io/).
29
+
30
+ Used by [BBOT](https://github.com/blacklanternsecurity/bbot) and [BBOT Server](https://github.com/blacklanternsecurity/bbot-server).
31
+
32
+ ## CLI Usage
33
+
34
+ ```bash
35
+ # installation
36
+ cargo install cloudcheck
37
+
38
+ # usage
39
+ cloudcheck 8.8.8.8
40
+ # output:
41
+ {
42
+ "name": "Google",
43
+ "tags": [
44
+ "cloud"
45
+ ]
46
+ }
47
+
48
+ cloudcheck asdf.amazon.com
49
+ # output:
50
+ {
51
+ "name": "Amazon",
52
+ "tags": [
53
+ "cloud"
54
+ ]
55
+ }
56
+ ```
57
+
58
+ ## Python Library Usage
59
+
60
+ ```bash
61
+ # installation
62
+ pip install cloudcheck
63
+ ```
64
+
65
+ ```python
66
+ import asyncio
67
+ from cloudcheck import CloudCheck
68
+
69
+ async def main():
70
+ cloudcheck = CloudCheck()
71
+ results = await cloudcheck.lookup("8.8.8.8")
72
+ print(results) # [{'name': 'Google', 'tags': ['cloud']}]
73
+
74
+ asyncio.run(main())
75
+ ```
76
+
77
+ ## Rust Library Usage
78
+
79
+ ```toml
80
+ # Add to Cargo.toml
81
+ [dependencies]
82
+ cloudcheck = "8.0"
83
+ tokio = { version = "1", features = ["full"] }
84
+ ```
85
+
86
+ ```rust
87
+ use cloudcheck::CloudCheck;
88
+
89
+ #[tokio::main]
90
+ async fn main() {
91
+ let cloudcheck = CloudCheck::new();
92
+ let results = cloudcheck.lookup("8.8.8.8").await.unwrap();
93
+ println!("{:?}", results); // [CloudProvider { name: "Google", tags: ["cloud"] }]
94
+ }
95
+ ```
96
+
97
+ ## Update the JSON database
98
+
99
+ ```bash
100
+ export BBOT_IO_API_KEY=<your-api-key>
101
+
102
+ uv sync
103
+ uv run cloudcheck_update/cli.py
104
+ ```
105
+
106
+ ## Adding a new cloud provider
107
+
108
+ When adding a new cloud provider:
109
+
110
+ 1. Create a new file in the `cloudcheck/providers` directory and name it whatever you want, e.g. `amazon.py`.
111
+ 2. Inside that file, create a new class that inherits from `BaseProvider`.
112
+ 3. Inside that class, fill out any of the following attributes that are relevant to your provider:
113
+ - `v2fly_company`: The company name for v2fly domain fetching. This will dynamically fetch domains from the v2fly community repository, whose purpose is to keep track of domain ownership across different companies.
114
+ - `org_ids`: A list of organization IDs from ASNDB. These are always preferable to hard-coded ASNs or CIDRs, since they are updated daily from live sources. Big companies like Amazon typically have one organization ID per Regional Internet Registries (ARIN, RIPE, APNIC, LACNIC, AFRINIC), and within that organization ID, they may have multiple ASNs.
115
+ - `asns`: A list of ASNs, e.g. `[12345, 67890]`
116
+ - `cidrs`: A list of CIDRs, e.g. `["1.2.3.4/32", "5.6.7.8/32"]` (it's always preferred to use `org_ids` or if necessary `asns` over manually-specified CIDRs)
117
+ - `domains`: A list of domains, e.g. `["amazon.com", "amazon.co.uk"]` (it's always preferred to use `v2fly_company` instead of hard-coding domains)
118
+ - `tags`: A list of tags for the provider. These are used in BBOT to tag IPs, DNS names etc. that match this provider. Examples: `cloud`, `cdn`, `waf`, etc.
119
+ - `regexes`: A dictionary of regexes for the provider. These are used in BBOT to extract / validate cloud resources like storage buckets. Currently valid regexes are:
120
+ - `STORAGE_BUCKET_NAME`: A regex for the name of a storage bucket (useful when brute-forcing bucket names, as you can discard invalid bucket names early).
121
+ - `STORAGE_BUCKET_HOSTNAME`: A regex for the hostname of a storage bucket
122
+
123
+ In addition to the above attributes, if you have a custom source of CIDRsor domains, you can override the `fetch_cidrs()` or `fetch_domains()` methods (which by default return an empty list) to go fetch your custom TXT/JSON file, etc.
124
+
125
+ ## Supported cloud providers
126
+ - Akamai ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/akamai.py))
127
+ - Alibaba ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/alibaba.py))
128
+ - Amazon ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/amazon.py))
129
+ - Arvancloud ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/arvancloud.py))
130
+ - Azure ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/azure.py))
131
+ - Backblaze ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/backblaze.py))
132
+ - Cisco ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/cisco.py))
133
+ - Cloudflare ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/cloudflare.py))
134
+ - Cloudfront ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/cloudfront.py))
135
+ - Dell ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/dell.py))
136
+ - DigitalOcean ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/digitalocean.py))
137
+ - Fastly ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/fastly.py))
138
+ - GitHub ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/github.py))
139
+ - Google ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/google.py))
140
+ - Heroku ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/heroku.py))
141
+ - Hetzner ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/hetzner.py))
142
+ - HPE ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/hpe.py))
143
+ - Huawei ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/huawei.py))
144
+ - IBM ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/ibm.py))
145
+ - Imperva ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/imperva.py))
146
+ - Kamatera ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/kamatera.py))
147
+ - Oracle Cloud ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/oracle.py))
148
+ - OVH ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/ovh.py))
149
+ - Rackspace ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/rackspace.py))
150
+ - Salesforce ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/salesforce.py))
151
+ - Scaleway ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/scaleway.py))
152
+ - Tencent ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/tencent.py))
153
+ - Wasabi ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/wasabi.py))
154
+ - Zoho ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/zoho.py))
155
+
@@ -0,0 +1,5 @@
1
+ cloudcheck-8.1.1rc5.dist-info/METADATA,sha256=MQczsG6-VfxbdvIPMPhceBi8K7KihJZKpQH0T9Bybxw,8862
2
+ cloudcheck-8.1.1rc5.dist-info/WHEEL,sha256=l5lUCC9EynZbrLWi3yf8EUznpajUyrtj4U5klTwXM3M,151
3
+ cloudcheck/__init__.py,sha256=Bhl6yAlOs8SFIL9Qw-EX8QGeHWeKfo7_IyXOeAefMgU,61
4
+ cloudcheck/cloudcheck.cpython-314t-aarch64-linux-gnu.so,sha256=hnuwhR2FdlkcTEyhoC4Y8f0CcHq3syZhXmNP8jCuNt0,10166640
5
+ cloudcheck-8.1.1rc5.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.10.2)
3
+ Root-Is-Purelib: false
4
+ Tag: cp314-cp314t-manylinux_2_17_aarch64
5
+ Tag: cp314-cp314t-manylinux2014_aarch64