Skip to main content

Library and command line utils to use MSR605 magnetic card reader/writer

Project description

Intro

MSR605 is a very well built and popular magnetic card reader/writer. msrx is a library and a command line utility that allows talking to this device.

Features

  • msrx python module compatible with python 2.7+ and python 3

  • Command line utility with read, write and erase functionality

Installation

$ pip install msrx

Usage

To read a card’s data, run the following and swipe a card:

$ msrx read %PA1VSBUTT0 .8W11(BT003423342?|;943300000002342?:|

The output is a pipe (‘|’) separated track data in ISO-7811 format. In the above example, only tracks 1 and 2 have data in them.

To erase a card, run the following and swipe a card (WARNING this is non-reversible):

$ msrx erase -t 1,3

The above erases tracks 1 and 3. To erase all tracks, leave out -t.

To write to a card, run the following and swipe a card:

$ echo ‘%HAPPY?||;99?’ | msrx write

This writes to tracks 1 and 3 because we left track 2 data empty. Note that restrictions apply as to what set of characters and in what format may be stored in each track. Consult ISO-7811 parts 2 and 6 for more information.

To see other options, run msrx with -h option.

To use msrx as a library:

import msrx mymsrx = msrx.MSRX(‘/dev/ttyUSB0’)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

msrx-0.2.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

msrx-0.2-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file msrx-0.2.tar.gz.

File metadata

  • Download URL: msrx-0.2.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for msrx-0.2.tar.gz
Algorithm Hash digest
SHA256 6cf4b274c01fcc9f3a0bb474286e39bffde0b18bc917855a7fc0796600476321
MD5 83e0d8af610c6d20c5ee94b8b7b67b81
BLAKE2b-256 867c1738938c455cd87c0d78e005157e1254d72b92ed17f9d841cc34111997c8

See more details on using hashes here.

File details

Details for the file msrx-0.2-py3-none-any.whl.

File metadata

  • Download URL: msrx-0.2-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for msrx-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5abafa84056a75090616bae56e9eb9c213b17df8820fe1657baacd69514a1ea4
MD5 71179f8fb01651051ce1a0aeb75dd8fe
BLAKE2b-256 182904d2aaa0518c3cb4004f3e8af914ab2dd39c6148791e11badb6b6803909d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page