diff --git a/virtualsmartcard/src/vpicc/virtualsmartcard/CardGenerator.py b/virtualsmartcard/src/vpicc/virtualsmartcard/CardGenerator.py
index 153e777..236539b 100644
--- a/virtualsmartcard/src/vpicc/virtualsmartcard/CardGenerator.py
+++ b/virtualsmartcard/src/vpicc/virtualsmartcard/CardGenerator.py
@@ -17,7 +17,7 @@
# virtualsmartcard. If not, see .
#
-import sys, getpass, anydbm, readline, os, dircache
+import sys, getpass, anydbm, readline, dircache
from pickle import loads, dumps
from TLVutils import pack
from virtualsmartcard.utils import inttostring
@@ -36,10 +36,10 @@ from virtualsmartcard.SmartcardFilesystem import *
class CardGenerator(object):
- def __init__(self, type=None, sam=None, mf=None):
- self.type = type
- self.mf = None
- self.sam = None
+ def __init__(self, card_type=None, sam=None, mf=None):
+ self.type = card_type
+ self.mf = mf
+ self.sam = sam
def __generate_iso_card(self):
from virtualsmartcard.SmartcardSAM import SAM
@@ -47,80 +47,90 @@ class CardGenerator(object):
print "Using default SAM. Insecure!!!"
self.sam = SAM("1234", "1234567890") #FIXME: Use user provided data
- self.mf = MF(filedescriptor=FDB["DF"], lifecycle=LCB["ACTIVATED"], dfname=None)
+ 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
+ from PIL import Image
+ from virtualsmartcard.SmartcardSAM import PassportSAM
- MRZ = raw_input("Please enter the MRZ as one string: ") #TODO: Sanity checks
-
- readline.set_completer_delims("")
- readline.parse_and_bind("tab: complete")
-
- picturepath = raw_input("Please enter the path to an image: ")
- picturepath = picturepath.rstrip() #FIXME
-
- #MRZ1 = "P