Compare commits
No commits in common. "81cd95924e2dcde1f3237698098614d42aed202d" and "a443cf9b51c6a3c111ec58dfcb4e08ec17328eed" have entirely different histories.
81cd95924e
...
a443cf9b51
27
app.py
27
app.py
@ -1,27 +0,0 @@
|
|||||||
import json
|
|
||||||
from sys import argv
|
|
||||||
from pathlib import Path
|
|
||||||
import requests
|
|
||||||
|
|
||||||
|
|
||||||
# Get API key and Email address
|
|
||||||
def getCredentials():
|
|
||||||
api_key = input("Enter the Cloudflare API key: ")
|
|
||||||
email_address = input("Enter the Cloudflare Email address: ")
|
|
||||||
return {"api_key": api_key, "email": email_address}
|
|
||||||
|
|
||||||
|
|
||||||
# Get credentials
|
|
||||||
|
|
||||||
if len(argv) > 1 and 'loadconfig' in argv:
|
|
||||||
if Path("config.json").exists():
|
|
||||||
configfile = open("config.json")
|
|
||||||
config = json.load(configfile)
|
|
||||||
credentials = {'api_key': config['API_Key'], 'email': config['Email']}
|
|
||||||
else:
|
|
||||||
print('config.json was not found. Please enter the credentials manually')
|
|
||||||
credentials = getCredentials()
|
|
||||||
else:
|
|
||||||
credentials = getCredentials()
|
|
||||||
|
|
||||||
# print(credentials)
|
|
||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
"API_Key": "your api key goes here",
|
"saveCredentials": true,
|
||||||
|
"API_KEY": "your api key goes here",
|
||||||
"Email": "your cloudflare email address"
|
"Email": "your cloudflare email address"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user