Skip to content

Commit

Permalink
Added input ciphertext as argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Færevaag committed Jun 24, 2013
1 parent 97f4283 commit 189be13
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion project3/breaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
# Jonathan Becktor (s123094@student.dtu.dk)
#

import time
from sys import argv
import os, time

START_DATE = '2009-06-22 00:00:00'
END_DATE = '2009-06-28 23:59:59'
Expand Down Expand Up @@ -74,6 +75,16 @@ def check_plain(plain):


def main():
# Check if enough argument were given
argcount = 0
for arg in argv:
argcount += 1
if argcount < 2:
print "Error: No input file spesified"
return 1

script, inputfile = argv

# Calculcate time interval
date_format = '%Y-%m-%d %H:%M:%S'
start = int(time.mktime(time.strptime(START_DATE, date_format))) - time.timezone
Expand Down

0 comments on commit 189be13

Please sign in to comment.