import { useState } from "react"; import { apiUrl } from "../api"; import { useToast } from "../toast"; export default function Brute() { const toast = useToast(); const [reader, setReader] = useState<"classic1k" | "classic4k">("classic1k"); const [variations, setVariations] = useState(true); const [extraKeys, setExtraKeys] = useState( "FFFFFFFFFFFF\nA0A1A2A3A4A5\nD3F7D3F7D3F7", ); const [busy, setBusy] = useState(false); const [result, setResult] = useState(""); const run = async () => { setBusy(true); setResult(""); try { const keysHex = extraKeys .split(/\r?\n/) .map((l) => l.replace(/\s/g, "").toUpperCase()) .filter((l) => l.length === 12); const body = { readerType: reader, variations, keysHex, }; const r = await fetch(apiUrl("/api/mifare/dictionary-attack"), { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(body), }); const text = await r.text(); if (!r.ok) { throw new Error(text); } try { const j = JSON.parse(text) as object; setResult(JSON.stringify(j, null, 2)); } catch { setResult(text); } toast("Dictionary pass finished"); } catch (e) { toast(String(e), "err"); } finally { setBusy(false); } }; return (

Dictionary attack

Select card family, optionally enable bounded variations (XOR / low-nibble tweaks per key). Firmware tries a built-in community list (Proxmark3 / MCT-style defaults) plus your lines below. This is not a full 2⁴⁸ exhaustive search — only keys you and the community already know. Hold a MIFARE Classic on the coil.{" "} More keys online .