403 Client Error: Forbidden for url
bart3nder opened this issue · 1 comments
bart3nder commented
Hi, I am facing this error while using your script (Requirements installed successfully and API Key and Zone ID are correct):
➜ cf-ip-scanner-py git:(main) python3 start.py
Press CTRL+C to exit...
Enter max IP [5]:
Enter max ping [500]:
Enter max jitter [100]:
Enter max latency [1000]:
Enter IPs to include (comma seperated, '-' to ignore) []:
Enter IPs to exclude (comma seperated, '-' to ignore) []:
Enter test data size in KB [2048]:
Enter minimum download speed (Mbps) [3.0]:
Enter minimum upload speed (Mbps) [0.2]:
Do you want to upload the result to your Cloudflare subdomain (yes/no) [no]? yes
Do you want to delete extisting records of given subdomain before uploading the result to your Cloudflare (yes/no) [yes]?
Cloudflare email [********]:
Cloudflare zone ID [************************]:
Cloudflare API key [************************]:
Subdomain to modify (i.e ip.my-domain.com) [********]:
Processing 104.19.160.0/20...
Shuffling the IPs...Done.
9 of 2564096 matched IPs have peen tested.
5 IP(s) found:
|---|---------------|--------|-------|-------|--------|----------|
| # | IP |Ping(ms)|Jit(ms)|Lat(ms)|Up(Mbps)|Down(Mbps)|
|---|---------------|--------|-------|-------|--------|----------|
| 1|104.17.138.248 | 135 | 75 | 547 | 0.72 | 4.07 |
| 2|172.65.9.51 | 137 | 24 | 516 | 0.72 | 4.05 |
| 3|104.22.3.43 | 148 | 43 | 524 | 0.73 | 3.96 |
| 4|104.16.137.212 | 124 | 38 | 518 | 0.72 | 4.10 |
| 5|104.24.10.187 | 138 | 72 | 540 | 0.72 | 3.96 |
|---|---------------|--------|-------|-------|--------|----------|
IP list successfuly exported to `selected-ips.csv` file.
Deleting existing records...Failed to update Cloudflare subdomain!
403 Client Error: Forbidden for url: https://api.cloudflare.com/client/v4/zones/************************/dns_records/************************
Done.
vfarid commented
You nedd to enter correct zone_id and api_key of cloudflare. May be you used cloudflare token instead of api_key.