Skip to content

Instantly share code, notes, and snippets.

@pergolafabio
pergolafabio / cloning-mfc-1k-7byte-uid-nfc-card.md
Created February 23, 2025 20:46 — forked from rickdoesburg/cloning-mfc-1k-7byte-uid-nfc-card.md
Cloning Mifare Classic 1k 7-byte UID cards and the world of NFC magic cards for dummies

Cloning a 7-byte UID MFC (Mifare Classic) 1k card and more

This is a little blog about my trials of figuring out how to clone a 7-byte 1k MFC card and more I discovered. I'm not an expert, this is just what I found out. I'm writing it down because I couldn't find a single place where this info was grouped together.

A little while ago I bought a Flipper Zero because I was interested in the world of NFC/RFID tags and I wanted to figure out a way to clone my NFC card used to open the underground waste container in my neighbourhood.

Findings

  • It turns out most of my NFC cards used for various services are so called MIFARE Classic (MFC) 1K cards. These appear to be the most common card used for semi-secure things. The tag used to enter my office is a MIFARE DESfire card, which as far as I know, isn't clonable unless you have the decryption keys.
    • There is also a MIFARE Classic 4K version which can store more data. I haven't encountered this one yet so nothing I can tell you about it.
  • The MFC Classic
import socket
import time
from datetime import datetime
import paho.mqtt.client as mqtt_client
# Door station configurations
DOOR_STATIONS = {
"10.10.2.28": {
"name": "Haupteingang",
"topic": "frigate/Haupteingang/klingeln/state"
@pergolafabio
pergolafabio / sign.py
Created December 14, 2022 08:16 — forked from bahorn/sign.py
Implementation of the Tuya API signing.
import requests
import hashlib
import time
import uuid
import os
import copy
import json
# This is based on my personal implementation but stripped down to only what is
# needed to verify it.
@pergolafabio
pergolafabio / tuya_cloud.py
Created December 14, 2022 08:16 — forked from bahorn/tuya_cloud.py
Cloud endpoint
import requests
import hashlib
import time
import uuid
import os
import copy
import json
# Fixed up version of my previous code to work with the Cloud endpoints.
# Hopefully this works.
@pergolafabio
pergolafabio / sip.py
Created July 25, 2022 17:00 — forked from grimpy/sip.py
# -*- coding: utf-8 -*-
import sys
import socket
import requests
import re
import random
import hashlib
import threading
import time
import logging
@pergolafabio
pergolafabio / alibaba-vendor.md
Created October 20, 2021 17:15 — forked from emilio-martinez/alibaba-vendor.md
Topin 365GPS Server config

365GPS office address Contact: Erik Liu Address: 505 Block B, Donglian Building, Chuangye Second Road, Baoan District, Shenzhen, Guangdong, China(广东省深圳市宝安区创业二路东联大厦B座505,洪浪北地铁站旁) Mobile/ wechat/ whatsapp: +86-13480999031
Alibaba: 365gps.en.alibaba.com Skype: topin.sales
E-mail: [email protected]

============================================================= Hi

@pergolafabio
pergolafabio / README.md
Created August 17, 2021 06:15 — forked from dries007/README.md
Dobiss Domotica / Home Automation Protocols

Dobiss Domotica / Home Automation Protocols

This is information related to the Dobiss protocols that I have discovered by probing various things on my devices. My installation is a pair of modules marked "Dobiss Domotics Relay Module single pole 8 channel Model DO4511" connected by a black CAN cable. The button bus is connected to the first module.

WARNING Assume that anything you can touch or probe or poke a wire into is on LIVE VOLTAGE and will kill you if you touch it. I'm not responsible for whatever you decide to do with this information.

In particular make sure of the following: Measure that there is no voltage between the ground and your earch connection.