diff --git a/virtualsmartcard/src/vpicc/virtualsmartcard/CardGenerator.py b/virtualsmartcard/src/vpicc/virtualsmartcard/CardGenerator.py index c792015..5dd6d2c 100644 --- a/virtualsmartcard/src/vpicc/virtualsmartcard/CardGenerator.py +++ b/virtualsmartcard/src/vpicc/virtualsmartcard/CardGenerator.py @@ -19,10 +19,12 @@ import sys, getpass, anydbm, readline from pickle import loads, dumps -from TLVutils import pack +from virtualsmartcard.TLVutils import pack from virtualsmartcard.utils import inttostring from virtualsmartcard.SmartcardFilesystem import MF, DF, TransparentStructureEF from virtualsmartcard.ConstantDefinitions import FDB +from virtualsmartcard.CryptoUtils import protect_string, read_protected_string +import virtualsmartcard.SmartcardSAM # pgp directory #self.mf.append(DF(parent=self.mf, @@ -43,17 +45,15 @@ class CardGenerator(object): self.sam = sam def __generate_iso_card(self): - from virtualsmartcard.SmartcardSAM import SAM - print "Using default SAM. Insecure!!!" - self.sam = SAM("1234", "1234567890") #FIXME: Use user provided data + #TODO: Use user provided data + self.sam = virtualsmartcard.SmartcardSAM.SAM("1234", "1234567890") self.mf = MF(filedescriptor=FDB["DF"]) self.sam.set_MF(self.mf) def __generate_ePass(self): from PIL import Image - from virtualsmartcard.SmartcardSAM import PassportSAM MRZ = raw_input("Please enter the MRZ as one string: ") #TODO: Sanity checks @@ -61,7 +61,7 @@ class CardGenerator(object): readline.parse_and_bind("tab: complete") picturepath = raw_input("Please enter the path to an image: ") - picturepath = picturepath.rstrip() #FIXME + picturepath = picturepath.strip() #MRZ1 = "P