Skip to content

Instantly share code, notes, and snippets.

@enckse
Last active August 23, 2020 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enckse/466d87ac587e3f66260dadd0a9cc5fef to your computer and use it in GitHub Desktop.
Save enckse/466d87ac587e3f66260dadd0a9cc5fef to your computer and use it in GitHub Desktop.
OPENSC-TOOL(1) OpenSC Tools OPENSC-TOOL(1)
.SH "NAME" opensc-tool - generic smart card utility
.SH "SYNOPSIS"
.HP 288u
opensc-tool [OPTIONS]
.SH "DESCRIPTION"
.PP The opensc-tool utility can be used from the command line to perform miscellaneous smart card operations such as getting the card ATR or sending arbitrary APDU commands to a card.
.SH "OPTIONS"
.PP
.PP --version,
Print the OpenSC package release version.
.RE .PP --atr, -a
Print the Answer To Reset (ATR) of the card. Output is in hex byte format
.RE .PP --card-driver driver, -c driver
Use the given card driver. The default is auto-detected.
.RE .PP --list-algorithms,
Lists algorithms supported by card
.RE .PP --info, -i
Print information about OpenSC, such as version and enabled components.
.RE .PP --list-drivers, -D
List all installed card drivers.
.RE .PP --list-files, -f
Recursively list all files stored on card.
'\" t
.\" Title: opensc-tool
.\" Author: [see the "Authors" section]
.\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
.\" Date: 08/23/2020
.\" Manual: OpenSC Tools
.\" Source: opensc
.\" Language: English
.\"
.TH "OPENSC\-TOOL" "1" "08/23/2020" "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-tool \- generic smart card utility
.SH "SYNOPSIS"
.HP \w'\fBopensc\-tool\fR\ 'u
\fBopensc\-tool\fR
[\fIOPTIONS\fR]
.SH "DESCRIPTION"
.PP
The
\fBopensc\-tool\fR
utility can be used from the command line to perform miscellaneous smart card operations such as getting the card ATR or sending arbitrary APDU commands to a card\&.
.SH "OPTIONS"
.PP
.PP
\fB\-\-version\fR,
.RS 4
Print the OpenSC package release version\&.
.RE
.PP
\fB\-\-atr\fR, \fB\-a\fR
.RS 4
Print the Answer To Reset (ATR) of the card\&. Output is in hex byte format
.RE
.PP
\fB\-\-card\-driver\fR \fIdriver\fR, \fB\-c\fR \fIdriver\fR
.RS 4
Use the given card driver\&. The default is auto\-detected\&.
.RE
.PP
\fB\-\-list\-algorithms\fR,
.RS 4
Lists algorithms supported by card
.RE
.PP
\fB\-\-info\fR, \fB\-i\fR
.RS 4
Print information about OpenSC, such as version and enabled components\&.
.RE
.PP
\fB\-\-list\-drivers\fR, \fB\-D\fR
.RS 4
List all installed card drivers\&.
.RE
.PP
\fB\-\-list\-files\fR, \fB\-f\fR
.RS 4
Recursively list all files stored on card\&.
.RE
.PP
\fB\-\-list\-readers\fR, \fB\-l\fR
.RS 4
List all configured readers\&.
.RE
.PP
\fB\-\-name\fR, \fB\-n\fR
.RS 4
Print the name of the inserted card (driver)\&.
.RE
.PP
\fB\-\-get\-conf\-entry\fR \fIconf\fR, \fB\-G\fR \fIconf\fR
.RS 4
Get configuration key, format: section:name:key
.RE
.PP
\fB\-\-set\-conf\-entry\fR \fIconf\fR, \fB\-S\fR \fIconf\fR
.RS 4
Set configuration key, format: section:name:key:value
.RE
.PP
\fB\-\-reader\fR \fIarg\fR, \fB\-r\fR \fIarg\fR
.RS 4
Number of the reader to use\&. By default, the first reader with a present card is used\&. If
\fIarg\fR
is an ATR, the reader with a matching card will be chosen\&.
.RE
.PP
\fB\-\-reset\fR [\fItype\fR],
.RS 4
Resets the card in reader\&. The default reset type is
cold, but
warm
reset is also possible\&.
.RE
.PP
\fB\-\-send\-apdu\fR \fIapdu\fR, \fB\-s\fR \fIapdu\fR
.RS 4
Sends an arbitrary APDU to the card in the format
AA:BB:CC:DD:EE:FF\&.\&.\&.\&.
.RE
.PP
\fB\-\-serial\fR
.RS 4
Print the card serial number (normally the ICCSN)\&. Output is in hex byte format
.RE
.PP
\fB\-\-verbose\fR, \fB\-v\fR
.RS 4
Causes
\fBopensc\-tool\fR
to be more verbose\&. Specify this flag several times to enable debug output in the opensc library\&.
.RE
.PP
\fB\-\-wait\fR, \fB\-w\fR
.RS 4
Wait for a card to be inserted\&.
.RE
.SH "SEE ALSO"
.PP
\fBopensc-explorer\fR(1)
.SH "AUTHORS"
.PP
\fBopensc\-tool\fR
was written by Juha Yrjölä
<juha\&.yrjola@iki\&.fi>\&.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment