Merge pull request #146 from amustaque97/master
UTF-8 Encoded Issue Resolved
This commit is contained in:
commit
d0c36ded97
|
@ -104,7 +104,7 @@ def parse_args():
|
||||||
def write_file(filename, subdomains):
|
def write_file(filename, subdomains):
|
||||||
# saving subdomains results to output file
|
# saving subdomains results to output file
|
||||||
print("%s[-] Saving results to file: %s%s%s%s" % (Y, W, R, filename, W))
|
print("%s[-] Saving results to file: %s%s%s%s" % (Y, W, R, filename, W))
|
||||||
with open(str(filename), 'wt') as f:
|
with open(str(filename), 'wt',encoding='utf-8') as f:
|
||||||
for subdomain in subdomains:
|
for subdomain in subdomains:
|
||||||
f.write(subdomain + os.linesep)
|
f.write(subdomain + os.linesep)
|
||||||
|
|
||||||
|
@ -545,7 +545,8 @@ class NetcraftEnum(enumratorBaseThreaded):
|
||||||
cookies = dict()
|
cookies = dict()
|
||||||
cookies_list = cookie[0:cookie.find(';')].split("=")
|
cookies_list = cookie[0:cookie.find(';')].split("=")
|
||||||
cookies[cookies_list[0]] = cookies_list[1]
|
cookies[cookies_list[0]] = cookies_list[1]
|
||||||
cookies['netcraft_js_verification_response'] = hashlib.sha1(urllib.unquote(cookies_list[1])).hexdigest()
|
# hashlib.sha1 requires utf-8 encoded str
|
||||||
|
cookies['netcraft_js_verification_response'] = hashlib.sha1(urllib.unquote(cookies_list[1]).encode('utf-8')).hexdigest()
|
||||||
return cookies
|
return cookies
|
||||||
|
|
||||||
def get_cookies(self, headers):
|
def get_cookies(self, headers):
|
||||||
|
|
Loading…
Reference in New Issue