Skip to content

Instantly share code, notes, and snippets.

View jacopotediosi's full-sized avatar
💭
I may be slow to respond.

Jacopo Tediosi jacopotediosi

💭
I may be slow to respond.
View GitHub Profile
@jacopotediosi
jacopotediosi / gist:681b8976324bf2c28ade3b79e6e3bd43
Created May 19, 2020 17:44 — 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

@jacopotediosi
jacopotediosi / block-tor-exit-nodes-fail2ban.md
Last active October 26, 2024 19:45
Block Tor Exit Nodes with Fail2ban

Below is the procedure to automate the ip ban of tor exit nodes with fail2ban.

  1. Install fail2ban:
sudo apt install fail2ban
  1. Create a new fail2ban jail (editing /etc/fail2ban/jail.local):
[tor]