Skip to content

Commit

Permalink
Update DNoiSe.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jankais3r authored Mar 27, 2019
1 parent 218dd36 commit 1d762f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions DNoiSe.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def download_domains():
print >> log_file, time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.mktime(datetime.datetime.now().timetuple())))+" Can't download the domain list. Quitting."
exit()

# Create a SQLite database
# Create a SQLite database and import the domain list
try:
db = sqlite3.connect(working_directory+"domains.sqlite")
db = sqlite3.connect(working_directory + "domains.sqlite")
db.execute("CREATE TABLE Domains (ID INT PRIMARY KEY, Domain TEXT)")

# Load the CSV into our database
Expand All @@ -67,7 +67,7 @@ def download_domains():

db.close()

os.remove(working_directory+"top-1m.csv")
os.remove(working_directory + "domains.zip")
except:
print >> log_file, time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.mktime(datetime.datetime.now().timetuple())))+" Import failed. Quitting."
exit()
Expand All @@ -86,7 +86,7 @@ def download_domains():
time.sleep(10)

# Download the top 1M domain list if we don't have it yet.
exists = os.path.isfile(working_directory+"domains.sqlite")
exists = os.path.isfile(working_directory + "domains.sqlite")
if exists == False:
download_domains()

Expand Down

0 comments on commit 1d762f4

Please sign in to comment.