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

Moscow social card parser #3464

Draft
wants to merge 50 commits into
base: dev
Choose a base branch
from
Draft

Conversation

assasinfil
Copy link
Contributor

@assasinfil assasinfil commented Feb 19, 2024

What's new

  • Parser based on Troyka layouts with additional data from soc card.

Verification

  • Try to read Moscow social card and validate result with "Транспортные карты Москвы"

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

config->data_sector = 15;
config->keys = social_moscow_1k_keys;
} else if(type == MfClassicType4k) {
config->data_sector = 15;
Copy link
Contributor

Choose a reason for hiding this comment

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

if I see it correctly, this will use key 0xa0a1a2a3a4a5, also for verification.
which then introduces the same false-positive problem that I just fixed in #3467 for the wash-city parser:
the 0xa0.. key is very commonly used and if any plugins verify func uses only that key, chances are high for false-positive , essentially breaking reading of alot cards

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I chose block 15 for verification as it contains the basic data of the social card, I agree that both keys A and B need to be checked at once.

Copy link
Contributor

Choose a reason for hiding this comment

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

yes. I would suggest using two non-common keys for verification if its the right card. doesnt have to be the actual data-section, just unique enough to identify the proper card.

(if possible, add sanity-checks in the parse function = make sure it returns false if the parsed data doesnt make sense)

great work besides that remark 👍 :)

@skotopes skotopes closed this Apr 19, 2024
@skotopes skotopes reopened this Apr 19, 2024
@hedger hedger added the NFC NFC-related label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NFC NFC-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants