cloudcheck 6.0.0.651__py3-none-any.whl → 6.0.0.661__py3-none-any.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.
Potentially problematic release.
This version of cloudcheck might be problematic. Click here for more details.
- cloud_providers.json +27 -12
- cloudcheck/providers/arvancloud.py +22 -0
- cloudcheck/providers/base.py +2 -1
- cloudcheck/providers/cloudfront.py +21 -0
- cloudcheck/test/test_cloudcheck.py +9 -7
- {cloudcheck-6.0.0.651.dist-info → cloudcheck-6.0.0.661.dist-info}/METADATA +10 -8
- {cloudcheck-6.0.0.651.dist-info → cloudcheck-6.0.0.661.dist-info}/RECORD +9 -7
- {cloudcheck-6.0.0.651.dist-info → cloudcheck-6.0.0.661.dist-info}/WHEEL +0 -0
- {cloudcheck-6.0.0.651.dist-info → cloudcheck-6.0.0.661.dist-info}/entry_points.txt +0 -0
cloud_providers.json
CHANGED
|
@@ -823,6 +823,7 @@
|
|
|
823
823
|
"104.99.57.0/24",
|
|
824
824
|
"104.99.59.0/24",
|
|
825
825
|
"104.99.60.0/22",
|
|
826
|
+
"109.230.127.0/24",
|
|
826
827
|
"109.237.24.0/22",
|
|
827
828
|
"109.69.136.0/21",
|
|
828
829
|
"109.74.192.0/20",
|
|
@@ -11737,7 +11738,7 @@
|
|
|
11737
11738
|
"srtcdn.net"
|
|
11738
11739
|
],
|
|
11739
11740
|
"ips_url": "https://techdocs.akamai.com/property-manager/pdfs/akamai_ipv4_ipv6_CIDRs-txt.zip",
|
|
11740
|
-
"last_updated": "2024-11-
|
|
11741
|
+
"last_updated": "2024-11-16T18:52:05.117959",
|
|
11741
11742
|
"name": "Akamai",
|
|
11742
11743
|
"provider_type": "cdn",
|
|
11743
11744
|
"regexes": {}
|
|
@@ -17946,7 +17947,7 @@
|
|
|
17946
17947
|
"thinkboxsoftware.com"
|
|
17947
17948
|
],
|
|
17948
17949
|
"ips_url": "https://ip-ranges.amazonaws.com/ip-ranges.json",
|
|
17949
|
-
"last_updated": "2024-11-
|
|
17950
|
+
"last_updated": "2024-11-16T18:52:04.691760",
|
|
17950
17951
|
"name": "Amazon",
|
|
17951
17952
|
"provider_type": "cloud",
|
|
17952
17953
|
"regexes": {
|
|
@@ -21643,7 +21644,7 @@
|
|
|
21643
21644
|
"windowsazurestatus.cn"
|
|
21644
21645
|
],
|
|
21645
21646
|
"ips_url": "https://download.microsoft.com/download/0/1/8/018E208D-54F8-44CD-AA26-CD7BC9524A8C/PublicIPs_20200824.xml",
|
|
21646
|
-
"last_updated": "2024-11-
|
|
21647
|
+
"last_updated": "2024-11-16T18:52:03.618431",
|
|
21647
21648
|
"name": "Azure",
|
|
21648
21649
|
"provider_type": "cloud",
|
|
21649
21650
|
"regexes": {
|
|
@@ -21714,7 +21715,7 @@
|
|
|
21714
21715
|
"workers.dev"
|
|
21715
21716
|
],
|
|
21716
21717
|
"ips_url": "https://api.cloudflare.com/client/v4/ips",
|
|
21717
|
-
"last_updated": "2024-11-
|
|
21718
|
+
"last_updated": "2024-11-16T18:52:04.126754",
|
|
21718
21719
|
"name": "Cloudflare",
|
|
21719
21720
|
"provider_type": "cdn",
|
|
21720
21721
|
"regexes": {
|
|
@@ -21724,6 +21725,20 @@
|
|
|
21724
21725
|
]
|
|
21725
21726
|
}
|
|
21726
21727
|
},
|
|
21728
|
+
"Cloudfront": {
|
|
21729
|
+
"asns": [],
|
|
21730
|
+
"bucket_name_regex": "",
|
|
21731
|
+
"cidrs": [],
|
|
21732
|
+
"domains": [
|
|
21733
|
+
"cloudfront.com",
|
|
21734
|
+
"cloudfront.net"
|
|
21735
|
+
],
|
|
21736
|
+
"ips_url": "https://d7uri8nf7uskq.cloudfront.net/tools/list-cloudfront-ips",
|
|
21737
|
+
"last_updated": "0001-01-01T00:00:00",
|
|
21738
|
+
"name": "Cloudfront",
|
|
21739
|
+
"provider_type": "cdn",
|
|
21740
|
+
"regexes": {}
|
|
21741
|
+
},
|
|
21727
21742
|
"DigitalOcean": {
|
|
21728
21743
|
"asns": [],
|
|
21729
21744
|
"bucket_name_regex": "[a-z0-9][a-z0-9-]{2,62}",
|
|
@@ -22881,7 +22896,7 @@
|
|
|
22881
22896
|
"nginxconfig.io"
|
|
22882
22897
|
],
|
|
22883
22898
|
"ips_url": "https://digitalocean.com/geo/google.csv",
|
|
22884
|
-
"last_updated": "2024-11-
|
|
22899
|
+
"last_updated": "2024-11-16T18:52:04.852592",
|
|
22885
22900
|
"name": "DigitalOcean",
|
|
22886
22901
|
"provider_type": "cloud",
|
|
22887
22902
|
"regexes": {
|
|
@@ -22923,7 +22938,7 @@
|
|
|
22923
22938
|
"zencdn.net"
|
|
22924
22939
|
],
|
|
22925
22940
|
"ips_url": "https://api.fastly.com/public-ip-list",
|
|
22926
|
-
"last_updated": "2024-11-
|
|
22941
|
+
"last_updated": "2024-11-16T18:52:03.312278",
|
|
22927
22942
|
"name": "Fastly",
|
|
22928
22943
|
"provider_type": "cloud",
|
|
22929
22944
|
"regexes": {}
|
|
@@ -27959,7 +27974,7 @@
|
|
|
27959
27974
|
"github.com"
|
|
27960
27975
|
],
|
|
27961
27976
|
"ips_url": "https://api.github.com/meta",
|
|
27962
|
-
"last_updated": "2024-11-
|
|
27977
|
+
"last_updated": "2024-11-16T18:52:04.124078",
|
|
27963
27978
|
"name": "GitHub",
|
|
27964
27979
|
"provider_type": "cdn",
|
|
27965
27980
|
"regexes": {}
|
|
@@ -28694,7 +28709,7 @@
|
|
|
28694
28709
|
"googleapis.com"
|
|
28695
28710
|
],
|
|
28696
28711
|
"ips_url": "https://www.gstatic.com/ipranges/cloud.json",
|
|
28697
|
-
"last_updated": "2024-11-
|
|
28712
|
+
"last_updated": "2024-11-16T18:52:03.376758",
|
|
28698
28713
|
"name": "Google",
|
|
28699
28714
|
"provider_type": "cloud",
|
|
28700
28715
|
"regexes": {
|
|
@@ -29176,7 +29191,7 @@
|
|
|
29176
29191
|
"your-server.de"
|
|
29177
29192
|
],
|
|
29178
29193
|
"ips_url": "",
|
|
29179
|
-
"last_updated": "2024-11-
|
|
29194
|
+
"last_updated": "2024-11-16T18:52:02.240171",
|
|
29180
29195
|
"name": "Hetzner",
|
|
29181
29196
|
"provider_type": "cloud",
|
|
29182
29197
|
"regexes": {
|
|
@@ -29221,7 +29236,7 @@
|
|
|
29221
29236
|
"imperva.com"
|
|
29222
29237
|
],
|
|
29223
29238
|
"ips_url": "https://my.imperva.com/api/integration/v1/ips",
|
|
29224
|
-
"last_updated": "2024-11-
|
|
29239
|
+
"last_updated": "2024-11-16T18:52:04.127894",
|
|
29225
29240
|
"name": "Imperva",
|
|
29226
29241
|
"provider_type": "cdn",
|
|
29227
29242
|
"regexes": {}
|
|
@@ -30007,7 +30022,7 @@
|
|
|
30007
30022
|
"sun.com"
|
|
30008
30023
|
],
|
|
30009
30024
|
"ips_url": "https://docs.oracle.com/en-us/iaas/tools/public_ip_ranges.json",
|
|
30010
|
-
"last_updated": "2024-11-
|
|
30025
|
+
"last_updated": "2024-11-16T18:52:04.750557",
|
|
30011
30026
|
"name": "Oracle",
|
|
30012
30027
|
"provider_type": "cloud",
|
|
30013
30028
|
"regexes": {}
|
|
@@ -30086,7 +30101,7 @@
|
|
|
30086
30101
|
"zohowebstatic.com"
|
|
30087
30102
|
],
|
|
30088
30103
|
"ips_url": "",
|
|
30089
|
-
"last_updated": "2024-11-
|
|
30104
|
+
"last_updated": "2024-11-16T18:51:51.565121",
|
|
30090
30105
|
"name": "Zoho",
|
|
30091
30106
|
"provider_type": "cloud",
|
|
30092
30107
|
"regexes": {}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from .base import BaseCloudProvider
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Arvancloud(BaseCloudProvider):
|
|
5
|
+
ips_url = "https://www.arvancloud.ir/en/ips.txt"
|
|
6
|
+
domains = [
|
|
7
|
+
"arvancloud.ir",
|
|
8
|
+
]
|
|
9
|
+
asns = [
|
|
10
|
+
57568,
|
|
11
|
+
205585,
|
|
12
|
+
208006,
|
|
13
|
+
210296,
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
provider_type = "cdn"
|
|
17
|
+
|
|
18
|
+
def parse_response(self, response):
|
|
19
|
+
ranges = set()
|
|
20
|
+
if getattr(response, "status_code", 0) == 200:
|
|
21
|
+
ranges.update(response.text.splitlines())
|
|
22
|
+
return ranges
|
cloudcheck/providers/base.py
CHANGED
|
@@ -93,7 +93,6 @@ class BaseCloudProvider:
|
|
|
93
93
|
global asndb
|
|
94
94
|
asndb = pyasn.pyasn("asn.db")
|
|
95
95
|
try:
|
|
96
|
-
self.last_updated = datetime.now()
|
|
97
96
|
self.ranges = self.get_subnets()
|
|
98
97
|
if self.ips_url:
|
|
99
98
|
async with httpx.AsyncClient(
|
|
@@ -107,6 +106,7 @@ class BaseCloudProvider:
|
|
|
107
106
|
ranges = self.parse_response(response)
|
|
108
107
|
if ranges:
|
|
109
108
|
self.update_ranges(ranges)
|
|
109
|
+
self.last_updated = datetime.now()
|
|
110
110
|
except Exception as e:
|
|
111
111
|
log.warning(f"Error retrieving {self.ips_url}: {e}")
|
|
112
112
|
log.warning(traceback.format_exc())
|
|
@@ -117,6 +117,7 @@ class BaseCloudProvider:
|
|
|
117
117
|
for asn in self.asns:
|
|
118
118
|
prefixes = asndb.get_as_prefixes(asn)
|
|
119
119
|
if prefixes:
|
|
120
|
+
self.last_updated = datetime.now()
|
|
120
121
|
for subnet in prefixes:
|
|
121
122
|
subnets.add(ipaddress.ip_network(subnet, strict=False))
|
|
122
123
|
return subnets
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from .base import BaseCloudProvider
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Cloudfront(BaseCloudProvider):
|
|
5
|
+
ips_url = "https://d7uri8nf7uskq.cloudfront.net/tools/list-cloudfront-ips"
|
|
6
|
+
# https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/LocationsOfEdgeServers.html
|
|
7
|
+
domains = [
|
|
8
|
+
"cloudfront.com",
|
|
9
|
+
"cloudfront.net",
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
provider_type = "cdn"
|
|
13
|
+
|
|
14
|
+
def parse_response(self, response):
|
|
15
|
+
ranges = set()
|
|
16
|
+
response_json = response.json()
|
|
17
|
+
if not isinstance(response_json, dict):
|
|
18
|
+
raise ValueError(f"Invalid response format: {type(response_json)}")
|
|
19
|
+
for r in response_json.values():
|
|
20
|
+
ranges.update(r)
|
|
21
|
+
return ranges
|
|
@@ -9,18 +9,20 @@ from cloudcheck import cloud_providers
|
|
|
9
9
|
@pytest.mark.asyncio
|
|
10
10
|
async def test_cloudcheck():
|
|
11
11
|
provider_names = (
|
|
12
|
+
"akamai",
|
|
12
13
|
"amazon",
|
|
13
|
-
"
|
|
14
|
-
"hetzner",
|
|
14
|
+
"arvancloud",
|
|
15
15
|
"azure",
|
|
16
|
-
"digitalocean",
|
|
17
|
-
"oracle",
|
|
18
|
-
"akamai",
|
|
19
16
|
"cloudflare",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
17
|
+
"cloudfront",
|
|
18
|
+
"digitalocean",
|
|
22
19
|
"fastly",
|
|
20
|
+
"github",
|
|
21
|
+
"google",
|
|
22
|
+
"hetzner",
|
|
23
23
|
"imperva",
|
|
24
|
+
"oracle",
|
|
25
|
+
"zoho",
|
|
24
26
|
)
|
|
25
27
|
for provider_name in provider_names:
|
|
26
28
|
assert provider_name in cloud_providers.providers
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cloudcheck
|
|
3
|
-
Version: 6.0.0.
|
|
3
|
+
Version: 6.0.0.661
|
|
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
|
|
@@ -55,15 +55,17 @@ print(subnet) # IPv4Network('168.62.0.0/19')
|
|
|
55
55
|
~~~
|
|
56
56
|
|
|
57
57
|
## Supported cloud providers
|
|
58
|
-
-
|
|
58
|
+
- Akamai ([source](https://techdocs.akamai.com/property-manager/pdfs/akamai_ipv4_ipv6_CIDRs-txt.zip))
|
|
59
|
+
- Amazon ([source](https://ip-ranges.amazonaws.com/ip-ranges.json))
|
|
60
|
+
- Arvancloud ([source](https://www.arvancloud.ir/en/ips.txt))
|
|
59
61
|
- Azure ([source](https://www.microsoft.com/en-us/download/confirmation.aspx?id=56519))
|
|
60
|
-
- Google ([source](https://www.gstatic.com/ipranges/cloud.json))
|
|
61
|
-
- Oracle Cloud ([source](https://docs.cloud.oracle.com/en-us/iaas/tools/public_ip_ranges.json))
|
|
62
|
-
- DigitalOcean ([source](http://digitalocean.com/geo/google.csv))
|
|
63
62
|
- Cloudflare ([source](https://api.cloudflare.com/client/v4/ips))
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
- Zoho ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/zoho.py))
|
|
63
|
+
- Cloudfront ([source](https://d7uri8nf7uskq.cloudfront.net/tools/list-cloudfront-ips))
|
|
64
|
+
- DigitalOcean ([source](http://digitalocean.com/geo/google.csv))
|
|
67
65
|
- Fastly ([source](https://api.fastly.com/public-ip-list))
|
|
66
|
+
- Github ([source](https://api.github.com/meta))
|
|
67
|
+
- Google ([source](https://www.gstatic.com/ipranges/cloud.json))
|
|
68
68
|
- Imperva ([source](https://my.imperva.com/api/integration/v1/ips))
|
|
69
|
+
- Oracle Cloud ([source](https://docs.cloud.oracle.com/en-us/iaas/tools/public_ip_ranges.json))
|
|
70
|
+
- Zoho ([source](https://github.com/blacklanternsecurity/cloudcheck/blob/master/cloudcheck/providers/zoho.py))
|
|
69
71
|
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
cloud_providers.json,sha256=
|
|
1
|
+
cloud_providers.json,sha256=KQxptSynPnvbTxYHH42aB9Yx7gyFHV2bI7ZnIsTwMS0,936355
|
|
2
2
|
cloudcheck/__init__.py,sha256=FuxQNWSWrhThXVwhuaevh57mUQNtVS-KQ_HCIkfnE0M,416
|
|
3
3
|
cloudcheck/cloudcheck.py,sha256=qgXzRXv6z62V2hfhVSnXf8ariaOMleakoxKdeAeGIPQ,924
|
|
4
4
|
cloudcheck/helpers.py,sha256=Qn7vNh_Uw4Wpg1RWWVIkI5OILNFHQI1gYwIQYrHz9l8,605
|
|
5
5
|
cloudcheck/providers/__init__.py,sha256=7kRphvQAu-lU9I_dsVY_DMgDNg202Zhmh487x5QsU88,5365
|
|
6
6
|
cloudcheck/providers/akamai.py,sha256=UzuuAq_V9GwlIWMkOJ56Jfv2vdjQN0umiafAyRAW5aw,3591
|
|
7
7
|
cloudcheck/providers/amazon.py,sha256=U-EF5LqQuownlEzAdqLZQCDxU2VsFEer54yC8zVcbl4,1703
|
|
8
|
+
cloudcheck/providers/arvancloud.py,sha256=ModvIi15JVLYiqEqIJtq89oXQ0l03MZrkLaW0Sf_1I4,479
|
|
8
9
|
cloudcheck/providers/azure.py,sha256=TpyGhd22iAS0aCt-jH90ZdsnwDzIJ10Dog4DcCeltno,4702
|
|
9
|
-
cloudcheck/providers/base.py,sha256=
|
|
10
|
+
cloudcheck/providers/base.py,sha256=S0APy6rYr4ur1ox9x3-rB6jzFauOtlVQFWMiD_3Ag1Y,5446
|
|
10
11
|
cloudcheck/providers/cloudflare.py,sha256=lsinVyEVLXcKRBCuNnhTv3I99dq5lp3sol6RJcNp63Q,1725
|
|
12
|
+
cloudcheck/providers/cloudfront.py,sha256=Lk894kwiFwqi2C1tU-0pRHDMx3N7r_VVHqCJEW-Bvdg,680
|
|
11
13
|
cloudcheck/providers/digitalocean.py,sha256=yqunC2QNlkRP6ol6pG3XJQl8fwW9baCDmNVfETj1yuM,762
|
|
12
14
|
cloudcheck/providers/fastly.py,sha256=c3Y5cm5R0PMRXGSWDxAiij50X9Mh9ga2xrbHO6RTfKU,575
|
|
13
15
|
cloudcheck/providers/github.py,sha256=iUqdoVQkQbp6lYMzajHCNKgRAIlPrvYEBbWlK6Oj5gM,600
|
|
@@ -17,8 +19,8 @@ cloudcheck/providers/imperva.py,sha256=3RxumRb5Ye5V_3STMWSI2JcAVtb_gijkb-y3wSe_3
|
|
|
17
19
|
cloudcheck/providers/oracle.py,sha256=Xbi9M0dJf6jlGZuZe6vKCyGFQJNBKopQkyBnwEdjb0I,667
|
|
18
20
|
cloudcheck/providers/zoho.py,sha256=4fo0unvG-oVgsKPz5Xa3viq5P5sf69VNu-v0kt1aQK4,477
|
|
19
21
|
cloudcheck/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
|
-
cloudcheck/test/test_cloudcheck.py,sha256=
|
|
21
|
-
cloudcheck-6.0.0.
|
|
22
|
-
cloudcheck-6.0.0.
|
|
23
|
-
cloudcheck-6.0.0.
|
|
24
|
-
cloudcheck-6.0.0.
|
|
22
|
+
cloudcheck/test/test_cloudcheck.py,sha256=lXIQl-uvZt2GBi-cxaIsL8CU0KVONmbaOyrnKvpY1Yk,2280
|
|
23
|
+
cloudcheck-6.0.0.661.dist-info/METADATA,sha256=iAWhe3g1ucj0LvfU1ktCJgaifFT-FP9VeSdUMUPAtUk,2880
|
|
24
|
+
cloudcheck-6.0.0.661.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
25
|
+
cloudcheck-6.0.0.661.dist-info/entry_points.txt,sha256=SzYzxS8FPIBJdwNT4pQhhSostZyrQMxLqzpyuKkJxDU,57
|
|
26
|
+
cloudcheck-6.0.0.661.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|