replace cgi.escape by html.escape because is deprecated (#3) and change Content-Type to json
This commit is contained in:
parent
d7cde85862
commit
f6c5928827
5
index.py
5
index.py
@ -3,6 +3,7 @@
|
||||
|
||||
# IMPORTATION
|
||||
import cgi
|
||||
import html
|
||||
import json
|
||||
import ssl
|
||||
import hashlib
|
||||
@ -106,7 +107,7 @@ def headers_validation(DOMAIN):
|
||||
# MAIN
|
||||
|
||||
|
||||
print("Content-Type: text/html")
|
||||
print("Content-Type: application/json")
|
||||
print("")
|
||||
fs = cgi.FieldStorage()
|
||||
|
||||
@ -117,7 +118,7 @@ if "domain" not in fs:
|
||||
print("{ERROR}")
|
||||
cgi.sys.exit(0)
|
||||
|
||||
domain = cgi.escape(fs["domain"].value)
|
||||
domain = html.escape(fs["domain"].value)
|
||||
|
||||
if dnssec_validation(domain) is True:
|
||||
JSON_DATA["DNSSEC"] = True
|
||||
|
Loading…
Reference in New Issue
Block a user