Files
iceman1001andClaude Opus 5.5 0fdbdbdadd HID SAM: read MIFARE Classic SE through CMD_HF_SAM_MFC
sam_mfc.c was empty and CMD_HF_SAM_MFC was a no-op. Implement the relay
the way Seader's plugin_hf_mfc_transmit does it. The SAM runs Crypto1
itself and tags each nfcSend with a format:

- 00 C0 00: plain bytes, CRC already included, parity generated
- 00 00 40 / 24 / 44: air order bit stream carrying the SAM's own parity

Answers to the latter go back in the same bit form, len + len / 8 + 1
bytes like Seader. Unlike Seader, every byte gets its real parity bit;
Seader leaves bytes 8 and on at zero. A silent card is reported to the
SAM as rfStatus 00 20, an unknown format as 00 04, Seader's codes, and
the conversation continues.

Card detected follows Seader for MIFARE Classic: protocol, CSN and SAK,
no ATQA. The card is selected without RATS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 10:23:39 +07:00

26 lines
941 B
C

//-----------------------------------------------------------------------------
// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// See LICENSE.txt for the text of the license.
//-----------------------------------------------------------------------------
#ifndef __SAM_MFC_H
#define __SAM_MFC_H
#include "common.h"
#include "sam_common.h"
#include "pm3_cmd.h"
int sam_mfc_get_pacs(PacketCommandNG *c);
#endif