Snooper console version user manual

 

 

A APDU script interpreter that run at the Windows console

 

使用说明

 

本手册描述snooper控制台解释器的控制台版本,是snooper标准版的一个子集,支持大部分常见函数,可配合其他环境使用。


   

说明.... 3

命令行参数.... 3

示例.... 4

列出读卡器... 4

选择默认读卡器... 4

执行脚本... 5

设置读卡器并执行脚本... 5

只执行脚... 6

使用注意事项:.... 7

 


 

 

说明

Snooper命令行版本是Snooper标准版的子集,主要修改有

 

1)  删除了与脚本执行无关的所有其他功能。

2)  删除了主界面和读卡器选择窗口工具条部分图标。

3)  去掉了脚本窗口的各种语法检查,高亮处理。

4)  去掉了部分与界面相关的脚本函数

命令行参数

 

参数

作用

备注

-show

按照普通GUI程序运行

若出现-show参数,则其他参数都被忽略

-list

列出支持的读卡器

带有这个参数之后,会列出可用的读卡器,之后直接退出

-reader

通过索引设置默认的读卡器名称

-reader 3

 

如果存在相关的读卡器,则会选中并保存这次用的读卡器,直到再次使用 –reader 参数来修改默认读卡器

 

-reader参数输入的时读卡器索引,保存的却是读卡器名称,所以当读卡器选择的读卡器是使用字符串部分匹配,所以只可以省略

 

不附加脚本参数,则设置完默认读卡器直接退出

-noreset

设备不复位

由于有默认读卡器存在,所以执行无需读卡器参与的脚本,可以加入 –noreset 参数用于明确指明不复位设备。

脚本文件

脚本文件名应该符合C语言命令行参数要求,不会被错误的当成多个参数

例如

first.txt

..\perso.txt

..\util\util.txt

Util\util.txt

"c:\abc\t.txt"

执行完脚本文件后退出

 

 

示例

列出读卡器

Snooper.exe –list

输出结果为

 

 

Snooper console mode

  0 -- Infineon Virtual PC/SC CB Reader 3

  1 -- Infineon Virtual PC/SC CL Reader 0

  2 -- JAVACOS Virtual Contact Reader 0

  3 -- JAVACOS Virtual Contactless Reader 1

  4 -- Virtual Card ( Private Protocol 11)  (T0/T1)

  5 -- E_clipse debug auto detect

  6 -- JCVM simulate CB

  7 -- JCVM simulate CL

  8 -- FTSAFE CDC 掉电读卡器       115200 BPS COM1

  9 -- 飞天门禁读卡器       230400 BPS COM1

 10 -- 凤凰读卡器   9600 BPS COM1

 11 -- 凤凰读卡器  19200 BPS COM1

 12 -- 凤凰读卡器 9600++ BPS COM1

 13 -- 凤凰读卡器 115200 BPS COM1

 

最后一次使用的读卡器 -- FTSAFE CDC 掉电读卡器       115200 BPS COM5

 

 

Snooper is exit

选择默认读卡器

Snooper.exe –reader 9

输出结果为

 

Snooper console mode

 

 

//FTSAFE CDC 掉电读卡器       115200 BPS COM4

 

//reset

3B8F800146542D4A434F532042696F4341524454

 

Snooper is exit

执行脚本

Snooper.exe "d:\debug\demo.txt"

 

 

Snooper console mode

 

脚本 – d:\debug\demo.txt

 

 

//FTSAFE CDC 掉电读卡器       115200 BPS COM4

 

//reset

3B8F800146542D4A434F532042696F4341524454

//iv = 1122334455667788

//data = 10663508BC4A140533D8D0E1B0711133B992366F4861991529861428A33CC4E25AA80CA67469DD36

//key = FB7035268212E6910C5B990A29A612D5626AB658D7574ACC

//x = 950F687CF53BB4C1F8A400EBAF47F61B074D0E5C1C2B0D6B2D0DE688DB0A5B083BE36D371EDEC56C

//y = 950F687CF53BB4C1F8A400EBAF47F61B074D0E5C1C2B0D6B2D0DE688DB0A5B083BE36D371EDEC56C

//x = 3DF5EAB169C23F067E010FCB0B784C394DCA50BAC954E1F56391852953C6919AB17063311C96CC6A

//y = 3DF5EAB169C23F067E010FCB0B784C394DCA50BAC954E1F56391852953C6919AB17063311C96CC6A

 

Snooper is exit

设置读卡器并执行脚本

Snooper.exe "d:\debug\demo.txt" –reader 2

Snooper.exe –reader 2 "d:\debug\demo.txt"

 

 

Snooper console mode

 

脚本 – d:\debug\demo.txt

 

 

//FTSAFE CDC 掉电读卡器       115200 BPS COM4

 

//reset

3B8F800146542D4A434F532042696F4341524454

//iv = 1122334455667788

//data = 10663508BC4A140533D8D0E1B0711133B992366F4861991529861428A33CC4E25AA80CA67469DD36

//key = FB7035268212E6910C5B990A29A612D5626AB658D7574ACC

//x = 950F687CF53BB4C1F8A400EBAF47F61B074D0E5C1C2B0D6B2D0DE688DB0A5B083BE36D371EDEC56C

//y = 950F687CF53BB4C1F8A400EBAF47F61B074D0E5C1C2B0D6B2D0DE688DB0A5B083BE36D371EDEC56C

//x = 3DF5EAB169C23F067E010FCB0B784C394DCA50BAC954E1F56391852953C6919AB17063311C96CC6A

//y = 3DF5EAB169C23F067E010FCB0B784C394DCA50BAC954E1F56391852953C6919AB17063311C96CC6A

 

Snooper is exit

 

只执行脚本

Snooper.exe "d:\debug\demo.txt" –noreset

Snooper.exe –noreset "d:\debug\demo.txt"

 

 

Snooper console mode

 

脚本 – d:\debug\demo.txt

 

 

//iv = 1122334455667788

//data = 10663508BC4A140533D8D0E1B0711133B992366F4861991529861428A33CC4E25AA80CA67469DD36

//key = FB7035268212E6910C5B990A29A612D5626AB658D7574ACC

//x = 950F687CF53BB4C1F8A400EBAF47F61B074D0E5C1C2B0D6B2D0DE688DB0A5B083BE36D371EDEC56C

//y = 950F687CF53BB4C1F8A400EBAF47F61B074D0E5C1C2B0D6B2D0DE688DB0A5B083BE36D371EDEC56C

//x = 3DF5EAB169C23F067E010FCB0B784C394DCA50BAC954E1F56391852953C6919AB17063311C96CC6A

//y = 3DF5EAB169C23F067E010FCB0B784C394DCA50BAC954E1F56391852953C6919AB17063311C96CC6A

 

Snooper is exit

 

使用注意事项:

1) 由于技术原因,在启动的时候会闪现一个windows窗口。

2) 默认读卡器由上次指定的读卡器名称决定,而非上次指定的读卡器索引决定。