'\" t .\" Title: opensc-explorer .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 06/03/2012 .\" Manual: OpenSC tools .\" Source: opensc .\" Language: English .\" .TH "OPENSC\-EXPLORER" "1" "06/03/2012" "opensc" "OpenSC tools" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" opensc-explorer \- generic interactive utility for accessing smart card and similar security token functions .SH "SYNOPSIS" .PP \fBopensc\-explorer\fR [OPTIONS] .SH "DESCRIPTION" .PP The \fBopensc\-explorer\fR utility can be used interactively to perform miscellaneous operations such as exploring the contents of or sending arbitrary APDU commands to a smart card or similar security token\&. .SH "OPTIONS" .PP The following are the command\-line options for \fBopensc\-explorer\fR\&. There are additional interactive commands available once it is running\&. .PP \fB\-\-reader\fR num, \fB\-r\fR num .RS 4 Use the given reader number\&. The default is 0, the first reader in the system\&. .RE .PP \fB\-\-card\-driver\fR driver, \fB\-c\fR driver .RS 4 Use the given card driver\&. The default is auto\-detected\&. .RE .PP \fB\-\-mf\fR path, \fB\-m\fR path .RS 4 Select the file referenced by the given path on startup\&. The default is the path to the standard master file, 3F00\&. If \fIpath\fR is empty (e\&.g\&. \fBopensc\-explorer \-\-mf ""\fR), then no file is explicitly selected\&. .RE .PP \fB\-\-wait, \-w\fR .RS 4 Wait for a card to be inserted .RE .PP \fB\-\-verbose, \-v\fR .RS 4 Causes \fBopensc\-explorer\fR to be more verbose\&. Specify this flag several times to enable debug output in the opensc library\&. .RE .SH "COMMANDS" .PP The following commands are supported at the \fBopensc\-explorer\fR interactive prompt\&. .PP \fBls\fR .RS 4 list all files in the current DF .RE .PP \fBcd\fR \fIfile\-id\fR .RS 4 change to another DF specified by \fIfile\-id\fR .RE .PP \fBcat\fR [\fIfile\-id\fR], \fBcat\fR sfi:\fIsfi\-id\fR .RS 4 print the contents of the currently selected EF or the contents of a file specified by \fIfile\-id\fR or \fIsfi\-id\fR\&. .RE .PP \fBinfo\fR [\fIfile\-id\fR] .RS 4 display attributes of a file specified by \fIfile\-id\fR\&. If \fIfile\-id\fR is not supplied, the attributes of the current file are printed\&. .RE .PP \fBcreate\fR \fIfile\-id\fR \fIsize\fR .RS 4 create a new EF\&. \fIfile\-id\fR specifies the id number and \fIsize\fR is the size of the new file\&. .RE .PP \fBdelete\fR \fIfile\-id\fR .RS 4 remove the EF or DF specified by \fIfile\-id\fR .RE .PP \fBrm\fR \fIfile\-id\fR .RS 4 remove the EF or DF specified by \fIfile\-id\fR .RE .PP \fBverify\fR \fIkey\-type\fR\fIkey\-id\fR [\fIkey\fR] .RS 4 present a PIN or key to the card\&. Where \fIkey\-type\fR can be one of CHV, KEY or PRO\&. \fIkey\-id\fR is a number representing the key or PIN reference\&. \fIkey\fR is the key or PIN to be verified in hex\&. .sp If \fIkey\fR is omitted, PIN will be verified with PIN\-Pad\&. .sp Example: verify CHV0 31:32:33:34:00:00:00:00 .RE .PP \fBchange CHV\fR\fIid\fR [[\fIold\-pin\fR] \fInew\-pin\fR] .RS 4 change a PIN, where \fIid\fR is the PIN reference .sp Examples: .sp Change PIN: change CHV2 00:00:00:00:00:00 "foobar" .sp Set PIN: change CHV2 "foobar" .sp Change PIN with pinpad: change CHV2 .RE .PP \fBput\fR \fIfile\-id\fR \fIinput\fR .RS 4 copy a local file to the card\&. The local file is specified by \fIinput\fR while the card file is specified by \fIfile\-id\fR\&. .RE .PP \fBget\fR \fIfile\-id\fR [\fIoutput\fR] .RS 4 copy an EF to a local file\&. The local file is specified by \fIoutput\fR while the card file is specified by \fIfile\-id\fR\&. .sp If \fIoutput\fR is ommited, the name of the output file will be derivated from the full card path to \fIfile\-id\fR\&. .RE .PP \fBdo_put\fR \fIhex\-tag\fR \fIinput\fR .RS 4 update internal card\*(Aqs \*(Aqtagged\*(Aq data\&. .sp \fIhex\-tag\fR is the tag of the card\*(Aqs data\&. \fIinput\fR is the filename of the source file or the literal data presented as a sequence of hexadecimal values or \*(Aq"\*(Aq enclosed string\&. .RE .PP \fBdo_get\fR \fIhex\-tag\fR [\fIoutput\fR] .RS 4 copy the internal card\*(Aqs \*(Aqtagged\*(Aq data into the local file\&. .sp The local file is specified by \fIoutput\fR while the tag of the card\*(Aqs data is specified by \fIhex\-tag\fR\&. .sp If \fIoutput\fR is ommited, the name of the output file will be derivated from \fIhex\-tag\fR\&. .RE .PP \fBmkdir\fR \fIfile\-id\fR \fIsize\fR .RS 4 create a DF\&. \fIfile\-id\fR specifies the id number and \fIsize\fR is the size of the new file\&. .RE .PP \fBerase\fR .RS 4 erase the card, if the card supports it\&. .RE .PP \fBrandom\fR \fIcount\fR .RS 4 generate random sequence of \fIcount\fR bytes\&. .RE .PP \fBupdate_record\fR \fIfile\-id\fR \fIrec_nr\fR \fIrec_offs\fR \fIdata\fR .RS 4 update record specified by \fIrec_nr\fR of the file specified by \fIfile\-id\fR with the literal data \fIdata\fR starting from offset specified by \fIrec_offs\fR\&. .sp \fIdata\fR can be supplied as a sequence of the hex values or as a \*(Aq"\*(Aq encolsed string\&. .RE .PP \fBupdate_binary\fR \fIfile\-id\fR \fIoffs\fR \fIdata\fR .RS 4 binary update of the file specified by \fIfile\-id\fR with the literal data \fIdata\fR starting from offset specified by \fIoffs\fR\&. .sp \fIdata\fR can be supplied as a sequence of the hex values or as a \*(Aq"\*(Aq encolsed string\&. .RE .PP \fBdebug\fR [\fIlevel\fR] .RS 4 set OpenSC debug level to \fIlevel\fR\&. .sp If \fIlevel\fR is ommited the current debug level will be shown\&. .RE .PP \fBapdu\fR \fIhex_data\fR .RS 4 send a custom APDU command \fIhex_data\fR\&. .RE .PP \fBasn1\fR \fIfile\-id\fR .RS 4 parse and print the ASN1 encoded content of the file specified by \fIfile\-id\fR\&. .RE .PP \fBquit\fR .RS 4 exit the program\&. .RE .SH "SEE ALSO" .PP opensc\-tool(1)