improved vicc help
git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@750 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
@@ -22,8 +22,11 @@ vpicccards_PYTHON = virtualsmartcard/cards/__init__.py \
|
|||||||
virtualsmartcard/cards/nPA.py \
|
virtualsmartcard/cards/nPA.py \
|
||||||
virtualsmartcard/cards/cryptoflex.py
|
virtualsmartcard/cards/cryptoflex.py
|
||||||
|
|
||||||
do_subst = $(SED) -e 's,[@]PYTHON[@],$(PYTHON),g'
|
do_subst = $(SED) \
|
||||||
|
-e 's,[@]PYTHON[@],$(PYTHON),g' \
|
||||||
|
-e 's,[@]PACKAGE_BUGREPORT[@],$(PACKAGE_BUGREPORT),g' \
|
||||||
|
-e 's,[@]PACKAGE_NAME[@],$(PACKAGE_NAME),g'
|
||||||
|
|
||||||
vicc: vicc.in Makefile
|
$(builddir)/vicc: vicc.in Makefile
|
||||||
$(do_subst) < $(srcdir)/vicc.in > vicc
|
$(do_subst) < $(srcdir)/vicc.in > $(builddir)/vicc
|
||||||
chmod +x vicc
|
chmod +x $(builddir)/vicc
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#! @PYTHON@
|
#! @PYTHON@
|
||||||
#
|
#
|
||||||
#
|
# Copyright (C) 2010-2012 Frank Morgner <morgner@informatik.hu-berlin.de>
|
||||||
# Copyright (C) 2011 Frank Morgner, Dominik Oepen
|
# Copyright (C) 2010 Dominik Oepen <oepen@informatik.hu-berlin.de>
|
||||||
#
|
#
|
||||||
# This file is part of virtualsmartcard.
|
# This file is part of virtualsmartcard.
|
||||||
#
|
#
|
||||||
@@ -20,23 +20,49 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
parser = argparse.ArgumentParser('Virtual Smart Card')
|
|
||||||
parser.add_argument("-f", "--file", action="store", type=str,
|
|
||||||
default=None,
|
parser = argparse.ArgumentParser(
|
||||||
help="Load a saved card")
|
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
||||||
parser.add_argument("-n", "--hostname", action="store", type=str,
|
description='''
|
||||||
default='localhost',
|
The @PACKAGE_NAME@ emulates different types of smart cards.
|
||||||
help="Address of Virtual PCD [default: %(default)s]")
|
|
||||||
parser.add_argument("-p", "--port", action="store", type=int,
|
The emulator connects to the virtual smart card reader reader (vpcd). Smart
|
||||||
default=35963,
|
card applications can access the @PACKAGE_NAME@ through the vpcd via PC/SC.
|
||||||
help="Port of Virtual PCD [default: %(default)s]")
|
|
||||||
parser.add_argument("-r", "--reader", action="store", type=int,
|
Report bugs to @PACKAGE_BUGREPORT@
|
||||||
default=None,
|
''',
|
||||||
help="Number of reader for relaying")
|
epilog='''
|
||||||
parser.add_argument("-t", "--type", action="store",
|
Written by Frank Morgner <morgner@informatik.hu-berlin.de> and Dominik Oepen
|
||||||
default='iso7816',
|
<oepen@informatik.hu-berlin.de>
|
||||||
|
''')
|
||||||
|
|
||||||
|
parser.add_argument("-t", "--type",
|
||||||
|
action="store",
|
||||||
choices=['iso7816', 'cryptoflex', 'ePass', 'nPA', 'relay'],
|
choices=['iso7816', 'cryptoflex', 'ePass', 'nPA', 'relay'],
|
||||||
help="Type of Smartcard [default: %(default)s]")
|
default='iso7816',
|
||||||
|
help="Type of smart card to emulate")
|
||||||
|
parser.add_argument("-f", "--file",
|
||||||
|
action="store",
|
||||||
|
type=argparse.FileType('r'),
|
||||||
|
help="load a saved smart card image")
|
||||||
|
parser.add_argument("-H", "--hostname",
|
||||||
|
action="store",
|
||||||
|
type=str,
|
||||||
|
default='localhost',
|
||||||
|
help="address of the vpcd")
|
||||||
|
parser.add_argument("-P", "--port",
|
||||||
|
action="store",
|
||||||
|
type=int,
|
||||||
|
default=35963,
|
||||||
|
help="port of the vpcd")
|
||||||
|
|
||||||
|
relay = parser.add_argument_group('options for relaying a local smart card')
|
||||||
|
relay.add_argument("-r", "--reader",
|
||||||
|
action="store",
|
||||||
|
type=int,
|
||||||
|
help="number of the reader which contains the smart card to be relayed.")
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
from virtualsmartcard.VirtualSmartcard import VirtualICC
|
from virtualsmartcard.VirtualSmartcard import VirtualICC
|
||||||
|
|||||||
Reference in New Issue
Block a user