OPENSC-EXPLORER(1)

NAME
opensc-explorer - generic interactive utility for accessing smart card and similar security token functions

SYNOPSIS

opensc-explorer [OPTIONS]

DESCRIPTION

The opensc-explorer 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.

OPTIONS

The following are the command-line options for opensc-explorer. There are additional interactive commands available once it is running.

--reader num, -r num
    Use the given reader number. The default is 0, the first reader in the system.

--card-driver driver, -c driver
    Use the given card driver. The default is auto-detected.

--mf path, -m path
    Select the file referenced by the given path on startup. The default is the path to the standard master file, 3F00. If path is empty (e.g. opensc-explorer --mf ""), then no file is explicitly selected.

--wait, -w
    Wait for a card to be inserted

--verbose, -v
    Causes opensc-explorer to be more verbose. Specify this flag several times to enable debug output in the opensc library.

COMMANDS

The following commands are supported at the opensc-explorer interactive prompt.

ls
    list all files in the current DF

cd file-id
    change to another DF specified by file-id

cat [file-id], cat sfi:sfi-id
    print the contents of the currently selected EF or the contents of a file specified by file-id or sfi-id.

info [file-id]
    display attributes of a file specified by file-id. If file-id is not supplied, the attributes of the current file are printed.

create file-id size
    create a new EF. file-id specifies the id number and size is the size of the new file.

delete file-id
    remove the EF or DF specified by file-id

rm file-id
    remove the EF or DF specified by file-id

verify key-typekey-id [key]
    present a PIN or key to the card. Where key-type can be one of CHV, KEY or PRO. key-id is a number representing the key or PIN reference. key is the key or PIN to be verified in hex.

    If key is omitted, PIN will be verified with PIN-Pad.

    Example: verify CHV0 31:32:33:34:00:00:00:00

change CHVid [[old-pin] new-pin]
    change a PIN, where id is the PIN reference

    Examples:

    Change PIN: change CHV2 00:00:00:00:00:00 "foobar"

    Set PIN: change CHV2 "foobar"

    Change PIN with pinpad: change CHV2

put file-id input
    copy a local file to the card. The local file is specified by input while the card file is specified by file-id.

get file-id [output]
    copy an EF to a local file. The local file is specified by output while the card file is specified by file-id.

    If output is ommited, the name of the output file will be derivated from the full card path to file-id.

do_put hex-tag input
    update internal card's 'tagged' data.

    hex-tag is the tag of the card's data. input is the filename of the source file or the literal data presented as a sequence of hexadecimal values or '"' enclosed string.

do_get hex-tag [output]
    copy the internal card's 'tagged' data into the local file.

    The local file is specified by output while the tag of the card's data is specified by hex-tag.

    If output is ommited, the name of the output file will be derivated from hex-tag.

mkdir file-id size
    create a DF. file-id specifies the id number and size is the size of the new file.

erase
    erase the card, if the card supports it.

random count
    generate random sequence of count bytes.

update_record file-id rec_nr rec_offs data
    update record specified by rec_nr of the file specified by file-id with the literal data data starting from offset specified by rec_offs.

    data can be supplied as a sequence of the hex values or as a '"' encolsed string.

update_binary file-id offs data
    binary update of the file specified by file-id with the literal data data starting from offset specified by offs.

    data can be supplied as a sequence of the hex values or as a '"' encolsed string.

debug [level]
    set OpenSC debug level to level.

    If level is ommited the current debug level will be shown.

apdu hex_data
    send a custom APDU command hex_data.

asn1 file-id
    parse and print the ASN1 encoded content of the file specified by file-id.

quit
    exit the program.

SEE ALSO

opensc(7), opensc-tool(1)