Skip to content

Instantly share code, notes, and snippets.

View duchenpaul's full-sized avatar
:shipit:
Out sick

Chenny Du duchenpaul

:shipit:
Out sick
  • Citrix Systems, Inc.
  • Nanjing
View GitHub Profile
@duchenpaul
duchenpaul / starwars.py
Last active September 13, 2017 16:32 — forked from stestagg/starwars.py
micropython starwars
import gc
import machine
# import machine
import time
import network
SSID='Poop'
PWD='cockcock'
# Configure GPIO pins 0 and 2 to be used for
@duchenpaul
duchenpaul / gist:8ec1efae0880397d1a9643f0edaaa998
Last active May 11, 2017 02:31 — forked from alphazo/gist:3303282
Clone MiFare cards using chinesse UUID writable cards

libnfc supports UUID writable cards and even has some dedicated tools for them.

However it doesn't work with some of the cards found on eBay that are even simpler to use. Sector 0 is unlocked and can be written without any additional commands. libnfc requires a small patch to get it working.

Following has been tested under ArchLinux with modified libnfc 1.5.1, mfoc 0.10.2 and a SCL3711 dongle.

Patch & recompile libnfc

The patch is fairly simple, open libnfc-1.5.1/utils/nfc-mfclassic.c and comment 2 lines (it was lines 384 and 385 for me):

// Try to write the trailer