Any github repos or python scripts to create reader/writer compatible formats?

fraudstar007

Member
Messages
16
Reaction score
23
Points
3
So I got my reader/writer MSR X6 and my credit card blanks in the mail today and got it installed. After swiping my old credit cards I saw something totally different than the CVVs I bought online.
Code:
2021.08.21    23:26:16
%BCREDITCARDNUMBER^FIRSTNAME LASTNAME                /^YYMM201476870000000000PVV000000?
;CREDITCARDNUMBER=YYMM2014768780200000?
+?
I changed the values of my actual expired card details lol. But I did some research here and where I put "YYMM" it is expiration year and month in reverse. Where I put "201" it stands for Service Code, which tells you your interchange rules, authorization processing, and range of services. Where I put "PVV", it stands for PIN Verification Value and it basically is a DES hashed checksum of the actual PIN on the debit card. I do not think it is important if you are swiping them as credit at a gas station. "476878" is the IIN, or Issuer Identification Number (I think) I am not sure what "0200000" means.
Please correct me if I am wrong. Because I think the IIN is the first six digits of a 16-digit VISA/Mastercard credit card.
Right now manually writing the reader/writer text file is cumbersome so I want to write a Python script to change
Code:
BIN     COUNTRY::CARDNUMBER::MONTH:YEAR::CVV:NAME::ADDRESS::CITY::STATE::ZIP::PHONE::
into these values.
However, I am asking around if anyone already did something like that before and can automatically write me a text file to immediately start cloning cards. Like did they put it up on Github or something?
 
Credit Card Reader NFC (EMV)
This app was made to read public data on an NFC banking card compliant with EMV norm.
Infos: This application is an analysis tool for reading contactless NFC EMV credit cards data. In some new EMV card, holder name and the transaction history have been removed by issuer to protect privacy. Be sure your card is NFC compliant (NFC logo printed on them).This app is not a payment app. Send me your card log and an email if you find an issue with this app.

Security:
• In-App purchases are only present for donation.
• This app doesn't access to Internet (No Internet permission).
• Sources available on Github https://github.com/devnied/EMV-NFC-Paycard-Enrollment

Compatible EMV cards:
• Visa• American Express
• MasterCard
• LINK (UK) ATM network
• CB (France)
• JCB
• Dankort (Denmark)
• CoGeBan (Italy)
• Banrisul (Brazil)
• Saudi Payments Network (Saudi Arabia)
• Interac (Canada)
• Discover Card
• UnionPay

For security reason, this app doesn't access to Internet (No Internet permission) and you must confirm that you own the credit card before access to the application.
By default, credit card number is masked.

How to play Credit Card Reader NFC (EMV) on PC
Download and Install Nox App Player Android Emulator.
Run Nox App Player Android Emulator and login Google Play Store.
Open Google Play Store and search Credit Card Reader NFC (EMV) Download.
Install Credit Card Reader NFC (EMV) and start it.
Well done! Now you can play Credit Card Reader NFC (EMV) on PC, just like Credit Card Reader NFC (EMV) for PC version.

Android CardReader Sample
This sample demonstrates how to implement a low-level NFC card reader, for reading cards that do not contain NDEF or Android Beam data. This sample is designed to read the virtual loyalty card implemented in the "CardEmulation" sample.
In particular, this sample demonstrates how to disable Android Beam, select which AIDs the reader is interested, and establish communication with the card.

Pre-requisites
  • Android SDK v23
  • Android Build Tools v23.0.0
  • Android Support Repository

Getting Started
This sample uses the Gradle build system. To build this project, use the "gradlew build" command or use "Import Project" in Android Studio.

Support
If you've found an error in this sample, please file an issue: https://github.com/googlesamples/android-CardReader

Patches are encouraged, and may be submitted by forking this project and submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.

Virtual Smart Card Architecture
Virtual Smart Card Architecture is an umbrella project for various projects concerned with the emulation of different types of smart card readers or smart cards themselves.

Currently the following projects are part of Virtual Smart Card Architecture:
Please refer to project's website for more information.

NFC Smart Cardreader
NFC Smart Card Reader PC/SC Library.
Example code and library for raw communication to NFC tags with Windows Phone 8.1, but requires a device with support (Lumia 830 & 73x)

Project Description
Example code and library for raw communication to NFC tags with Windows Phone 8.1, but requires a device with support (Lumia 830 & 73x)

