Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyweiss authored Jan 22, 2023
1 parent ecf253a commit 692fac8
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,27 @@
# magspoof_flipper
WIP of MagSpoof for the Flipper Zero. Currently rewriting from the ground up. Interpolates work from Samy Kamkar's original MagSpoof project, dunaevai135's Flipper hackathon project, and the Flipper team's LF RFID app.
WIP of MagSpoof for the Flipper Zero. Currently rewriting from the ground up; basic TX of saved files should now work over both RFID (using the Flipper's internal coil) and GPIO (pins A6 and A7: such that one can connect an H-bridge and external coil). Using this README as coarse notes of what remains to be done; anyone is welcome to contribute!

Many thanks to everyone who has helped in addition to those above, most notably: antirez for bitmapping suggestions, skotopes for RFID consultation, NVX + dlz for NFC consulation, davethepirate for EE insight and being a sounding board, and cool4uma for their work on custom text_input scenes — as well as everyone else I've had the pleasure of chatting with.

Using this README as coarse notes of what remains to be done; anyone is welcome to contribute!
Disclaimer: use responsibly, and at your own risk. While in my testing, I've seen no reason to believe this could damage the RFID hardware, this is inherently driving the coil in ways it was not designed or intended for; I take no responsibility for fried/bricked Flippers. Similarly, please only use this with magstripe cards and mag readers you own — this is solely meant as a proof of concept for educational purposes, and I neither condone nor am sympathetic to malicious uses of my code.

## TODO
Emulation:
- Finish refactor from hardcoded test scene to mag_helpers (most notable change: precomputing bit output akin to devBioS's "RedSpoof" implementation of MagSpoof)
- Multi-track emulation, reverse track emulation
- Experimentation on timing and other parameters (zero prefix/between/suffix, interpacket delay, reverse vs non-reverse track, etc)
- Clean up old testing scenes, remove deprecated helpers
- Reverse track precomputation
- Implement/integrate better bitmap than hacky first pass? antirez's better approach (from ProtoView) included at bottom of mag_helpers
- External TX option(s) — interface with original H-bridge design, also perhaps singular coil. Does GPIO have sufficient output for this? Need a capacitor to discharge from?
- Pursue skunkworks TX improvement ideas listed below

Scenes:
- Non-hardcoded emulation scene (using mag_helpers functions) that play loaded card data
- Emulation config scene. Be able to select between RFID / GPIO H-bridge / GPIO plain coil(?), modify timing (clock and interpacket), select track(s) to be emulated, toggle reverse track (?)
- Complete emulation config scene (include reverse track functionality; possibly expand settings list to include prefix/between/suffix options)
- Improved saved info display (better text wrapping options? remove and just include that info on the emulate scene? decode data to fields?)
- Edit saved card scene

File management:
- What is best way to save track data, and designate which tracks are in a file? Just use end sentinels to determine when loaded, or split it out into different fields?
- Parsing loaded files into relevent fields (would we need to specify card type as well, to decode correctly?)
- Modify manual add scene to allow editing and renaming of existing files
- Validation of card track data?
- Better cleanup / management of data during add manually
- Update Add Manually flow to reflect new file format (currently only sets Track 2, and Info/Emulate scene only displays Track 2)

Known bugs:
- Currently there's a few functions that are unused, while the refactor is in progress. To avoid compilation errors relating to the unused functions, one must comment out `-Werror` in `site_scons/cc.scons` (or comment out the unused functions, the former is just easier/faster).
- Custom text input scene with expanded characterset (Add Manually) has odd behavior when navigating the keys near the numpad
- Track 1 data typically starts with a `%` sign. Unless escaped, it won't be displayed when printed, as C considers it a special character. To confirm: how does this impact the emulation when iterating through the chars? Does it get played correctly?

Expand All @@ -42,3 +35,11 @@ External RX options (What is simplest read module?):
- Some UART mag reader (bulky, but likely easiest to read over GPIO, and means one can read all tracks)
- Square audio jack mag reader (compact, but will be harder to decode from GPIO. Also only will read track 2 without modification)
- USB HID input feasible? Flipper seemingly can't act as an HID host, is there any way to circumvent this or is it due to a hardware incompatibility? This would be the easiest / best option all-around if feasible.

----
## Credits
This project interpolates work from [Samy Kamkar's original MagSpoof project](https://github.com/samyk/magspoof), [dunaevai135's Flipper hackathon project](https://github.com/dunaevai135/flipperzero-firmware), and the Flipper team's [LF RFID](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/main/lfrfid) and [SubGhz](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/applications/main/subghz) apps.

Many thanks to everyone who has helped in addition to those above, most notably: [antirez](https://github.com/antirez) for bitmapping suggestions and general C wisdom, [skotopes](https://github.com/skotopes) for RFID consultation, [NVX](https://github.com/nvx) + dlz for NFC consulation, davethepirate + [arha](https://github.com/arha) for EE insight and acting as sounding boards, and [cool4uma](https://github.com/cool4uma) for their work on custom text_input scenes — as well as everyone else I've had the pleasure of chatting with.

For those who wish to support this project, feel free to either tackle any of the TODOs above and send me a pull request, or [keep me topped up on caffeine](https://www.buymeacoffee.com/zweiss)!

0 comments on commit 692fac8

Please sign in to comment.