cloudcheck 8.2.0__cp311-cp311-musllinux_1_2_i686.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,157 @@
1
+ Metadata-Version: 2.4
2
+ Name: cloudcheck
3
+ Version: 8.2.0
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
+ ### UPDATE: Now rewritten in Rust, with over 20 new providers added!
21
+
22
+ CloudCheck is a simple Rust tool to check whether an IP address or hostname belongs to a cloud provider. It includes:
23
+
24
+ - A Rust CLI
25
+ - A Rust library
26
+ - Python bindings
27
+
28
+ ## Cloud Provider Signatures
29
+
30
+ The latest cloud provider signatures are available in [`cloud_providers_v2.json`](https://github.com/blacklanternsecurity/cloudcheck/blob/master/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/).
31
+
32
+ Used by [BBOT](https://github.com/blacklanternsecurity/bbot) and [BBOT Server](https://github.com/blacklanternsecurity/bbot-server).
33
+
34
+ ## CLI Usage
35
+
36
+ ```bash
37
+ # installation
38
+ cargo install cloudcheck
39
+
40
+ # usage
41
+ cloudcheck 8.8.8.8
42
+ # output:
43
+ {
44
+ "name": "Google",
45
+ "tags": [
46
+ "cloud"
47
+ ]
48
+ }
49
+
50
+ cloudcheck asdf.amazon.com
51
+ # output:
52
+ {
53
+ "name": "Amazon",
54
+ "tags": [
55
+ "cloud"
56
+ ]
57
+ }
58
+ ```
59
+
60
+ ## Python Library Usage
61
+
62
+ ```bash
63
+ # installation
64
+ pip install cloudcheck
65
+ ```
66
+
67
+ ```python
68
+ import asyncio
69
+ from cloudcheck import CloudCheck
70
+
71
+ async def main():
72
+ cloudcheck = CloudCheck()
73
+ results = await cloudcheck.lookup("8.8.8.8")
74
+ print(results) # [{'name': 'Google', 'tags': ['cloud']}]
75
+
76
+ asyncio.run(main())
77
+ ```
78
+
79
+ ## Rust Library Usage
80
+
81
+ ```toml
82
+ # Add to Cargo.toml
83
+ [dependencies]
84
+ cloudcheck = "8.0"
85
+ tokio = { version = "1", features = ["full"] }
86
+ ```
87
+
88
+ ```rust
89
+ use cloudcheck::CloudCheck;
90
+
91
+ #[tokio::main]
92
+ async fn main() {
93
+ let cloudcheck = CloudCheck::new();
94
+ let results = cloudcheck.lookup("8.8.8.8").await.unwrap();
95
+ println!("{:?}", results); // [CloudProvider { name: "Google", tags: ["cloud"] }]
96
+ }
97
+ ```
98
+
99
+ ## Update the JSON database
100
+
101
+ ```bash
102
+ export BBOT_IO_API_KEY=<your-api-key>
103
+
104
+ uv sync
105
+ uv run cloudcheck_update/cli.py
106
+ ```
107
+
108
+ ## Adding a new cloud provider
109
+
110
+ When adding a new cloud provider:
111
+
112
+ 1. Create a new file in the `cloudcheck/providers` directory and name it whatever you want, e.g. `amazon.py`.
113
+ 2. Inside that file, create a new class that inherits from `BaseProvider`.
114
+ 3. Inside that class, fill out any of the following attributes that are relevant to your provider:
115
+ - `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.
116
+ - `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.
117
+ - `asns`: A list of ASNs, e.g. `[12345, 67890]`
118
+ - `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)
119
+ - `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)
120
+ - `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.
121
+ - `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:
122
+ - `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).
123
+ - `STORAGE_BUCKET_HOSTNAME`: A regex for the hostname of a storage bucket
124
+
125
+ In addition to the above attributes, if you have a custom source of CIDRs or 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.
126
+
127
+ ## Supported cloud providers
128
+ - Akamai ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/akamai.py))
129
+ - Alibaba ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/alibaba.py))
130
+ - Amazon ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/amazon.py))
131
+ - Arvancloud ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/arvancloud.py))
132
+ - Azure ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/azure.py))
133
+ - Backblaze ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/backblaze.py))
134
+ - Cisco ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/cisco.py))
135
+ - Cloudflare ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/cloudflare.py))
136
+ - Cloudfront ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/cloudfront.py))
137
+ - Dell ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/dell.py))
138
+ - DigitalOcean ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/digitalocean.py))
139
+ - Fastly ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/fastly.py))
140
+ - GitHub ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/github.py))
141
+ - Google ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/google.py))
142
+ - Heroku ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/heroku.py))
143
+ - Hetzner ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/hetzner.py))
144
+ - HPE ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/hpe.py))
145
+ - Huawei ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/huawei.py))
146
+ - IBM ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/ibm.py))
147
+ - Imperva ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/imperva.py))
148
+ - Kamatera ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/kamatera.py))
149
+ - Oracle Cloud ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/oracle.py))
150
+ - OVH ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/ovh.py))
151
+ - Rackspace ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/rackspace.py))
152
+ - Salesforce ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/salesforce.py))
153
+ - Scaleway ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/scaleway.py))
154
+ - Tencent ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/tencent.py))
155
+ - Wasabi ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/wasabi.py))
156
+ - Zoho ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/zoho.py))
157
+
@@ -0,0 +1,6 @@
1
+ cloudcheck-8.2.0.dist-info/METADATA,sha256=uyz5mG2-ZFllo_lqlPXlVm_pp1iygyk_djIkKFkHv8k,9020
2
+ cloudcheck-8.2.0.dist-info/WHEEL,sha256=lJbmCEDzcIU2YWcutQZLIjk7XodGOLb94HK6Gn4-WvM,106
3
+ cloudcheck.libs/libgcc_s-f5fcfe20.so.1,sha256=AgqyMrWe8E5-efp_cXekgnQn-q6zJOV7u8ZBzQVlfJc,552385
4
+ cloudcheck/__init__.py,sha256=Bhl6yAlOs8SFIL9Qw-EX8QGeHWeKfo7_IyXOeAefMgU,61
5
+ cloudcheck/cloudcheck.cpython-311-i386-linux-musl.so,sha256=3dgY1975a1rHoSYYZE9UR4NWnLLsu2AJnVZhxA5ft6w,9092969
6
+ cloudcheck-8.2.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.10.2)
3
+ Root-Is-Purelib: false
4
+ Tag: cp311-cp311-musllinux_1_2_i686
Binary file