NOTE: This code will work only on a Windows Phone running 8.1 or higher, and with an NFC driver that supports smart card reader mode such as the NXP PN547 which is available on the Lumia 730 and Lumia 830 (it will NOT work on a Lumia 930 or any existing hardware, even after updating to 8.1). See inside the MainPage.GetDevices() function for how to detect at runtime whether a device supports this functionality.

A new feature in Windows Phone 8.1 (on specific new hardware devices) is to be able to directly send raw commands to external plastic NFC cards, previously the phone could only read/write NDEF messages to NDEF-formatted tags but now you can talk to things like transit passes etc. For NXP PN547-based devices NFC cards such as MIFARE Classic/Ultralight/DESfire, ISO7816-4/APDU-based cards like JCOP, Jewel are supported as well as some limited support for ISO15693 and Felica. This project contains sample code only for MIFARE Classic/Ultralight/DESfire and Felica, but can be easily extended to support the others.

The Windows.Devices.SmartCards.SmartCardReader WinRT API lets you send raw APDU commands and get responses (similar to the WinSCard Win32 APIs on desktop), but for cards that are not APDU-based (eg MIFARE Classic/Ultralight, Felica, Jewel, ISO15693 etc) we follow the PC/SC standards whereby you construct an APDU containing the data needed for the command you want and the NFC driver will convert that to the appropriate native command and send to the card. Also, in order to identify the type of non-ISO7816-4/APDU card present the ATR (answer to reset) returned by the SmartCard object is encoded according to the PC/SC specifications. The PcscSdk project source code contains libraries that will encode/decode the PC/SC-based APDUs/ATRs necessary to talk to these contactless NFC plastic cards, and there is a sample phone app that demonstrates the usage.

For details on the PC/SC APDU encoding of commands to non-APDU-based contactless cards please refer to section 3.1.3 in the PC/SC specification here: http://www.pcscworkgroup.com/specifications/files/pcsc3_v2.01.09.pdf as well as the supplemental documents here: http://www.pcscworkgroup.com/specifications/files/pcsc3_v2.01.09_sup.pdf and here: http://www.pcscworkgroup.com/specifications/files/pcsc3_v2.01.09_amd1.pdf

The following is a partial list of commands which are supported by the NXP PN547 driver but this sample code has not yet implemented, please do contribute back to the project if you implement them

ISO15693 Family
CommandCLAINSP1P2Le
WRITE0xFF0xD6Block Number0x000x4

Jewel Family
CommandCLAINSP1P2Le
WRITE1-E0xFF0xD6Block NumberBlock Offset0x01
WRITE8-E0xFF0xD6Block Number0x000x08

Jewel Family
CommandCLAINSP1P2Le
READ ALL0xFF0xB00x000x000x00
RID0xFF0xB00x000x000x06
READ0xFF0xB0Block NoBlock Offset0x01
READ 80xFF0xB0Block No0x000x08
READ SEG0xFF0xB00x00Segment Addr0x80

MIFARE Standard increment/decrement etc, see section 3.2.2.1.10 in http://www.pcscworkgroup.com/specifications/files/pcsc3_v2.01.09_amd1.pdf
Info: https://archive.codeplex.com/?p=nfcsmartcardreader
Download archive https://codeplexarchive.blob.core.w...cts/nfcsmartcardreader/nfcsmartcardreader.zip

pyscard - Python for smart cards
pyscard - Python smart card library - is a Python module adding smart cards support to Python.

Download
The pyscard project is available from different sources:

Patch/bug reports
Report bugs or issues on github issues or sourceforge.
Report patches as github pull requests or on sourceforge feature requests system.

Architecture
Pyscard consists of:
  • smartcard.scard, an extension module wrapping the WinSCard API (smart card base components) also known as PC/SC, and
  • smartcard, a higher level Python framework built on top of the raw PC/SC API.
pyscard.jpg


Documentation
pyscard user’s guide
smartcard reference (Python smart card library)
scard reference (Python PCSC wrapper), the Python wrapper around PCSC

Samples
High level API samples: See pyscard smartcard framework samples
Low level API samples: See PCSC wrapper samples

