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
|
# IMPORTATION
|
||||||
import cgi
|
import cgi
|
||||||
|
import html
|
||||||
import json
|
import json
|
||||||
import ssl
|
import ssl
|
||||||
import hashlib
|
import hashlib
|
||||||
@ -106,7 +107,7 @@ def headers_validation(DOMAIN):
|
|||||||
# MAIN
|
# MAIN
|
||||||
|
|
||||||
|
|
||||||
print("Content-Type: text/html")
|
print("Content-Type: application/json")
|
||||||
print("")
|
print("")
|
||||||
fs = cgi.FieldStorage()
|
fs = cgi.FieldStorage()
|
||||||
|
|
||||||
@ -117,7 +118,7 @@ if "domain" not in fs:
|
|||||||
print("{ERROR}")
|
print("{ERROR}")
|
||||||
cgi.sys.exit(0)
|
cgi.sys.exit(0)
|
||||||
|
|
||||||
domain = cgi.escape(fs["domain"].value)
|
domain = html.escape(fs["domain"].value)
|
||||||
|
|
||||||
if dnssec_validation(domain) is True:
|
if dnssec_validation(domain) is True:
|
||||||
JSON_DATA["DNSSEC"] = True
|
JSON_DATA["DNSSEC"] = True
|
||||||
|
Loading…
Reference in New Issue
Block a user