mirror of https://gerrit.osmocom.org/simtrace2
simtrace.py: cmdline arg for simcard emulation
This commit is contained in:
parent
1185ae7184
commit
381d0fcde9
|
@ -4,6 +4,7 @@ import argparse
|
|||
import sniffer
|
||||
import ccid
|
||||
import ccid_select
|
||||
import phone
|
||||
|
||||
import usb.core
|
||||
import usb.util
|
||||
|
@ -50,10 +51,12 @@ def main():
|
|||
choices=["cmd1", "cmd2", "cmd_poweron", "cmd_poweroff", "cmd_get_slot_stat", "cmd_get_param"])
|
||||
parser.add_argument("-s", "--sniff", help="Sniff communication!", action='store_true')
|
||||
parser.add_argument("-S", "--select_file", help="Transmit SELECT cmd!", action='store_true')
|
||||
parser.add_argument("-p", "--phone", help="Emulates simcard", action='store_true')
|
||||
|
||||
args = parser.parse_args()
|
||||
print("args: ", args)
|
||||
|
||||
|
||||
# FIXME: why is it a ccid function?
|
||||
if args.conf is not None:
|
||||
devs = usb.core.find(find_all=1, custom_match=find_class(0xb)) # 0xb = Smartcard
|
||||
|
@ -75,6 +78,8 @@ def main():
|
|||
sniffer.sniff()
|
||||
if args.select_file is True:
|
||||
ccid_select.select()
|
||||
if args.phone is True:
|
||||
phone.emulate_sim()
|
||||
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in New Issue