Index contents:
  • pyscard user’s guide
    • Copyright
    • Introduction
    • Smart Cards
    • Quick-start
      • The reader-centric approach
      • The Answer To Reset (ATR)
      • The card-centric approach
        • Requesting a card by ATR
        • Requesting any card
        • Custom CardTypes
        • Selecting the card communication protocol
      • The object-centric approach
    • Tracing APDUs
      • The brute force
      • Using card connection observers to trace apdu transmission
        • Full sample code
    • Testing for APDU transmission errors
      • The brute force for testing APDU transmission errors
      • Checking APDU transmission errors with error checkers
        • Error checkers
        • Error checking chains
        • Filtering exceptions
        • Full sample code
        • Detecting response APDU errors for a card connection
        • Writing a custom error checker
    • Smartcard readers
      • Listing Smartcard Readers
      • Organizing Smartcard Readers into reader groups
      • Monitoring readers
    • Smart Cards
      • Monitoring Smart Cards
      • Sending APDUs to a Smart Card Obtained from Card Monitoring
    • Connections
      • Creating a Connection from a CardRequest
      • Creating Connection from CardMonitoring
        • Full sample code
      • Card Connection Decorators
        • Exclusive Card Connection Decorator
        • Exclusive Transmit Card Connection Decorator
        • Secure Channel Card Connection Decorator
    • A word on cryptography
      • Binary strings and list of bytes
      • Secret key cryptography
  • pyscard smartcard framework samples
    • Display the ATR of inserted cards
    • Selecting the DF_TELECOM of a card
    • A simple apdu tracer and interpreter
    • Tracing connection events
    • Decorating Card Connections to add custom behavior
    • Detecting response apdu errors
    • Implementing a custom ErrorChecker
    • Implementing a custom card type
    • Monitoring smartcard readers
    • Monitoring smartcard insertion/removal
    • APDU/ATR byte to string utilities
  • PCSC wrapper samples
    • send a Control Code to a card or reader
    • get the ATR of a card
    • get the attributes of a card
    • wait for card insertion/removal
    • list the cards introduced in the system
    • list the interfaces supported by a card
    • locate cards in the system
    • manage readers and reader groups
    • list smart card readers
    • select the DF_TELECOM of a SIM card
    • perform a simple smart card transaction
  • License

.NET Library for Smart Chip Cards
Smart Card API for .NET – a few lines of C# or VB.NET code is all it takes to access smart chip cards. Our class library and helper classes come with C# and VB.NET sample code. Easy-to-use managed code supports contact and contactless chip cards on PCSC compatible smart chip card readers and chip encoders built into plastic card printers.

Fast Integration
SmartCard API class library supports .NET programming languages such as Visual Basic.NET, Visual C#.
It exposes native, Windows smart card API (winscard.dll) through a set of managed, event-driven .NET classes.
  • card and reader tracking via events
  • managed PC/SC wrapper class
  • saves time and money

Free Trial SDK
Download your trial version now:
  • fully functional SDK
  • sample applications and extensive documentation.

Simple Licensing
Purchase of a software license grants Royalty Free usage and redistribution of runtime files with your software.

C# Source Code
Protect your investment: The complete C# source code for our core library smartcard.dll is available for purchase, too.

Storage Cards
Contact and contactless memory cards is supported.
Contactless: Mifare Classic, Ultralight, DESFire EV1, iCODE, …
Contact: SLE 4442, AT24SCxx
Prox: HID Prox
Support for legacy HID iCLASS cards and iCLASS SEOS cards upon request.

Government Cards
Get started Government issued cards via both contact (ISO 7816) and contactless (ISO 14443, ISO 15693) interfaces using PC/SC-based industry standards compliant readers.
  • U.S. Gov. PIV card
  • U.S. Gov. CAC

Third-party APIs
There is a tendency away from proprietary, native APIs. We therefore integrate readers and cards on APDUs level whenever possible.
Limited support available for Identive’s MCARD API. Full support available for OMNIKEY SCARDSYN and German CT-API.

Maintenance and Support by CardWerk Technologies
We offer maintenance contracts, on site training and professional consulting services including smart card development services for iCLASS, DESFire EV1, SEOS, PIV card, Mifare, JavaCard, MULTOS and countless more chip card types. We can assist with any smart card you need.
Download SmartCardAPI for .NET

Links:

Smartcard reader
Here are 20 public repositories matching this topic

frankmorgner / vsmartcard
umbrella project for emulation of smart card readers or smart cards
C.

