1984DNS : Renaming Arguments and Current Status

This commit is contained in:
unknown 2022-01-31 08:46:47 +07:00
parent a00ff7a196
commit 14857a6f7f
Signed by: minoplhy
GPG Key ID: 90667A59A9908AEC
3 changed files with 10 additions and 14 deletions

View File

@ -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 .

View File

@ -1,7 +1,6 @@
import sys
import logging
import re
from bs4 import BeautifulSoup
from dotenv import load_dotenv
from requests import Session
import os
@ -41,13 +40,13 @@ payload = {
"Cookie": "csrftoken="+csrftoken+"; sessionid="+sessionid
}
file1 = open('entry.txt', 'r')
file = file1.read().split('\n')
for zone_id in file:
delete_response = session.post(
ZoneFile = open('entry.txt', 'r')
GetZone = ZoneFile.read().split('\n')
for zone_id in GetZone:
delete_zone = session.post(
"https://umsjon.1984.is/domains/delentry/",
data={
"entry": zone_id,
}, headers=payload,
)
print(delete_response.text)
print(delete_zone.text)

View File

@ -6,7 +6,6 @@ from dotenv import load_dotenv
from requests import Session
import requests
import os
from bs4 import BeautifulSoup
LOGGER = logging.getLogger(__name__)
@ -17,7 +16,6 @@ CERTBOT_VALIDATION = '12345'
CERTBOT_DOMAIN = sys.argv[1]
CERTBOT_ZONE = sys.argv[2]
CERTBOT_VALIDATION = sys.argv[3]
domain = CERTBOT_ZONE
load_dotenv()
auth_username = os.getenv('AUTH_USERNAME')
auth_password = os.getenv('AUTH_PASSWORD')
@ -44,7 +42,6 @@ for token in cookie:
sessionid = token.value
CERTBOT_HOST="_acme-challenge."+CERTBOT_DOMAIN
name=CERTBOT_HOST
rtype="txt"
# Pull a list of records and check for ours
@ -63,10 +60,10 @@ data = {
"priority": "",
"rdata": CERTBOT_VALIDATION,
}
risk = session.post("https://umsjon.1984.is/domains/entry/", data=data, headers=payload)
s = re.findall('"id": "..*\d"', risk.text)
PostRecord = session.post("https://umsjon.1984.is/domains/entry/", data=data, headers=payload)
s = re.findall('"id": "..*\d"', PostRecord.text)
s = str(s)
s = re.sub('(\[|\"|\'|:|]| |id)', "", s)
file1 = open('entry.txt', 'w')
file1.write(str(s))
ZoneFile = open('entry.txt', 'w')
ZoneFile.write(str(s))
exit()