1984DNS : Renaming Arguments and Current Status
This commit is contained in:
parent
a00ff7a196
commit
14857a6f7f
@ -1,4 +1,4 @@
|
|||||||
Status : succeeded (as far as i know)
|
Status : succeeded (as of Jan 31 2022)
|
||||||
|
|
||||||
This was my attempted to make automatic Certbot renewal script of 1984.is FreeDNS .
|
This was my attempted to make automatic Certbot renewal script of 1984.is FreeDNS .
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import sys
|
import sys
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
from bs4 import BeautifulSoup
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from requests import Session
|
from requests import Session
|
||||||
import os
|
import os
|
||||||
@ -41,13 +40,13 @@ payload = {
|
|||||||
"Cookie": "csrftoken="+csrftoken+"; sessionid="+sessionid
|
"Cookie": "csrftoken="+csrftoken+"; sessionid="+sessionid
|
||||||
}
|
}
|
||||||
|
|
||||||
file1 = open('entry.txt', 'r')
|
ZoneFile = open('entry.txt', 'r')
|
||||||
file = file1.read().split('\n')
|
GetZone = ZoneFile.read().split('\n')
|
||||||
for zone_id in file:
|
for zone_id in GetZone:
|
||||||
delete_response = session.post(
|
delete_zone = session.post(
|
||||||
"https://umsjon.1984.is/domains/delentry/",
|
"https://umsjon.1984.is/domains/delentry/",
|
||||||
data={
|
data={
|
||||||
"entry": zone_id,
|
"entry": zone_id,
|
||||||
}, headers=payload,
|
}, headers=payload,
|
||||||
)
|
)
|
||||||
print(delete_response.text)
|
print(delete_zone.text)
|
@ -6,7 +6,6 @@ from dotenv import load_dotenv
|
|||||||
from requests import Session
|
from requests import Session
|
||||||
import requests
|
import requests
|
||||||
import os
|
import os
|
||||||
from bs4 import BeautifulSoup
|
|
||||||
|
|
||||||
LOGGER = logging.getLogger(__name__)
|
LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -17,7 +16,6 @@ CERTBOT_VALIDATION = '12345'
|
|||||||
CERTBOT_DOMAIN = sys.argv[1]
|
CERTBOT_DOMAIN = sys.argv[1]
|
||||||
CERTBOT_ZONE = sys.argv[2]
|
CERTBOT_ZONE = sys.argv[2]
|
||||||
CERTBOT_VALIDATION = sys.argv[3]
|
CERTBOT_VALIDATION = sys.argv[3]
|
||||||
domain = CERTBOT_ZONE
|
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
auth_username = os.getenv('AUTH_USERNAME')
|
auth_username = os.getenv('AUTH_USERNAME')
|
||||||
auth_password = os.getenv('AUTH_PASSWORD')
|
auth_password = os.getenv('AUTH_PASSWORD')
|
||||||
@ -44,7 +42,6 @@ for token in cookie:
|
|||||||
sessionid = token.value
|
sessionid = token.value
|
||||||
|
|
||||||
CERTBOT_HOST="_acme-challenge."+CERTBOT_DOMAIN
|
CERTBOT_HOST="_acme-challenge."+CERTBOT_DOMAIN
|
||||||
name=CERTBOT_HOST
|
|
||||||
rtype="txt"
|
rtype="txt"
|
||||||
|
|
||||||
# Pull a list of records and check for ours
|
# Pull a list of records and check for ours
|
||||||
@ -63,10 +60,10 @@ data = {
|
|||||||
"priority": "",
|
"priority": "",
|
||||||
"rdata": CERTBOT_VALIDATION,
|
"rdata": CERTBOT_VALIDATION,
|
||||||
}
|
}
|
||||||
risk = session.post("https://umsjon.1984.is/domains/entry/", data=data, headers=payload)
|
PostRecord = session.post("https://umsjon.1984.is/domains/entry/", data=data, headers=payload)
|
||||||
s = re.findall('"id": "..*\d"', risk.text)
|
s = re.findall('"id": "..*\d"', PostRecord.text)
|
||||||
s = str(s)
|
s = str(s)
|
||||||
s = re.sub('(\[|\"|\'|:|]| |id)', "", s)
|
s = re.sub('(\[|\"|\'|:|]| |id)', "", s)
|
||||||
file1 = open('entry.txt', 'w')
|
ZoneFile = open('entry.txt', 'w')
|
||||||
file1.write(str(s))
|
ZoneFile.write(str(s))
|
||||||
exit()
|
exit()
|
Loading…
Reference in New Issue
Block a user