martinpaljak / apdu4j
Java code for APDU level smart cards: javax.smartcardio, PC/SC and remote JSON.
Java.

Nitrokey / nitrokey-storage-firmware
Firmware for the Nitrokey Storage device.
C.

grakic / jfreesteel
A native Java library, a Swing GUI application and an applet to read the Serbian eID card, built on javax.smartcardio
Java.

kogoia / MRTD.NET
C#

Archie-Yang / PcscDotNet
.NET standard library for accessing PC/SC (Personal Computer/Smart Card) functions.
C#

OpenJavaCard / openjavacard-smartcardio
SmartcardIO for Android.
Java.

lewixlabs / Charta
Dev tool for smartcard/pos developers.
TypeScript.

wookey-project / libiso7816
SoC-independent part of the iso7816 stack.
C.

wookey-project / driver-stm32f4xx-iso7816
SoC specific part of the ISO7816 stack.
C.

Rosmianto / smartcard-reader-library
C++

258eda00-8bc1-11eb-80e0-5b899f48714b

h2lab / leia-solo-firmware
Firmware for LEIA SOLO device.
C++

Flowtter / py-acr122u
A library to use the acr122u at its full potential.
Python.

henvb / SnappyWinscard
.NET interface for smart card readers like ACS ACR122U.
C#

39e95d80-b4ef-11ea-9cb3-1eb59bdeb790

amusarra / raspberry-pi-access-via-ts-cns
Un sistema di accesso basato sulla Smart Card TS-CNS e Raspberry Pi - https://bit.ly/3hkJ8Aj
Python.

relianz / DeviceServer
An WPF app with an integrated HTTP server that enables the web browser to access local smartcard devices that would otherwise not be accessible via JavaScript.
C#

NF02 / libasecnsp11-for-archlinux
In questo repository sono presenti le instruzioni aggiornate per installare il driver per i lettori smartcard che vengono utilizzati per leggere le tessere sanitarie
Shell.

FilipePires98 / AuctionManager
Auction Manager: a blockchain-based management system for multiple auction types.
Python.

SkryptKiddie / smartrider
tools for decoding smartrider cards
Python.

1c9f0800-8bc3-11eb-89c7-68102e83efc1

h2lab / smartleia
Python driver for the LEIA Smart Reader.

Introduction to Smart Card Development on the Desktop

The Top 25 Smartcard Open Source Projects

50 programs for "java smart card reader"

24 programs for "smart card reader program"
 
You asked a very smart and interesting question.
Sorry, but I could not answer it, I understand that myself, but I am very interested in reading the opinions of other forum members.
I really hope that someone can give reasonable advice on this matter.
I myself will also try to study the theoretical and practically basic, about which you ask and try to give your comment on this matter.
 
Introducing, MaxOut, Reader/Writer CC Formatter

You guys, I wrote a quick Python script (Python 3.8.10) that can be run in either Linux or Windows and converts collected CVVs bought online at dump stores and turns them into files compatible with the MSR X6 Reader/Writer.
I have not tested the cards at a gas pump yet and there are some features like offering a text file as a argument to read from and write to so I will post the source here.
I don't want to upload to github. FBI subpeonaed github in my Federal indictment 4 years ago. I'll just post the source here, and eventually submit it to free file sharing.
I call it MaxOut because you "Max Motherfuckers Out". A term a learned in prison for subjecting someone to the "ultimate punishment" for breaking the rules in prison. Only this time, you're maxxing out your victim's bank accounts XD.

MaxOut Source Code

Python:
#!/usr/bin/python3
import os
import sys
import time
# Universal Service Code gives the card the best privileges

CVVs = "creds.txt"
serviceCode = str("121")
#  Digit 1 (most significant): Interchange and technology:
# Code 1: Available for international interchange
# Digit 2: Authorization processing:
# Code 2: Transactions are authorized by issuer and should be online.
# Digit 3 (least significant): Range of services and PIN requirements:
# Code 1: No restrictions.
pvv = str("47687") # VISA Pin Verification Value
discretionaryData = str("802") # VISA card discretionary data
swipeDate = str("2021.08.05")
swipeTime = str("21:26:16")
outfile = "ReaderWriterInputFile.txt"
# Clear any previous files
os.system('echo "" > ReaderWriterInputFile.txt')

def writeOutfile(RWFormat, outfile):
    # os.command('touch ReaderWriterInputFile.txt')
