Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mifare Classic gen1/gen2 (+ regular) card writing support #399

Merged
merged 15 commits into from
Dec 24, 2023

Conversation

Foxushka
Copy link
Collaborator

Release 1.0 coming right after merging this

@github-actions github-actions bot added the translation changes When something in the translation changes label Dec 14, 2023
@GameTec-live
Copy link
Owner

Selecting "Skip default dictionary" Followed by "Empty 0 Keys" and then trying recover keys gives a index out of range in typed data patch...
image

@GameTec-live
Copy link
Owner

Trying to save only the uid of a non mifare classic card (was possible before) causes a null exceptions in saveHFCard
image

@GameTec-live
Copy link
Owner

No real error, but trying to write a mifare save to a non mifare card just stalls? maybe displaying a warning message or smthng?

@GameTec-live
Copy link
Owner

oh yeah, step 3 also needs to be scrollable or else it gets cut off depending on window size...

@GameTec-live
Copy link
Owner

GameTec-live commented Dec 16, 2023

and writing to non magic cards always gives a "smthng went wrong"... (prob because of block 0 verification)
Id say, as discussed, when smthng fails to write, display the blocks that failed to write and then let the user choose if its a failure... (And maybe if only block 0 failed to write display a info banner that this is normal behaviour for non magic cards)

Edit: looks like that one card just wasnt writable? still, the dispaly sounds like a good idea
Edit Edit: Got a def writable card, wrote smthng to it, dumped it, cleared it, tried writing said dump back to said generic card, nothin... write error and no data...

oh and missmatched dump/card sizes also need to be taken into account (eg 4k dump, 1k card)

@GameTec-live
Copy link
Owner

writing a uid only card gives a invalid value not inclusive range...
image

@GameTec-live
Copy link
Owner

GameTec-live commented Dec 16, 2023

writing to gen2/generic is broken in general? got out my 1k magic gen 2, dumped a 1k (not 1k ev1, etc, just 1k), tried writing and theres always a error in card writing
Edit: What? even my gen1a refuses to succesfully write...

@GameTec-live
Copy link
Owner

oh yeah and writing needs to give a popup on the lite (just like when reading) or else everything breaks...

@GameTec-live
Copy link
Owner

Have a log
log.log

Future<bool> isMagic(dynamic data) async {
await communicator.send14ARaw(Uint8List(1)); // reset

Uint8List data = await communicator.send14ARaw(Uint8List.fromList([0x40]),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do it via raw and not the predefined commands? (if there are any)

@GameTec-live
Copy link
Owner

oh yeah, just noticed, card export is borked too?

@VarChar42
Copy link
Contributor

Works on windows using Mifare Classic 1K Gen1 EV.
Cloned it to Lab401 Mifare Classic 1K.

But only with non corrupted save file (#400).

@Foxushka Foxushka marked this pull request as ready for review December 23, 2023 18:00
@Foxushka Foxushka linked an issue Dec 23, 2023 that may be closed by this pull request
3 tasks
@GameTec-live
Copy link
Owner

image Running autodetect on a T55 for example throws a invalid data length... Other than that, everything seems to work fine?

Copy link
Owner

@GameTec-live GameTec-live left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works

@GameTec-live GameTec-live merged commit ef445f5 into main Dec 24, 2023
14 checks passed
@GameTec-live GameTec-live deleted the write-card branch December 24, 2023 07:47
@unknown10777
Copy link

On iPhone SE(2020) writing card cannot display normally, some are out of screen.

@GameTec-live
Copy link
Owner

On iPhone SE(2020) writing card cannot display normally, some are out of screen.

aw, right, sht... That entire thing needs to be a scrollview... ok, next hotfix or pr ig... @Foxushka

@unknown10777
Copy link

It's really perfect though, thanks for update!

@unknown10777
Copy link

image
And tried to write card have unknown keys, got keys using nested, and the button is blank. Is it expected? @Foxushka

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
translation changes When something in the translation changes
Projects
Archived in project
4 participants