{"id":22120407,"url":"https://github.com/znitche/zerorfid","last_synced_at":"2025-07-25T12:33:18.108Z","repository":{"id":156655963,"uuid":"419858190","full_name":"zNitche/ZeroRFID","owner":"zNitche","description":"Raspberry Pi Zero based RFID reader / writer","archived":true,"fork":false,"pushed_at":"2021-10-25T14:13:01.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T06:51:54.267Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zNitche.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-21T19:50:44.000Z","updated_at":"2024-04-24T20:33:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0a6e534-2903-48c6-ab80-9d6754e3ebf2","html_url":"https://github.com/zNitche/ZeroRFID","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zNitche/ZeroRFID","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zNitche%2FZeroRFID","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zNitche%2FZeroRFID/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zNitche%2FZeroRFID/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zNitche%2FZeroRFID/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zNitche","download_url":"https://codeload.github.com/zNitche/ZeroRFID/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zNitche%2FZeroRFID/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267007599,"owners_count":24020261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-01T14:23:15.568Z","updated_at":"2025-07-25T12:33:18.097Z","avatar_url":"https://github.com/zNitche.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### ZeroRFID\n\n---\n\n#### CLI tool for working with Classic 1K MIFARE tags using Raspberry Pi and RC522 RFID reader.\n\n---\n##### RPi Wiring\nfrom `https://github.com/ondryaso/pi-rc522`\n\n| Board pin name | Board pin | Physical RPi pin | RPi pin name |\n|----------------|-----------|------------------|--------------|\n| SDA            | 1         | 24               | GPIO8, CE0   |\n| SCK            | 2         | 23               | GPIO11, SCKL |\n| MOSI           | 3         | 19               | GPIO10, MOSI |\n| MISO           | 4         | 21               | GPIO9, MISO  |\n| IRQ            | 5         | 18               | GPIO24       |\n| GND            | 6         | 6, 9, 20, 25     | Ground       |\n| RST            | 7         | 22               | GPIO25       |\n| 3.3V           | 8         | 1,17             | 3V3          |\n\n\n##### Some useful MIFARE info\nalso from `https://github.com/ondryaso/pi-rc522`\n\nClassic 1K MIFARE tag has **16 sectors**, each contains **4 blocks**. Each block has 16 bytes. All this stuff is indexed - you must count from zero.\nThe library uses \"**block addresses**\", which are positions of blocks - so block address 5 is second block of second sector, \nthus it's block 1 of sector 1 (indexes). Block addresses 0, 1, 2, 3 are from the first sector - sector 0. Block addresses 4, 5, 6, 7 are\nfrom the second sector - sector 1, and so on. You should **not write** to first block - S0B0, because it contains manufacturer data. Each sector has it's **sector trailer**,\nwhich is located at it's last block - block 3. This block contains keys and access bits for corresponding sector. For more info, look at page 10 of the datasheet.\n\n##### Tool Setup\n1. clone this repo.\n2. install dependencies `pip3 install -r requirements.txt`.\n3. run `python3 main.py --help` to see all available modes.\n4. run `python3 main.py --mode \u003cmode\u003e` to run tool in `\u003cmode\u003e `mode.\n\n##### Modes\n1. `r` - reads and displays card data.\n2. `w` - writes data from txt file to card.\n3. `ch` - checks if two cards have the same content.\n4. `d` - dumps card data to txt file.\n5. `chf` - checks if card data and txt file have the same content\n\n##### Config\n- `TOTAL_SECTORS_COUNT` - Card sectors count.\n- `TOTAL_BLOCKS_PER_SECTOR` - Blocks per sector.\n- `TOTAL_BYTES_PER_BLOCK` - Bytes per block.\n- `WRITABLE_UID` - If card allows writing to first block (block no. 0)\n- `WRITE_SECTOR_TRAILER` - If write sector trailers (last block of every sector)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fznitche%2Fzerorfid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fznitche%2Fzerorfid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fznitche%2Fzerorfid/lists"}