Browse Source

README

develop
Robin Thoni 7 years ago
parent
commit
cd0538328e
2 changed files with 66 additions and 46 deletions
  1. 0
    46
      CMakeModules/FindJsonCpp.cmake
  2. 66
    0
      README.md

+ 0
- 46
CMakeModules/FindJsonCpp.cmake View File

@@ -1,46 +0,0 @@
1
-# -*- cmake -*-
2
-# - Find JSONCpp
3
-# Find the JSONCpp includes and library
4
-# This module defines
5
-#  JSONCPP_INCLUDE_DIRS, where to find json.h, etc.
6
-#  JSONCPP_LIBRARIES, the libraries needed to use jsoncpp.
7
-#  JSONCPP_FOUND, If false, do not try to use jsoncpp.
8
-#  also defined, but not for general use are
9
-#  JSONCPP_LIBRARIES, where to find the jsoncpp library.
10
-
11
-FIND_PATH(JSONCPP_INCLUDE_DIRS json/json.h
12
-        /usr/include
13
-        /usr/local/include
14
-        ${CMAKE_SOURCE_DIR}/win32-deps/include
15
-        PATH_SUFFIXES jsoncpp/json jsoncpp
16
-        )
17
-
18
-
19
-FIND_LIBRARY(JSONCPP_LIBRARIES NAMES jsoncpp HINTS /usr/lib /usr/local/lib 	${CMAKE_SOURCE_DIR}/win32-deps/lib)
20
-
21
-IF (JSONCPP_LIBRARIES AND JSONCPP_INCLUDE_DIRS)
22
-    SET(JSONCPP_LIBRARIES ${JSONCPP_LIBRARIES})
23
-    SET(JSONCPP_FOUND "YES")
24
-ELSE (JSONCPP_LIBRARIES AND JSONCPP_INCLUDE_DIRS)
25
-    SET(JSONCPP_FOUND "NO")
26
-ENDIF (JSONCPP_LIBRARIES AND JSONCPP_INCLUDE_DIRS)
27
-
28
-
29
-IF (JSONCPP_FOUND)
30
-    IF (NOT JSONCPP_FIND_QUIETLY)
31
-        MESSAGE(STATUS "Found JSONCpp: ${JSONCPP_LIBRARIES}")
32
-    ENDIF (NOT JSONCPP_FIND_QUIETLY)
33
-ELSE (JSONCPP_FOUND)
34
-    IF (JSONCPP_FIND_REQUIRED)
35
-        MESSAGE(FATAL_ERROR "Could not find JSONCPP library include: ${JSONCPP_INCLUDE_DIRS}, lib: ${JSONCPP_LIBRARIES}")
36
-    ENDIF (JSONCPP_FIND_REQUIRED)
37
-ENDIF (JSONCPP_FOUND)
38
-
39
-# Deprecated declarations.
40
-SET (NATIVE_JSONCPP_INCLUDE_PATH ${JSONCPP_INCLUDE_DIRS} )
41
-GET_FILENAME_COMPONENT (NATIVE_JSONCPP_LIB_PATH ${JSONCPP_LIBRARIES} PATH)
42
-
43
-MARK_AS_ADVANCED(
44
-        JSONCPP_LIBRARIES
45
-        JSONCPP_INCLUDE_DIRS
46
-)

+ 66
- 0
README.md View File

@@ -0,0 +1,66 @@
1
+Mifare-Tools
2
+============
3
+
4
+Library and command line tools for Mifare classic 1K NFC tags.
5
+It can:
6
+- List NFC devices
7
+- List NFC tags
8
+- Read a Mifare Classic 1K tag
9
+- Write a Mifare Classic 1K tag
10
+
11
+Usage
12
+=====
13
+
14
+List devices:
15
+```shell
16
+mifare-tools-cli --devices
17
+```
18
+
19
+List tags:
20
+```shell
21
+mifare-tools-cli --tags
22
+```
23
+
24
+Read a tag with some command line keys:
25
+```shell
26
+mifare-tools-cli --read --key ffffffffffff --key a1a2a3a4a5a6
27
+```
28
+
29
+Read a tag with a key file and save dump to a file:
30
+```shell
31
+mifare-tools-cli --read --key-file ~/my_key_file --output ~/my_dump
32
+```
33
+
34
+Write a tag with a command line key, from stdin:
35
+```shell
36
+cat ~/my_dump | mifare-tools-cli --write --key-file ffffffffffff
37
+```
38
+
39
+Write a tag with a command line key, from a file:
40
+```shell
41
+mifare-tools-cli --write --key-file ffffffffffff --input ~/my_dump
42
+```
43
+
44
+Write a tag with a key file, from a file, on a specified device, on a specified tag:
45
+```shell
46
+mifare-tools-cli --write --key-file ffffffffffff --input ~/my_dump --device pn53x_usb:003:008 --tag a1a2a3
47
+```
48
+
49
+Build and Install
50
+=================
51
+Requirements
52
+------------
53
+Libnfc          https://github.com/nfc-tools/libnfc
54
+Libfreefare     https://github.com/nfc-tools/libfreefare
55
+
56
+Build and Install
57
+-----------------
58
+```shell
59
+git clone https://git.rthoni.com/robin.thoni/mifare-tools
60
+cd mifare-tools
61
+mkdir build
62
+cd build
63
+cmake ..
64
+make
65
+sudo make install
66
+```

Loading…
Cancel
Save