replace cgi.escape by html.escape because is deprecated (#3) and change Content-Type to json

This commit is contained in:
Beu 2019-07-25 01:16:38 +02:00
parent d7cde85862
commit f6c5928827
1 changed files with 3 additions and 2 deletions

View File

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