cloudcheck 6.0.0.679__tar.gz → 7.0.694__tar.gz
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.
Potentially problematic release.
This version of cloudcheck might be problematic. Click here for more details.
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/PKG-INFO +3 -3
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloud_providers.json +29 -17
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/cloudcheck.py +1 -3
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/helpers.py +1 -1
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/providers/__init__.py +6 -14
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/providers/amazon.py +1 -5
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/providers/azure.py +4 -4
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/providers/base.py +2 -6
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/providers/digitalocean.py +1 -5
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/test/test_cloudcheck.py +1 -2
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/pyproject.toml +15 -7
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/README.md +0 -0
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/__init__.py +0 -0
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/providers/akamai.py +0 -0
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/providers/arvancloud.py +0 -0
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/providers/cloudflare.py +0 -0
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/providers/cloudfront.py +0 -0
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/providers/fastly.py +0 -0
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/providers/github.py +0 -0
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/providers/google.py +0 -0
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/providers/hetzner.py +0 -0
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/providers/imperva.py +0 -0
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/providers/oracle.py +0 -0
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/providers/zoho.py +0 -0
- {cloudcheck-6.0.0.679 → cloudcheck-7.0.694}/cloudcheck/test/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cloudcheck
|
|
3
|
-
Version:
|
|
3
|
+
Version: 7.0.694
|
|
4
4
|
Summary: Check whether an IP address belongs to a cloud provider
|
|
5
5
|
Home-page: https://github.com/blacklanternsecurity/cloudcheck
|
|
6
6
|
License: GPL-3.0
|
|
@@ -13,9 +13,9 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
-
Requires-Dist: httpx (>=0.26,<0.
|
|
16
|
+
Requires-Dist: httpx (>=0.26,<0.29)
|
|
17
17
|
Requires-Dist: pydantic (>=2.4.2,<3.0.0)
|
|
18
|
-
Requires-Dist: radixtarget (>=
|
|
18
|
+
Requires-Dist: radixtarget (>=3.0.13,<4.0.0)
|
|
19
19
|
Requires-Dist: regex (>=2024.4.16,<2025.0.0)
|
|
20
20
|
Project-URL: Discord, https://discord.com/invite/PZqkgxu5SA
|
|
21
21
|
Project-URL: PyPi, https://pypi.org/project/cloudcheck/
|
|
@@ -450,6 +450,7 @@
|
|
|
450
450
|
"104.73.92.0/22",
|
|
451
451
|
"104.74.128.0/24",
|
|
452
452
|
"104.74.130.0/24",
|
|
453
|
+
"104.74.131.0/24",
|
|
453
454
|
"104.74.148.0/22",
|
|
454
455
|
"104.74.152.0/23",
|
|
455
456
|
"104.74.160.0/19",
|
|
@@ -983,6 +984,7 @@
|
|
|
983
984
|
"172.104.128.0/19",
|
|
984
985
|
"172.104.16.0/20",
|
|
985
986
|
"172.104.160.0/19",
|
|
987
|
+
"172.104.180.49/32",
|
|
986
988
|
"172.104.187.122/32",
|
|
987
989
|
"172.104.190.47/32",
|
|
988
990
|
"172.104.191.185/32",
|
|
@@ -1578,7 +1580,6 @@
|
|
|
1578
1580
|
"172.232.0.0/13",
|
|
1579
1581
|
"172.232.0.0/19",
|
|
1580
1582
|
"172.232.128.0/19",
|
|
1581
|
-
"172.232.148.12/32",
|
|
1582
1583
|
"172.232.160.0/19",
|
|
1583
1584
|
"172.232.192.0/19",
|
|
1584
1585
|
"172.232.224.0/19",
|
|
@@ -3166,6 +3167,7 @@
|
|
|
3166
3167
|
"2.23.226.0/24",
|
|
3167
3168
|
"2.23.227.0/24",
|
|
3168
3169
|
"2.23.230.0/24",
|
|
3170
|
+
"2.23.236.0/24",
|
|
3169
3171
|
"2.23.24.0/22",
|
|
3170
3172
|
"2.23.28.0/22",
|
|
3171
3173
|
"2.23.3.0/24",
|
|
@@ -6714,6 +6716,7 @@
|
|
|
6714
6716
|
"23.46.11.0/24",
|
|
6715
6717
|
"23.46.112.0/20",
|
|
6716
6718
|
"23.46.128.0/20",
|
|
6719
|
+
"23.46.13.0/24",
|
|
6717
6720
|
"23.46.14.0/24",
|
|
6718
6721
|
"23.46.144.0/24",
|
|
6719
6722
|
"23.46.145.0/24",
|
|
@@ -8193,6 +8196,7 @@
|
|
|
8193
8196
|
"2600:1402:15::/48",
|
|
8194
8197
|
"2600:1402:16::/48",
|
|
8195
8198
|
"2600:1402:19::/48",
|
|
8199
|
+
"2600:1402:1a::/48",
|
|
8196
8200
|
"2600:1402:1b::/48",
|
|
8197
8201
|
"2600:1402:1c00::/48",
|
|
8198
8202
|
"2600:1402:1c::/48",
|
|
@@ -9161,6 +9165,7 @@
|
|
|
9161
9165
|
"2a02:26f0:2c::/48",
|
|
9162
9166
|
"2a02:26f0:2d80::/48",
|
|
9163
9167
|
"2a02:26f0:2e80::/48",
|
|
9168
|
+
"2a02:26f0:2f80::/48",
|
|
9164
9169
|
"2a02:26f0:3000::/48",
|
|
9165
9170
|
"2a02:26f0:300::/48",
|
|
9166
9171
|
"2a02:26f0:3080::/48",
|
|
@@ -11563,9 +11568,12 @@
|
|
|
11563
11568
|
"95.101.54.0/24",
|
|
11564
11569
|
"95.101.55.0/24",
|
|
11565
11570
|
"95.101.56.0/22",
|
|
11571
|
+
"95.101.60.0/24",
|
|
11572
|
+
"95.101.61.0/24",
|
|
11566
11573
|
"95.101.62.0/24",
|
|
11567
11574
|
"95.101.63.0/24",
|
|
11568
11575
|
"95.101.64.0/22",
|
|
11576
|
+
"95.101.72.0/24",
|
|
11569
11577
|
"95.101.74.0/24",
|
|
11570
11578
|
"95.101.75.0/24",
|
|
11571
11579
|
"95.101.76.0/24",
|
|
@@ -11836,7 +11844,7 @@
|
|
|
11836
11844
|
"srtcdn.net"
|
|
11837
11845
|
],
|
|
11838
11846
|
"ips_url": "https://techdocs.akamai.com/property-manager/pdfs/akamai_ipv4_ipv6_CIDRs-txt.zip",
|
|
11839
|
-
"last_updated": "2024-12-
|
|
11847
|
+
"last_updated": "2024-12-03T00:40:32.586686",
|
|
11840
11848
|
"name": "Akamai",
|
|
11841
11849
|
"provider_type": "cdn",
|
|
11842
11850
|
"regexes": {}
|
|
@@ -12085,7 +12093,10 @@
|
|
|
12085
12093
|
"13.127.70.160/29",
|
|
12086
12094
|
"13.134.0.0/15",
|
|
12087
12095
|
"13.184.0.0/13",
|
|
12088
|
-
"13.192.0.0/
|
|
12096
|
+
"13.192.0.0/16",
|
|
12097
|
+
"13.193.0.0/16",
|
|
12098
|
+
"13.194.0.0/15",
|
|
12099
|
+
"13.196.0.0/14",
|
|
12089
12100
|
"13.200.0.0/15",
|
|
12090
12101
|
"13.200.140.0/23",
|
|
12091
12102
|
"13.200.142.112/30",
|
|
@@ -13842,6 +13853,8 @@
|
|
|
13842
13853
|
"150.222.97.0/24",
|
|
13843
13854
|
"150.222.98.0/24",
|
|
13844
13855
|
"150.222.99.0/24",
|
|
13856
|
+
"150.247.32.0/24",
|
|
13857
|
+
"150.247.33.0/24",
|
|
13845
13858
|
"151.148.16.0/31",
|
|
13846
13859
|
"151.148.16.10/31",
|
|
13847
13860
|
"151.148.16.2/32",
|
|
@@ -15607,7 +15620,6 @@
|
|
|
15607
15620
|
"35.96.4.0/24",
|
|
15608
15621
|
"35.96.48.0/20",
|
|
15609
15622
|
"35.96.5.0/24",
|
|
15610
|
-
"35.96.6.0/24",
|
|
15611
15623
|
"35.96.64.0/20",
|
|
15612
15624
|
"35.96.8.0/24",
|
|
15613
15625
|
"35.96.80.0/20",
|
|
@@ -18062,7 +18074,7 @@
|
|
|
18062
18074
|
"thinkboxsoftware.com"
|
|
18063
18075
|
],
|
|
18064
18076
|
"ips_url": "https://ip-ranges.amazonaws.com/ip-ranges.json",
|
|
18065
|
-
"last_updated": "2024-12-
|
|
18077
|
+
"last_updated": "2024-12-03T00:40:32.584496",
|
|
18066
18078
|
"name": "Amazon",
|
|
18067
18079
|
"provider_type": "cloud",
|
|
18068
18080
|
"regexes": {
|
|
@@ -18117,7 +18129,7 @@
|
|
|
18117
18129
|
"arvancloud.ir"
|
|
18118
18130
|
],
|
|
18119
18131
|
"ips_url": "https://www.arvancloud.ir/en/ips.txt",
|
|
18120
|
-
"last_updated": "2024-12-
|
|
18132
|
+
"last_updated": "2024-12-03T00:40:32.866811",
|
|
18121
18133
|
"name": "Arvancloud",
|
|
18122
18134
|
"provider_type": "cdn",
|
|
18123
18135
|
"regexes": {}
|
|
@@ -21810,7 +21822,7 @@
|
|
|
21810
21822
|
"windowsazurestatus.cn"
|
|
21811
21823
|
],
|
|
21812
21824
|
"ips_url": "https://download.microsoft.com/download/0/1/8/018E208D-54F8-44CD-AA26-CD7BC9524A8C/PublicIPs_20200824.xml",
|
|
21813
|
-
"last_updated": "2024-12-
|
|
21825
|
+
"last_updated": "2024-12-03T00:40:31.331342",
|
|
21814
21826
|
"name": "Azure",
|
|
21815
21827
|
"provider_type": "cloud",
|
|
21816
21828
|
"regexes": {
|
|
@@ -21881,7 +21893,7 @@
|
|
|
21881
21893
|
"workers.dev"
|
|
21882
21894
|
],
|
|
21883
21895
|
"ips_url": "https://api.cloudflare.com/client/v4/ips",
|
|
21884
|
-
"last_updated": "2024-12-
|
|
21896
|
+
"last_updated": "2024-12-03T00:40:31.877348",
|
|
21885
21897
|
"name": "Cloudflare",
|
|
21886
21898
|
"provider_type": "cdn",
|
|
21887
21899
|
"regexes": {
|
|
@@ -22083,7 +22095,7 @@
|
|
|
22083
22095
|
"cloudfront.net"
|
|
22084
22096
|
],
|
|
22085
22097
|
"ips_url": "https://d7uri8nf7uskq.cloudfront.net/tools/list-cloudfront-ips",
|
|
22086
|
-
"last_updated": "2024-12-
|
|
22098
|
+
"last_updated": "2024-12-03T00:40:32.601213",
|
|
22087
22099
|
"name": "Cloudfront",
|
|
22088
22100
|
"provider_type": "cdn",
|
|
22089
22101
|
"regexes": {}
|
|
@@ -23245,7 +23257,7 @@
|
|
|
23245
23257
|
"nginxconfig.io"
|
|
23246
23258
|
],
|
|
23247
23259
|
"ips_url": "https://digitalocean.com/geo/google.csv",
|
|
23248
|
-
"last_updated": "2024-12-
|
|
23260
|
+
"last_updated": "2024-12-03T00:40:32.127038",
|
|
23249
23261
|
"name": "DigitalOcean",
|
|
23250
23262
|
"provider_type": "cloud",
|
|
23251
23263
|
"regexes": {
|
|
@@ -23287,7 +23299,7 @@
|
|
|
23287
23299
|
"zencdn.net"
|
|
23288
23300
|
],
|
|
23289
23301
|
"ips_url": "https://api.fastly.com/public-ip-list",
|
|
23290
|
-
"last_updated": "2024-12-
|
|
23302
|
+
"last_updated": "2024-12-03T00:40:31.075513",
|
|
23291
23303
|
"name": "Fastly",
|
|
23292
23304
|
"provider_type": "cloud",
|
|
23293
23305
|
"regexes": {}
|
|
@@ -28477,7 +28489,7 @@
|
|
|
28477
28489
|
"github.com"
|
|
28478
28490
|
],
|
|
28479
28491
|
"ips_url": "https://api.github.com/meta",
|
|
28480
|
-
"last_updated": "2024-12-
|
|
28492
|
+
"last_updated": "2024-12-03T00:40:31.874245",
|
|
28481
28493
|
"name": "GitHub",
|
|
28482
28494
|
"provider_type": "cdn",
|
|
28483
28495
|
"regexes": {}
|
|
@@ -29212,7 +29224,7 @@
|
|
|
29212
29224
|
"googleapis.com"
|
|
29213
29225
|
],
|
|
29214
29226
|
"ips_url": "https://www.gstatic.com/ipranges/cloud.json",
|
|
29215
|
-
"last_updated": "2024-12-
|
|
29227
|
+
"last_updated": "2024-12-03T00:40:31.951862",
|
|
29216
29228
|
"name": "Google",
|
|
29217
29229
|
"provider_type": "cloud",
|
|
29218
29230
|
"regexes": {
|
|
@@ -29701,7 +29713,7 @@
|
|
|
29701
29713
|
"your-server.de"
|
|
29702
29714
|
],
|
|
29703
29715
|
"ips_url": "",
|
|
29704
|
-
"last_updated": "2024-12-
|
|
29716
|
+
"last_updated": "2024-12-03T00:40:29.953743",
|
|
29705
29717
|
"name": "Hetzner",
|
|
29706
29718
|
"provider_type": "cloud",
|
|
29707
29719
|
"regexes": {
|
|
@@ -29746,7 +29758,7 @@
|
|
|
29746
29758
|
"imperva.com"
|
|
29747
29759
|
],
|
|
29748
29760
|
"ips_url": "https://my.imperva.com/api/integration/v1/ips",
|
|
29749
|
-
"last_updated": "2024-12-
|
|
29761
|
+
"last_updated": "2024-12-03T00:40:32.019759",
|
|
29750
29762
|
"name": "Imperva",
|
|
29751
29763
|
"provider_type": "cdn",
|
|
29752
29764
|
"regexes": {}
|
|
@@ -30533,7 +30545,7 @@
|
|
|
30533
30545
|
"sun.com"
|
|
30534
30546
|
],
|
|
30535
30547
|
"ips_url": "https://docs.oracle.com/en-us/iaas/tools/public_ip_ranges.json",
|
|
30536
|
-
"last_updated": "2024-12-
|
|
30548
|
+
"last_updated": "2024-12-03T00:40:32.014654",
|
|
30537
30549
|
"name": "Oracle",
|
|
30538
30550
|
"provider_type": "cloud",
|
|
30539
30551
|
"regexes": {}
|
|
@@ -30614,7 +30626,7 @@
|
|
|
30614
30626
|
"zohowebstatic.com"
|
|
30615
30627
|
],
|
|
30616
30628
|
"ips_url": "",
|
|
30617
|
-
"last_updated": "2024-12-
|
|
30629
|
+
"last_updated": "2024-12-03T00:40:16.300539",
|
|
30618
30630
|
"name": "Zoho",
|
|
30619
30631
|
"provider_type": "cloud",
|
|
30620
30632
|
"regexes": {}
|
|
@@ -8,9 +8,7 @@ from cloudcheck.providers import cloud_providers
|
|
|
8
8
|
async def _main():
|
|
9
9
|
ips = sys.argv[1:]
|
|
10
10
|
if not ips:
|
|
11
|
-
print(
|
|
12
|
-
"usage: cloudcheck 1.2.3.4 [update | forceupdate | [ips...] | [domains...]]"
|
|
13
|
-
)
|
|
11
|
+
print("usage: cloudcheck 1.2.3.4 [update | forceupdate | [ips...] | [domains...]]")
|
|
14
12
|
elif len(ips) == 1 and ips[0].lower() == "update":
|
|
15
13
|
await cloud_providers.update()
|
|
16
14
|
return
|
|
@@ -23,11 +23,7 @@ for file in Path(__file__).parent.glob("*.py"):
|
|
|
23
23
|
module_variables = importlib.import_module(import_path, "cloudcheck")
|
|
24
24
|
for variable in module_variables.__dict__.keys():
|
|
25
25
|
value = getattr(module_variables, variable)
|
|
26
|
-
if (
|
|
27
|
-
hasattr(value, "__mro__")
|
|
28
|
-
and not value == BaseCloudProvider
|
|
29
|
-
and BaseCloudProvider in value.__mro__
|
|
30
|
-
):
|
|
26
|
+
if hasattr(value, "__mro__") and not value == BaseCloudProvider and BaseCloudProvider in value.__mro__:
|
|
31
27
|
provider_name = value.__name__.lower()
|
|
32
28
|
providers[provider_name] = value
|
|
33
29
|
|
|
@@ -103,9 +99,7 @@ class CloudProviders:
|
|
|
103
99
|
if self.last_updated > oldest_allowed and not force:
|
|
104
100
|
return
|
|
105
101
|
try:
|
|
106
|
-
async with httpx.AsyncClient(
|
|
107
|
-
transport=httpx.AsyncHTTPTransport(verify=False)
|
|
108
|
-
) as client:
|
|
102
|
+
async with httpx.AsyncClient(transport=httpx.AsyncHTTPTransport(verify=False)) as client:
|
|
109
103
|
response = await client.get(self.json_url)
|
|
110
104
|
except Exception as e:
|
|
111
105
|
error = e
|
|
@@ -113,10 +107,10 @@ class CloudProviders:
|
|
|
113
107
|
with open(self.json_path, "wb") as f:
|
|
114
108
|
f.write(response.content)
|
|
115
109
|
self.load_from_json(force=True)
|
|
110
|
+
for provider in self:
|
|
111
|
+
provider.radix.defrag()
|
|
116
112
|
else:
|
|
117
|
-
log.warning(
|
|
118
|
-
f"Failed to retrieve update from {self.json_url} (response: {response}, error: {error})"
|
|
119
|
-
)
|
|
113
|
+
log.warning(f"Failed to retrieve update from {self.json_url} (response: {response}, error: {error})")
|
|
120
114
|
|
|
121
115
|
async def update_from_sources(self):
|
|
122
116
|
tasks = [asyncio.create_task(p.update()) for p in self]
|
|
@@ -124,9 +118,7 @@ class CloudProviders:
|
|
|
124
118
|
j = self.to_json()
|
|
125
119
|
if j:
|
|
126
120
|
with open(self.json_path, "w") as f:
|
|
127
|
-
json.dump(
|
|
128
|
-
self.to_json(), f, sort_keys=True, indent=4, cls=CustomJSONEncoder
|
|
129
|
-
)
|
|
121
|
+
json.dump(self.to_json(), f, sort_keys=True, cls=CustomJSONEncoder)
|
|
130
122
|
self.load_from_json(force=True)
|
|
131
123
|
|
|
132
124
|
def to_json(self):
|
|
@@ -47,11 +47,7 @@ class Amazon(BaseCloudProvider):
|
|
|
47
47
|
"thinkboxsoftware.com",
|
|
48
48
|
]
|
|
49
49
|
bucket_name_regex = r"[a-z0-9_][a-z0-9-\.]{1,61}[a-z0-9]"
|
|
50
|
-
regexes = {
|
|
51
|
-
"STORAGE_BUCKET": [
|
|
52
|
-
r"(" + bucket_name_regex + r")\.(s3-?(?:[a-z0-9-]*\.){1,2}amazonaws\.com)"
|
|
53
|
-
]
|
|
54
|
-
}
|
|
50
|
+
regexes = {"STORAGE_BUCKET": [r"(" + bucket_name_regex + r")\.(s3-?(?:[a-z0-9-]*\.){1,2}amazonaws\.com)"]}
|
|
55
51
|
|
|
56
52
|
ips_url = "https://ip-ranges.amazonaws.com/ip-ranges.json"
|
|
57
53
|
|
|
@@ -144,11 +144,11 @@ class Azure(BaseCloudProvider):
|
|
|
144
144
|
"windowsazurestatus.cn",
|
|
145
145
|
]
|
|
146
146
|
bucket_name_regex = r"[a-z0-9][a-z0-9-_\.]{1,61}[a-z0-9]"
|
|
147
|
-
regexes = {
|
|
148
|
-
"STORAGE_BUCKET": [r"(" + bucket_name_regex + r")\.(blob\.core\.windows\.net)"]
|
|
149
|
-
}
|
|
147
|
+
regexes = {"STORAGE_BUCKET": [r"(" + bucket_name_regex + r")\.(blob\.core\.windows\.net)"]}
|
|
150
148
|
|
|
151
|
-
ips_url =
|
|
149
|
+
ips_url = (
|
|
150
|
+
"https://download.microsoft.com/download/0/1/8/018E208D-54F8-44CD-AA26-CD7BC9524A8C/PublicIPs_20200824.xml"
|
|
151
|
+
)
|
|
152
152
|
|
|
153
153
|
def parse_response(self, response):
|
|
154
154
|
ranges = set()
|
|
@@ -66,9 +66,7 @@ class BaseCloudProvider:
|
|
|
66
66
|
self.radix = Target()
|
|
67
67
|
if j is not None:
|
|
68
68
|
p = CloudProviderJSON(**j)
|
|
69
|
-
self.update_domains(
|
|
70
|
-
[d.lower() for d in set(list(self.domains) + list(p.domains))]
|
|
71
|
-
)
|
|
69
|
+
self.update_domains([d.lower() for d in set(list(self.domains) + list(p.domains))])
|
|
72
70
|
self.update_ranges(p.cidrs)
|
|
73
71
|
self.last_updated = p.last_updated
|
|
74
72
|
|
|
@@ -95,9 +93,7 @@ class BaseCloudProvider:
|
|
|
95
93
|
try:
|
|
96
94
|
self.ranges = self.get_subnets()
|
|
97
95
|
if self.ips_url:
|
|
98
|
-
async with httpx.AsyncClient(
|
|
99
|
-
transport=httpx.AsyncHTTPTransport(verify=False)
|
|
100
|
-
) as client:
|
|
96
|
+
async with httpx.AsyncClient(transport=httpx.AsyncHTTPTransport(verify=False)) as client:
|
|
101
97
|
response = await client.get(
|
|
102
98
|
self.ips_url,
|
|
103
99
|
follow_redirects=True,
|
|
@@ -12,11 +12,7 @@ class DigitalOcean(BaseCloudProvider):
|
|
|
12
12
|
]
|
|
13
13
|
|
|
14
14
|
bucket_name_regex = r"[a-z0-9][a-z0-9-]{2,62}"
|
|
15
|
-
regexes = {
|
|
16
|
-
"STORAGE_BUCKET": [
|
|
17
|
-
r"(" + bucket_name_regex + r")\.([a-z]{3}[\d]{1}\.digitaloceanspaces\.com)"
|
|
18
|
-
]
|
|
19
|
-
}
|
|
15
|
+
regexes = {"STORAGE_BUCKET": [r"(" + bucket_name_regex + r")\.([a-z]{3}[\d]{1}\.digitaloceanspaces\.com)"]}
|
|
20
16
|
|
|
21
17
|
ips_url = "https://digitalocean.com/geo/google.csv"
|
|
22
18
|
|
|
@@ -31,7 +31,7 @@ async def test_cloudcheck():
|
|
|
31
31
|
|
|
32
32
|
google = cloud_providers.providers["google"]
|
|
33
33
|
assert google.check("test.asdf.google") == "google"
|
|
34
|
-
assert google.check("test.asdf.google.asdf")
|
|
34
|
+
assert google.check("test.asdf.google.asdf") is None
|
|
35
35
|
|
|
36
36
|
assert cloud_providers.check("asdf.google") == [("Google", "cloud", "google")]
|
|
37
37
|
assert cloud_providers.check("asdf.googles") == []
|
|
@@ -72,7 +72,6 @@ async def test_cloudcheck():
|
|
|
72
72
|
|
|
73
73
|
@pytest.mark.asyncio
|
|
74
74
|
async def test_cloudcheck_cli(monkeypatch, capsys):
|
|
75
|
-
|
|
76
75
|
from cloudcheck.cloudcheck import _main
|
|
77
76
|
|
|
78
77
|
monkeypatch.setattr(sys, "exit", lambda *args, **kwargs: True)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "cloudcheck"
|
|
3
|
-
version = "
|
|
3
|
+
version = "v7.0.694"
|
|
4
4
|
description = "Check whether an IP address belongs to a cloud provider"
|
|
5
5
|
authors = ["TheTechromancer"]
|
|
6
6
|
license = "GPL-3.0"
|
|
@@ -16,19 +16,27 @@ homepage = "https://github.com/blacklanternsecurity/cloudcheck"
|
|
|
16
16
|
[tool.poetry.scripts]
|
|
17
17
|
cloudcheck = 'cloudcheck.cloudcheck:main'
|
|
18
18
|
|
|
19
|
+
[tool.ruff]
|
|
20
|
+
line-length = 119
|
|
21
|
+
lint.ignore = ["E402", "E721", "E741", "F401", "F403", "F405", "E713"]
|
|
22
|
+
|
|
19
23
|
[tool.poetry.dependencies]
|
|
20
24
|
python = "^3.9"
|
|
21
25
|
pydantic = "^2.4.2"
|
|
22
|
-
httpx = ">=0.26,<0.
|
|
26
|
+
httpx = ">=0.26,<0.29"
|
|
23
27
|
regex = "^2024.4.16"
|
|
24
|
-
radixtarget = "^
|
|
28
|
+
radixtarget = "^3.0.13"
|
|
25
29
|
|
|
26
30
|
[tool.poetry.group.dev.dependencies]
|
|
27
|
-
black = ">=22.12,<25.0"
|
|
28
|
-
flake8 = ">=6.1,<8.0"
|
|
29
31
|
pytest-asyncio = ">=0.21.1,<0.25.0"
|
|
30
32
|
pytest = "^8.1.1"
|
|
33
|
+
ruff = "^0.8.1"
|
|
31
34
|
|
|
32
35
|
[build-system]
|
|
33
|
-
requires = ["poetry-core"]
|
|
34
|
-
build-backend = "
|
|
36
|
+
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
|
|
37
|
+
build-backend = "poetry_dynamic_versioning.backend"
|
|
38
|
+
|
|
39
|
+
[tool.poetry-dynamic-versioning]
|
|
40
|
+
enable = false
|
|
41
|
+
metadata = false
|
|
42
|
+
format-jinja = 'v7.0.{{ distance }}'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|