Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions imports/update_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def get_maldb_ver(self):
Get current malwareDB version and see if we need an update
'''
try:
with file(globals.vars.maldb_ver_file) as f:
with open(globals.vars.maldb_ver_file) as f:
return f.read()
except IOError:
print(
Expand All @@ -59,7 +59,7 @@ def update_db(self, curr_db_version):
print(locals())
response = urlopen(
globals.vars.giturl_dl + globals.vars.maldb_ver_file)
new_maldb_ver = response.read()
new_maldb_ver = response.read().decode()
if new_maldb_ver == curr_db_version:
print(green('[+]') + " theZoo is up to date.\n" + green('[+]') + " You are at " + new_maldb_ver + " which is the latest version.")
return
Expand Down Expand Up @@ -119,7 +119,7 @@ def download_from_repo(self, filepath, suffix=''):

f = open(file_name, 'wb')
meta = u.info()
file_size = int(meta.getheaders("Content-Length")[0])
file_size = int(meta.get("Content-Length")[0])
print("Downloading: %s Bytes: %s" % (file_name, file_size))
file_size_dl = 0
block_sz = 8192
Expand Down