#    os.system('echo "" > ReaderWriterInputFile.txt')
    w = open(outfile, 'a+')
    w.write(RWFormat)
    w.close()
    return outfile

def createRWFormat(ccNum, fullName, yy, mm, serviceCode, pvv, discretionaryData, swipeDate, swipeTime):
    readerwriter_format ="""
{7}    {8}
%B{0}^{1}                /^{2}{3}{4}{5}0000000000{6}000000?
;{0}={2}{3}{4}{5}{6}00000?
+?

    """.format(
        str(ccNum),
        str(fullName.upper()),
        str(yy),
        str(mm),
        str(serviceCode),
        str(pvv),
        str(discretionaryData),
        str(swipeDate),
        str(swipeTime)
        )
    s = readerwriter_format
    print("DEBUG: Credit card swipe data created\r\n")
    print(s)
    writeOutfile(s, outfile)
    return s

# Read better output. Right now they're all over the place.
def readCVVs(CVVs):
    r = open(CVVs)
    l = r.readlines()
    for line in l:
        t = line.split("::")
        ccNum = t[1]
        mm = t[2]
        yy = t[3]
        cvv = t[4]
        fullName = t[5].upper()
        streetAddress = t[6]
        cityAddress = t[7]
        stateAddress = t[8]
        zipAddress = t[9]
        print("DEBUG: CVV information read\r\n")
        s = """
        Credit Card Number: {0}
        Expiration Month: {1}
        Expiration Year: {2}
        CVV: {3}
        Full Name: {4}
        Street Address: {5}, {6}, {7}, {8}
        """.format(
            str(ccNum),#0
            str(mm),#1
            str(yy),#2
            str(cvv),#3
            str(fullName),#4
            str(streetAddress),#5
            str(cityAddress),#6
            str(stateAddress),#7
            str(zipAddress),#8
        )
        print("Debug CVV data read")
        print(s)
        createRWFormat(ccNum, fullName, yy, mm, serviceCode, pvv, discretionaryData, swipeDate, swipeTime)
    time.sleep(1)
    return ccNum, fullName, yy, mm, serviceCode, pvv, discretionaryData, cvv, streetAddress, cityAddress, stateAddress, zipAddress

readCVVs(CVVs)
print("Your input file for the MSR X6 Reader/Writer has been created. Add that file to the MSR app and start swiping blank credit cards!")

How to use MaxOut.
Install Python 3 for your respective operating system. For Windows it's https://www.python.org/downloads/windows/
For Linux, you already have some version of Python 3. The latest version is not necessary because MaxOut uses the bare minimum of imports of modules.
For Mac, you need to follow this guide
From the Windows cmd.exe command line type
Code:
cmd.exe python $PATH/main.py
For Linux, Unix, or MacOS with Python Brew installed
Code:
python3 main.py
You must specify python3 as a command, because normally the python command only uses python2, find out with the
Code:
which python
command to see what it points to.

Updates
  1. I revised the code multiple times because of poor documentation. The idiots at neapay wasted my time by accidentally switching the YYMM digits to MMYY, making every swipe a expired card at the gas pumps. https://neapay.com/online-tools/credit-card-number-generator-validator.html
  2. But if I follow the standards at http://sagan.gae.ucm.es/~padilla/extrawork/tracks.html and it gave me cards that prompted me for a ZIP code to validate at the gas pump.
  3. Furthermore I discovered, due to poor documentation, that anything LOWERCASE, including name, will become written as garbled characters if you swipe it from the write-list generated by MaxOut and attempted to read the card again. I immediately fixed it by making it upper(). This was also never properly mentioned.
For that reason, as soon as you clone a card, write down the expiration date and zip code because that are the most likely questions they will ask at the automated pump.

Update: I tried the cloned cards based upon a VISA debit card template I made. And although the gas pump asked for my zip code, the transaction was declined. There is a whole lot more to writing correct Track 1 and 2 data instead of copy and pasting and the standards have to be understood more. The problem could be...

  1. Service code doesn't match card
  2. Tracks 1 and 2 do not match card provider and bank BIN
  3. Parity bits and checksum digits are incorrect
  4. Need to write a function to distinguish between VISA, Mastercard, Discover, Diner's Club
  5. Check code from the book Violent Python for the basics on identifying the correct processor
 
Last edited:
Top