diff options
author | hploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b> | 2007-06-08 00:55:16 +0000 |
---|---|---|
committer | hploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b> | 2007-06-08 00:55:16 +0000 |
commit | 3fa2f884191bcbac2994fcba964bbceb1087bc10 (patch) | |
tree | 4971bb7169f9cce57c0a557d3d35a562d9d7d0a2 /readpass.py | |
parent | 918eaf3f40436925730c32096fe9f78801ae588f (diff) |
Tool to read full passport information. Call without arguments to try without bac, or with mrz1 mrz2 or mrz2 to try with bac
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@224 f711b948-2313-0410-aaa9-d29f33439f0b
Diffstat (limited to 'readpass.py')
-rwxr-xr-x | readpass.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/readpass.py b/readpass.py new file mode 100755 index 0000000..c6c50f5 --- /dev/null +++ b/readpass.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python +# -*- coding: iso-8859-1 -*- + +from utils import pycsc +import utils, cards, TLV_utils, sys, binascii, time, traceback + +if __name__ == "__main__": + c = utils.CommandLineArgumentHelper() + + (options, arguments) = c.getopt(sys.argv[1:]) + + pycsc_card = c.connect() + card = cards.new_card_object(pycsc_card) + cards.generic_card.DEBUG = False + + print >>sys.stderr, "Using %s" % card.DRIVER_NAME + + if len(arguments) > 1: + p = cards.passport_application.Passport.from_card(card, arguments[:2]) + elif len(arguments) == 1: + p = cards.passport_application.Passport.from_card(card, ["",arguments[0]]) + else: + p = cards.passport_application.Passport.from_card(card) + |