Documentation ¶
Index ¶
- Constants
- Variables
- func BuildMessage(text string) ([]byte, error)
- func CalculateNdefHeader(ndefRecord []byte) ([]byte, error)
- func GetCardType(target nfc.Target) string
- func GetCardUID(target nfc.Target) string
- func ParseRecordText(blocks []byte) (string, error)
- func WriteMifare(pnd nfc.Device, text string, cardUid string) ([]byte, error)
- func WriteNtag(pnd nfc.Device, text string) ([]byte, error)
- type TagData
Constants ¶
View Source
const ( MIFARE_WRITABLE_SECTOR_COUNT = 15 MIFARE_WRITABLE_BLOCKS_PER_SECTOR = 3 MIFARE_BLOCK_SIZE_BYTES = 16 )
View Source
const ( NTAG_213_CAPACITY_BYTES = 114 NTAG_213_IDENTIFIER = 0x12 NTAG_215_CAPACITY_BYTES = 496 NTAG_215_IDENTIFIER = 0x3E NTAG_216_CAPACITY_BYTES = 872 NTAG_216_IDENTIFIER = 0x6D )
View Source
const ( TypeNTAG = "NTAG" TypeMifare = "MIFARE" TypeAmiibo = "Amiibo" TypeLegoDimensions = "LegoDimensions" WRITE_COMMAND = byte(0xA2) READ_COMMAND = byte(0x30) )
Variables ¶
View Source
var AMIIBO_MATCHER = []byte{
0x48, 0x0F, 0xE0,
0xF1, 0x10, 0xFF, 0xEE}
Can be identified by matching address 0x09-0x0F
View Source
var LEGO_DIMENSIONS_MATCHER = []byte{
0x01, 0x03, 0xA0, 0x0C,
0x34, 0x03, 0x13, 0xD1,
0x01, 0x0F, 0x54, 0x02,
0x65, 0x6E}
Can be identified by matching blocks 0x03-0x07 https://github.com/RfidResearchGroup/proxmark3/blob/master/client/src/cmdhfmfu.c
View Source
var NDEF_END = []byte{0xFE}
View Source
var NDEF_START = []byte{0x54, 0x02, 0x65, 0x6E}
View Source
var SupportedCardTypes = []nfc.Modulation{
{Type: nfc.ISO14443a, BaudRate: nfc.Nbr106},
}
Functions ¶
func BuildMessage ¶
func CalculateNdefHeader ¶
func GetCardType ¶
func GetCardType(target nfc.Target) string
func GetCardUID ¶
func GetCardUID(target nfc.Target) string
func ParseRecordText ¶
func WriteMifare ¶
WriteMifare writes the given text string to a Mifare card starting from sector, skipping any trailer blocks
Types ¶
Click to show internal directories.
Click to hide internal directories.