IC Card Clone Recording

1. Driver

root@debian:~/nfcwork/driver# wget http://www.wch.cn/download/CH341SER_LINUX_ZIP.html -O CH341SER_LINUX.ZIP 
--2020-04-01 01:52:28--  http://www.wch.cn/download/CH341SER_LINUX_ZIP.html
正在解析主机 www.wch.cn (www.wch.cn)... 58.213.45.186
正在连接 www.wch.cn (www.wch.cn)|58.213.45.186|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:45534 (44K) [text/html]
正在保存至: “CH341SER_LINUX.ZIP”

CH341SER_LINUX.ZIP  100%[===================>]  44.47K   199KB/s    in 0.2s    

2020-04-01 01:52:28 (199 KB/s) - 已保存 “CH341SER_LINUX.ZIP” [45534/45534])

root@debian:~/nfcwork/driver# unzip CH341SER_LINUX.ZIP 
Archive:  CH341SER_LINUX.ZIP
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of CH341SER_LINUX.ZIP or
        CH341SER_LINUX.ZIP.zip, and cannot find CH341SER_LINUX.ZIP.ZIP, period.
root@debian:~/nfcwork/driver# cd CH341SER_LINUX
root@debian:~/nfcwork/driver/CH341SER_LINUX# make
make -C /lib/modules/4.9.0-9-amd64/build  M=/root/nfcwork/driver/CH341SER_LINUX  
make[1]: Entering directory '/usr/src/linux-headers-4.9.0-9-amd64'
  Building modules, stage 2.
  MODPOST 1 modules
make[1]: Leaving directory '/usr/src/linux-headers-4.9.0-9-amd64'
root@debian:~/nfcwork/driver/CH341SER_LINUX# make load
modprobe usbserial
insmod ch34x.ko

2. libnfc

root@debian:~/nfcwork# git clone https://github.com/nfc-tools/libnfc.git
正克隆到 'libnfc'...
remote: Enumerating objects: 14167, done.
remote: Total 14167 (delta 0), reused 0 (delta 0), pack-reused 14167
接收对象中: 100% (14167/14167), 2.31 MiB | 1.35 MiB/s, 完成.
处理 delta 中: 100% (11137/11137), 完成.
root@debian:~/nfcwork# cd libnfc/
root@debian:~/nfcwork/libnfc# mv ~/pn532_uart.patch ./
root@debian:~/nfcwork/libnfc# patch -p0 < pn532_uart.patch 
patching file libnfc/drivers/pn532_uart.c
root@debian:~/nfcwork/libnfc# autoreconf -vis
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize
libtoolize: putting auxiliary files in '.'.
libtoolize: linking file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: linking file 'm4/libtool.m4'
libtoolize: linking file 'm4/ltoptions.m4'
libtoolize: linking file 'm4/ltsugar.m4'
libtoolize: linking file 'm4/ltversion.m4'
libtoolize: linking file 'm4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf
autoreconf: running: /usr/bin/autoheader
autoreconf: running: automake --add-missing --no-force
configure.ac:17: installing './ar-lib'
configure.ac:17: installing './compile'
configure.ac:27: installing './config.guess'
configure.ac:27: installing './config.sub'
configure.ac:16: installing './install-sh'
configure.ac:16: installing './missing'
examples/Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
autoreconf: Leaving directory `.'
root@debian:~/nfcwork/libnfc# ./configure --with-drivers=pn532_uart,pn53x_usb
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking whether make supports nested variables... (cached) yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking whether make sets $(MAKE)... (cached) yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
Fixing libtool for -rpath problems.
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for ANSI C header files... (cached) yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for stdlib.h... (cached) yes
checking for stdint.h... (cached) yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdbool.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking linux/spi/spidev.h usability... yes
checking linux/spi/spidev.h presence... yes
checking for linux/spi/spidev.h... yes
checking linux/i2c-dev.h usability... yes
checking linux/i2c-dev.h presence... yes
checking for linux/i2c-dev.h... yes
checking for memmove... yes
checking for memset... yes
checking for select... yes
checking for strdup... yes
checking for strerror... yes
checking for strstr... yes
checking for strtol... yes
checking for usleep... yes
checking for size_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for off_t... yes
checking for log flag... yes
checking for conffiles flag... yes
checking for envvars flag... yes
checking for debug flag... no
checking which drivers to build... pn532_uart pn53x_usb
checking for documentation request... no
checking for libusb... yes
checking for readline.h... not found
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Doxyfile
config.status: creating Makefile
config.status: creating cmake/Makefile
config.status: creating cmake/modules/Makefile
config.status: creating contrib/Makefile
config.status: creating contrib/devd/Makefile
config.status: creating contrib/libnfc/Makefile
config.status: creating contrib/linux/Makefile
config.status: creating contrib/udev/Makefile
config.status: creating contrib/win32/Makefile
config.status: creating contrib/win32/sys/Makefile
config.status: creating contrib/win32/libnfc/Makefile
config.status: creating contrib/win32/libnfc/buses/Makefile
config.status: creating examples/Makefile
config.status: creating examples/pn53x-tamashell-scripts/Makefile
config.status: creating include/Makefile
config.status: creating include/nfc/Makefile
config.status: creating libnfc.pc
config.status: creating libnfc/Makefile
config.status: creating libnfc/buses/Makefile
config.status: creating libnfc/chips/Makefile
config.status: creating libnfc/drivers/Makefile
config.status: creating test/Makefile
config.status: creating utils/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands

Selected drivers:
   acr122_pcsc...... no
   acr122_usb....... no
   acr122s.......... no
   arygon........... no
   pn53x_usb........ yes
   pn532_uart....... yes
   pn532_spi.......  no
   pn532_i2c........ no
root@debian:~/nfcwork/libnfc# make clean all
Making clean in libnfc
make[1]: Entering directory '/root/nfcwork/libnfc/libnfc'
Making clean in chips
make[2]: Entering directory '/root/nfcwork/libnfc/libnfc/chips'
rm -rf .libs _libs
test -z "libnfcchips.la" || rm -f libnfcchips.la
rm -f ./so_locations
rm -f *.o
rm -f *.lo
make[2]: Leaving directory '/root/nfcwork/libnfc/libnfc/chips'
Making clean in buses
make[2]: Entering directory '/root/nfcwork/libnfc/libnfc/buses'
rm -rf .libs _libs
test -z "libnfcbuses.la" || rm -f libnfcbuses.la
rm -f ./so_locations
rm -f *.o
rm -f *.lo
make[2]: Leaving directory '/root/nfcwork/libnfc/libnfc/buses'
Making clean in drivers
make[2]: Entering directory '/root/nfcwork/libnfc/libnfc/drivers'
rm -rf .libs _libs
test -z "libnfcdrivers.la" || rm -f libnfcdrivers.la
rm -f ./so_locations
rm -f *.o
rm -f *.lo
make[2]: Leaving directory '/root/nfcwork/libnfc/libnfc/drivers'
Making clean in .
make[2]: Entering directory '/root/nfcwork/libnfc/libnfc'
test -z "libnfc.la" || rm -f libnfc.la
rm -f ./so_locations
rm -rf .libs _libs
rm -f *.o
rm -f *.lo
make[2]: Leaving directory '/root/nfcwork/libnfc/libnfc'
make[1]: Leaving directory '/root/nfcwork/libnfc/libnfc'
Making clean in utils
make[1]: Entering directory '/root/nfcwork/libnfc/utils'
 rm -f nfc-barcode nfc-emulate-forum-tag4 nfc-jewel nfc-list nfc-mfclassic nfc-mfultralight nfc-read-forum-tag3 nfc-relay-picc nfc-scan-device
rm -rf .libs _libs
test -z "libnfcutils.la" || rm -f libnfcutils.la
rm -f ./so_locations
rm -f *.o
rm -f *.lo
make[1]: Leaving directory '/root/nfcwork/libnfc/utils'
Making clean in examples
make[1]: Entering directory '/root/nfcwork/libnfc/examples'
Making clean in pn53x-tamashell-scripts
make[2]: Entering directory '/root/nfcwork/libnfc/examples/pn53x-tamashell-scripts'
rm -rf .libs _libs
rm -f *.lo
make[2]: Leaving directory '/root/nfcwork/libnfc/examples/pn53x-tamashell-scripts'
make[2]: Entering directory '/root/nfcwork/libnfc/examples'
 rm -f nfc-anticol nfc-dep-initiator nfc-dep-target nfc-emulate-forum-tag2 nfc-emulate-tag nfc-emulate-uid nfc-mfsetuid nfc-poll nfc-relay pn53x-diagnose pn53x-sam pn53x-tamashell
 rm -f quick_start_example1 quick_start_example2
rm -rf .libs _libs
rm -f *.o
rm -f doc/*.o
rm -f *.lo
make[2]: Leaving directory '/root/nfcwork/libnfc/examples'
make[1]: Leaving directory '/root/nfcwork/libnfc/examples'
Making clean in include
make[1]: Entering directory '/root/nfcwork/libnfc/include'
Making clean in nfc
make[2]: Entering directory '/root/nfcwork/libnfc/include/nfc'
rm -rf .libs _libs
rm -f *.lo
make[2]: Leaving directory '/root/nfcwork/libnfc/include/nfc'
make[2]: Entering directory '/root/nfcwork/libnfc/include'
rm -rf .libs _libs
rm -f *.lo
make[2]: Leaving directory '/root/nfcwork/libnfc/include'
make[1]: Leaving directory '/root/nfcwork/libnfc/include'
Making clean in contrib
make[1]: Entering directory '/root/nfcwork/libnfc/contrib'
Making clean in devd
make[2]: Entering directory '/root/nfcwork/libnfc/contrib/devd'
rm -rf .libs _libs
rm -f *.lo
make[2]: Leaving directory '/root/nfcwork/libnfc/contrib/devd'
Making clean in libnfc
make[2]: Entering directory '/root/nfcwork/libnfc/contrib/libnfc'
rm -rf .libs _libs
rm -f *.lo
make[2]: Leaving directory '/root/nfcwork/libnfc/contrib/libnfc'
Making clean in linux
make[2]: Entering directory '/root/nfcwork/libnfc/contrib/linux'
rm -rf .libs _libs
rm -f *.lo
make[2]: Leaving directory '/root/nfcwork/libnfc/contrib/linux'
Making clean in udev
make[2]: Entering directory '/root/nfcwork/libnfc/contrib/udev'
rm -rf .libs _libs
rm -f *.lo
make[2]: Leaving directory '/root/nfcwork/libnfc/contrib/udev'
Making clean in win32
make[2]: Entering directory '/root/nfcwork/libnfc/contrib/win32'
Making clean in libnfc
make[3]: Entering directory '/root/nfcwork/libnfc/contrib/win32/libnfc'
Making clean in buses
make[4]: Entering directory '/root/nfcwork/libnfc/contrib/win32/libnfc/buses'
rm -rf .libs _libs
rm -f *.lo
make[4]: Leaving directory '/root/nfcwork/libnfc/contrib/win32/libnfc/buses'
Making clean in .
make[4]: Entering directory '/root/nfcwork/libnfc/contrib/win32/libnfc'
rm -rf .libs _libs
rm -f *.lo
make[4]: Leaving directory '/root/nfcwork/libnfc/contrib/win32/libnfc'
make[3]: Leaving directory '/root/nfcwork/libnfc/contrib/win32/libnfc'
Making clean in sys
make[3]: Entering directory '/root/nfcwork/libnfc/contrib/win32/sys'
rm -rf .libs _libs
rm -f *.lo
make[3]: Leaving directory '/root/nfcwork/libnfc/contrib/win32/sys'
Making clean in .
make[3]: Entering directory '/root/nfcwork/libnfc/contrib/win32'
rm -rf .libs _libs
rm -f *.lo
make[3]: Leaving directory '/root/nfcwork/libnfc/contrib/win32'
make[2]: Leaving directory '/root/nfcwork/libnfc/contrib/win32'
make[2]: Entering directory '/root/nfcwork/libnfc/contrib'
rm -rf .libs _libs
rm -f *.lo
make[2]: Leaving directory '/root/nfcwork/libnfc/contrib'
make[1]: Leaving directory '/root/nfcwork/libnfc/contrib'
Making clean in cmake
make[1]: Entering directory '/root/nfcwork/libnfc/cmake'
Making clean in modules
make[2]: Entering directory '/root/nfcwork/libnfc/cmake/modules'
rm -rf .libs _libs
rm -f *.lo
make[2]: Leaving directory '/root/nfcwork/libnfc/cmake/modules'
make[2]: Entering directory '/root/nfcwork/libnfc/cmake'
rm -rf .libs _libs
rm -f *.lo
make[2]: Leaving directory '/root/nfcwork/libnfc/cmake'
make[1]: Leaving directory '/root/nfcwork/libnfc/cmake'
Making clean in test
make[1]: Entering directory '/root/nfcwork/libnfc/test'
test -z "" || rm -f 
test -z "" || rm -f 
rm -rf .libs _libs
test -z "" || rm -f 
rm -f *.o
test -z "" || rm -f 
test -z "" || rm -f 
test -z "test-suite.log" || rm -f test-suite.log
rm -f *.lo
make[1]: Leaving directory '/root/nfcwork/libnfc/test'
make[1]: Entering directory '/root/nfcwork/libnfc'
test -z "Doxygen.log coverage.info libnfc.pc" || rm -f Doxygen.log coverage.info libnfc.pc
rm -rf .libs _libs
rm -rf doc
rm -rf coverage
rm -f *.lo
make[1]: Leaving directory '/root/nfcwork/libnfc'
make  all-recursive
make[1]: Entering directory '/root/nfcwork/libnfc'
Making all in libnfc
make[2]: Entering directory '/root/nfcwork/libnfc/libnfc'
Making all in chips
make[3]: Entering directory '/root/nfcwork/libnfc/libnfc/chips'
  CC       libnfcchips_la-pn53x.lo
  CCLD     libnfcchips.la
ar: `u' modifier ignored since `D' is the default (see `U')
make[3]: Leaving directory '/root/nfcwork/libnfc/libnfc/chips'
Making all in buses
make[3]: Entering directory '/root/nfcwork/libnfc/libnfc/buses'
  CC       libnfcbuses_la-empty.lo
  CC       libnfcbuses_la-uart.lo
  CC       libnfcbuses_la-usbbus.lo
  CCLD     libnfcbuses.la
ar: `u' modifier ignored since `D' is the default (see `U')
make[3]: Leaving directory '/root/nfcwork/libnfc/libnfc/buses'
Making all in drivers
make[3]: Entering directory '/root/nfcwork/libnfc/libnfc/drivers'
  CC       libnfcdrivers_la-pn53x_usb.lo
  CC       libnfcdrivers_la-pn532_uart.lo
  CCLD     libnfcdrivers.la
ar: `u' modifier ignored since `D' is the default (see `U')
make[3]: Leaving directory '/root/nfcwork/libnfc/libnfc/drivers'
Making all in .
make[3]: Entering directory '/root/nfcwork/libnfc/libnfc'
  CC       libnfc_la-conf.lo
  CC       libnfc_la-iso14443-subr.lo
  CC       libnfc_la-mirror-subr.lo
  CC       libnfc_la-nfc.lo
  CC       libnfc_la-nfc-device.lo
  CC       libnfc_la-nfc-emulation.lo
  CC       libnfc_la-nfc-internal.lo
  CC       libnfc_la-target-subr.lo
  CC       libnfc_la-log.lo
  CC       libnfc_la-log-internal.lo
  CCLD     libnfc.la
ar: `u' modifier ignored since `D' is the default (see `U')
make[3]: Leaving directory '/root/nfcwork/libnfc/libnfc'
make[2]: Leaving directory '/root/nfcwork/libnfc/libnfc'
Making all in utils
make[2]: Entering directory '/root/nfcwork/libnfc/utils'
  CC       nfc-utils.lo
  CCLD     libnfcutils.la
ar: `u' modifier ignored since `D' is the default (see `U')
  CC       nfc-barcode.o
  CCLD     nfc-barcode
  CC       nfc-emulate-forum-tag4.o
  CCLD     nfc-emulate-forum-tag4
  CC       nfc-jewel.o
  CC       jewel.o
  CCLD     nfc-jewel
  CC       nfc-list.o
  CCLD     nfc-list
  CC       nfc-mfclassic.o
nfc-mfclassic.c:76:13: warning: ‘bForceSizeMismatch’ defined but not used [-Wunused-variable]
 static bool bForceSizeMismatch;
             ^~~~~~~~~~~~~~~~~~
  CC       mifare.o
  CCLD     nfc-mfclassic
  CC       nfc-mfultralight.o
  CCLD     nfc-mfultralight
  CC       nfc-read-forum-tag3.o
  CCLD     nfc-read-forum-tag3
  CC       nfc-relay-picc.o
  CCLD     nfc-relay-picc
  CC       nfc-scan-device.o
  CCLD     nfc-scan-device
make[2]: Leaving directory '/root/nfcwork/libnfc/utils'
Making all in examples
make[2]: Entering directory '/root/nfcwork/libnfc/examples'
Making all in pn53x-tamashell-scripts
make[3]: Entering directory '/root/nfcwork/libnfc/examples/pn53x-tamashell-scripts'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/nfcwork/libnfc/examples/pn53x-tamashell-scripts'
make[3]: Entering directory '/root/nfcwork/libnfc/examples'
  CC       nfc-anticol.o
  CCLD     nfc-anticol
  CC       nfc-dep-initiator.o
  CCLD     nfc-dep-initiator
  CC       nfc-dep-target.o
  CCLD     nfc-dep-target
  CC       nfc-emulate-forum-tag2.o
  CCLD     nfc-emulate-forum-tag2
  CC       nfc-emulate-tag.o
  CCLD     nfc-emulate-tag
  CC       nfc-emulate-uid.o
  CCLD     nfc-emulate-uid
  CC       nfc-mfsetuid.o
  CCLD     nfc-mfsetuid
  CC       nfc-poll.o
  CCLD     nfc-poll
  CC       nfc-relay.o
  CCLD     nfc-relay
  CC       pn53x-diagnose.o
  CCLD     pn53x-diagnose
  CC       pn53x-sam.o
  CCLD     pn53x-sam
  CC       pn53x_tamashell-pn53x-tamashell.o
  CCLD     pn53x-tamashell
make[3]: Leaving directory '/root/nfcwork/libnfc/examples'
make[2]: Leaving directory '/root/nfcwork/libnfc/examples'
Making all in include
make[2]: Entering directory '/root/nfcwork/libnfc/include'
Making all in nfc
make[3]: Entering directory '/root/nfcwork/libnfc/include/nfc'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/nfcwork/libnfc/include/nfc'
make[3]: Entering directory '/root/nfcwork/libnfc/include'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/root/nfcwork/libnfc/include'
make[2]: Leaving directory '/root/nfcwork/libnfc/include'
Making all in contrib
make[2]: Entering directory '/root/nfcwork/libnfc/contrib'
Making all in devd
make[3]: Entering directory '/root/nfcwork/libnfc/contrib/devd'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/nfcwork/libnfc/contrib/devd'
Making all in libnfc
make[3]: Entering directory '/root/nfcwork/libnfc/contrib/libnfc'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/nfcwork/libnfc/contrib/libnfc'
Making all in linux
make[3]: Entering directory '/root/nfcwork/libnfc/contrib/linux'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/nfcwork/libnfc/contrib/linux'
Making all in udev
make[3]: Entering directory '/root/nfcwork/libnfc/contrib/udev'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/nfcwork/libnfc/contrib/udev'
Making all in win32
make[3]: Entering directory '/root/nfcwork/libnfc/contrib/win32'
Making all in libnfc
make[4]: Entering directory '/root/nfcwork/libnfc/contrib/win32/libnfc'
Making all in buses
make[5]: Entering directory '/root/nfcwork/libnfc/contrib/win32/libnfc/buses'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/root/nfcwork/libnfc/contrib/win32/libnfc/buses'
Making all in .
make[5]: Entering directory '/root/nfcwork/libnfc/contrib/win32/libnfc'
make[5]: Nothing to be done for 'all-am'.
make[5]: Leaving directory '/root/nfcwork/libnfc/contrib/win32/libnfc'
make[4]: Leaving directory '/root/nfcwork/libnfc/contrib/win32/libnfc'
Making all in sys
make[4]: Entering directory '/root/nfcwork/libnfc/contrib/win32/sys'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/root/nfcwork/libnfc/contrib/win32/sys'
Making all in .
make[4]: Entering directory '/root/nfcwork/libnfc/contrib/win32'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/root/nfcwork/libnfc/contrib/win32'
make[3]: Leaving directory '/root/nfcwork/libnfc/contrib/win32'
make[3]: Entering directory '/root/nfcwork/libnfc/contrib'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/root/nfcwork/libnfc/contrib'
make[2]: Leaving directory '/root/nfcwork/libnfc/contrib'
Making all in cmake
make[2]: Entering directory '/root/nfcwork/libnfc/cmake'
Making all in modules
make[3]: Entering directory '/root/nfcwork/libnfc/cmake/modules'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/nfcwork/libnfc/cmake/modules'
make[3]: Entering directory '/root/nfcwork/libnfc/cmake'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/root/nfcwork/libnfc/cmake'
make[2]: Leaving directory '/root/nfcwork/libnfc/cmake'
Making all in test
make[2]: Entering directory '/root/nfcwork/libnfc/test'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/root/nfcwork/libnfc/test'
make[2]: Entering directory '/root/nfcwork/libnfc'
cd . && /bin/bash ./config.status libnfc.pc
config.status: creating libnfc.pc
make[2]: Leaving directory '/root/nfcwork/libnfc'
make[1]: Leaving directory '/root/nfcwork/libnfc'
root@debian:~/nfcwork/libnfc# make install
Making install in libnfc
make[1]: Entering directory '/root/nfcwork/libnfc/libnfc'
Making install in chips
make[2]: Entering directory '/root/nfcwork/libnfc/libnfc/chips'
make[3]: Entering directory '/root/nfcwork/libnfc/libnfc/chips'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/nfcwork/libnfc/libnfc/chips'
make[2]: Leaving directory '/root/nfcwork/libnfc/libnfc/chips'
Making install in buses
make[2]: Entering directory '/root/nfcwork/libnfc/libnfc/buses'
make[3]: Entering directory '/root/nfcwork/libnfc/libnfc/buses'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/nfcwork/libnfc/libnfc/buses'
make[2]: Leaving directory '/root/nfcwork/libnfc/libnfc/buses'
Making install in drivers
make[2]: Entering directory '/root/nfcwork/libnfc/libnfc/drivers'
make[3]: Entering directory '/root/nfcwork/libnfc/libnfc/drivers'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/nfcwork/libnfc/libnfc/drivers'
make[2]: Leaving directory '/root/nfcwork/libnfc/libnfc/drivers'
Making install in .
make[2]: Entering directory '/root/nfcwork/libnfc/libnfc'
make[3]: Entering directory '/root/nfcwork/libnfc/libnfc'
 /bin/mkdir -p '/usr/local/lib'
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libnfc.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libnfc.so.5.0.1 /usr/local/lib/libnfc.so.5.0.1
libtool: install: (cd /usr/local/lib && { ln -s -f libnfc.so.5.0.1 libnfc.so.5 || { rm -f libnfc.so.5 && ln -s libnfc.so.5.0.1 libnfc.so.5; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libnfc.so.5.0.1 libnfc.so || { rm -f libnfc.so && ln -s libnfc.so.5.0.1 libnfc.so; }; })
libtool: install: /usr/bin/install -c .libs/libnfc.lai /usr/local/lib/libnfc.la
libtool: install: /usr/bin/install -c .libs/libnfc.a /usr/local/lib/libnfc.a
libtool: install: chmod 644 /usr/local/lib/libnfc.a
libtool: install: ranlib /usr/local/lib/libnfc.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/nfcwork/libnfc/libnfc'
make[2]: Leaving directory '/root/nfcwork/libnfc/libnfc'
make[1]: Leaving directory '/root/nfcwork/libnfc/libnfc'
Making install in utils
make[1]: Entering directory '/root/nfcwork/libnfc/utils'
make[2]: Entering directory '/root/nfcwork/libnfc/utils'
 /bin/mkdir -p '/usr/local/bin'
  /bin/bash ../libtool   --mode=install /usr/bin/install -c nfc-barcode nfc-emulate-forum-tag4 nfc-jewel nfc-list nfc-mfclassic nfc-mfultralight nfc-read-forum-tag3 nfc-relay-picc nfc-scan-device '/usr/local/bin'
libtool: install: /usr/bin/install -c .libs/nfc-barcode /usr/local/bin/nfc-barcode
libtool: install: /usr/bin/install -c .libs/nfc-emulate-forum-tag4 /usr/local/bin/nfc-emulate-forum-tag4
libtool: install: /usr/bin/install -c .libs/nfc-jewel /usr/local/bin/nfc-jewel
libtool: install: /usr/bin/install -c .libs/nfc-list /usr/local/bin/nfc-list
libtool: install: /usr/bin/install -c .libs/nfc-mfclassic /usr/local/bin/nfc-mfclassic
libtool: install: /usr/bin/install -c .libs/nfc-mfultralight /usr/local/bin/nfc-mfultralight
libtool: install: /usr/bin/install -c .libs/nfc-read-forum-tag3 /usr/local/bin/nfc-read-forum-tag3
libtool: install: /usr/bin/install -c .libs/nfc-relay-picc /usr/local/bin/nfc-relay-picc
libtool: install: /usr/bin/install -c .libs/nfc-scan-device /usr/local/bin/nfc-scan-device
 /bin/mkdir -p '/usr/local/share/man/man1'
 /usr/bin/install -c -m 644 nfc-barcode.1 nfc-emulate-forum-tag4.1 nfc-jewel.1 nfc-list.1 nfc-mfclassic.1 nfc-mfultralight.1 nfc-read-forum-tag3.1 nfc-relay-picc.1 nfc-scan-device.1 '/usr/local/share/man/man1'
make[2]: Leaving directory '/root/nfcwork/libnfc/utils'
make[1]: Leaving directory '/root/nfcwork/libnfc/utils'
Making install in examples
make[1]: Entering directory '/root/nfcwork/libnfc/examples'
Making install in pn53x-tamashell-scripts
make[2]: Entering directory '/root/nfcwork/libnfc/examples/pn53x-tamashell-scripts'
make[3]: Entering directory '/root/nfcwork/libnfc/examples/pn53x-tamashell-scripts'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/nfcwork/libnfc/examples/pn53x-tamashell-scripts'
make[2]: Leaving directory '/root/nfcwork/libnfc/examples/pn53x-tamashell-scripts'
make[2]: Entering directory '/root/nfcwork/libnfc/examples'
make[3]: Entering directory '/root/nfcwork/libnfc/examples'
 /bin/mkdir -p '/usr/local/bin'
  /bin/bash ../libtool   --mode=install /usr/bin/install -c nfc-anticol nfc-dep-initiator nfc-dep-target nfc-emulate-forum-tag2 nfc-emulate-tag nfc-emulate-uid nfc-mfsetuid nfc-poll nfc-relay pn53x-diagnose pn53x-sam pn53x-tamashell '/usr/local/bin'
libtool: install: /usr/bin/install -c .libs/nfc-anticol /usr/local/bin/nfc-anticol
libtool: install: /usr/bin/install -c .libs/nfc-dep-initiator /usr/local/bin/nfc-dep-initiator
libtool: install: /usr/bin/install -c .libs/nfc-dep-target /usr/local/bin/nfc-dep-target
libtool: install: /usr/bin/install -c .libs/nfc-emulate-forum-tag2 /usr/local/bin/nfc-emulate-forum-tag2
libtool: install: /usr/bin/install -c .libs/nfc-emulate-tag /usr/local/bin/nfc-emulate-tag
libtool: install: /usr/bin/install -c .libs/nfc-emulate-uid /usr/local/bin/nfc-emulate-uid
libtool: install: /usr/bin/install -c .libs/nfc-mfsetuid /usr/local/bin/nfc-mfsetuid
libtool: install: /usr/bin/install -c .libs/nfc-poll /usr/local/bin/nfc-poll
libtool: install: /usr/bin/install -c .libs/nfc-relay /usr/local/bin/nfc-relay
libtool: install: /usr/bin/install -c .libs/pn53x-diagnose /usr/local/bin/pn53x-diagnose
libtool: install: /usr/bin/install -c .libs/pn53x-sam /usr/local/bin/pn53x-sam
libtool: install: /usr/bin/install -c .libs/pn53x-tamashell /usr/local/bin/pn53x-tamashell
 /bin/mkdir -p '/usr/local/share/man/man1'
 /usr/bin/install -c -m 644 nfc-anticol.1 nfc-dep-initiator.1 nfc-dep-target.1 nfc-emulate-tag.1 nfc-emulate-uid.1 nfc-poll.1 nfc-relay.1 nfc-mfsetuid.1 pn53x-diagnose.1 pn53x-sam.1 pn53x-tamashell.1 nfc-emulate-forum-tag2.1 '/usr/local/share/man/man1'
make[3]: Leaving directory '/root/nfcwork/libnfc/examples'
make[2]: Leaving directory '/root/nfcwork/libnfc/examples'
make[1]: Leaving directory '/root/nfcwork/libnfc/examples'
Making install in include
make[1]: Entering directory '/root/nfcwork/libnfc/include'
Making install in nfc
make[2]: Entering directory '/root/nfcwork/libnfc/include/nfc'
make[3]: Entering directory '/root/nfcwork/libnfc/include/nfc'
make[3]: Nothing to be done for 'install-exec-am'.
 /bin/mkdir -p '/usr/local/include/nfc'
 /usr/bin/install -c -m 644 nfc.h nfc-emulation.h nfc-types.h '/usr/local/include/nfc'
make[3]: Leaving directory '/root/nfcwork/libnfc/include/nfc'
make[2]: Leaving directory '/root/nfcwork/libnfc/include/nfc'
make[2]: Entering directory '/root/nfcwork/libnfc/include'
make[3]: Entering directory '/root/nfcwork/libnfc/include'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/nfcwork/libnfc/include'
make[2]: Leaving directory '/root/nfcwork/libnfc/include'
make[1]: Leaving directory '/root/nfcwork/libnfc/include'
Making install in contrib
make[1]: Entering directory '/root/nfcwork/libnfc/contrib'
Making install in devd
make[2]: Entering directory '/root/nfcwork/libnfc/contrib/devd'
make[3]: Entering directory '/root/nfcwork/libnfc/contrib/devd'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/nfcwork/libnfc/contrib/devd'
make[2]: Leaving directory '/root/nfcwork/libnfc/contrib/devd'
Making install in libnfc
make[2]: Entering directory '/root/nfcwork/libnfc/contrib/libnfc'
make[3]: Entering directory '/root/nfcwork/libnfc/contrib/libnfc'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/nfcwork/libnfc/contrib/libnfc'
make[2]: Leaving directory '/root/nfcwork/libnfc/contrib/libnfc'
Making install in linux
make[2]: Entering directory '/root/nfcwork/libnfc/contrib/linux'
make[3]: Entering directory '/root/nfcwork/libnfc/contrib/linux'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/nfcwork/libnfc/contrib/linux'
make[2]: Leaving directory '/root/nfcwork/libnfc/contrib/linux'
Making install in udev
make[2]: Entering directory '/root/nfcwork/libnfc/contrib/udev'
make[3]: Entering directory '/root/nfcwork/libnfc/contrib/udev'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/nfcwork/libnfc/contrib/udev'
make[2]: Leaving directory '/root/nfcwork/libnfc/contrib/udev'
Making install in win32
make[2]: Entering directory '/root/nfcwork/libnfc/contrib/win32'
Making install in libnfc
make[3]: Entering directory '/root/nfcwork/libnfc/contrib/win32/libnfc'
Making install in buses
make[4]: Entering directory '/root/nfcwork/libnfc/contrib/win32/libnfc/buses'
make[5]: Entering directory '/root/nfcwork/libnfc/contrib/win32/libnfc/buses'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '/root/nfcwork/libnfc/contrib/win32/libnfc/buses'
make[4]: Leaving directory '/root/nfcwork/libnfc/contrib/win32/libnfc/buses'
Making install in .
make[4]: Entering directory '/root/nfcwork/libnfc/contrib/win32/libnfc'
make[5]: Entering directory '/root/nfcwork/libnfc/contrib/win32/libnfc'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '/root/nfcwork/libnfc/contrib/win32/libnfc'
make[4]: Leaving directory '/root/nfcwork/libnfc/contrib/win32/libnfc'
make[3]: Leaving directory '/root/nfcwork/libnfc/contrib/win32/libnfc'
Making install in sys
make[3]: Entering directory '/root/nfcwork/libnfc/contrib/win32/sys'
make[4]: Entering directory '/root/nfcwork/libnfc/contrib/win32/sys'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/root/nfcwork/libnfc/contrib/win32/sys'
make[3]: Leaving directory '/root/nfcwork/libnfc/contrib/win32/sys'
Making install in .
make[3]: Entering directory '/root/nfcwork/libnfc/contrib/win32'
make[4]: Entering directory '/root/nfcwork/libnfc/contrib/win32'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/root/nfcwork/libnfc/contrib/win32'
make[3]: Leaving directory '/root/nfcwork/libnfc/contrib/win32'
make[2]: Leaving directory '/root/nfcwork/libnfc/contrib/win32'
make[2]: Entering directory '/root/nfcwork/libnfc/contrib'
make[3]: Entering directory '/root/nfcwork/libnfc/contrib'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/nfcwork/libnfc/contrib'
make[2]: Leaving directory '/root/nfcwork/libnfc/contrib'
make[1]: Leaving directory '/root/nfcwork/libnfc/contrib'
Making install in cmake
make[1]: Entering directory '/root/nfcwork/libnfc/cmake'
Making install in modules
make[2]: Entering directory '/root/nfcwork/libnfc/cmake/modules'
make[3]: Entering directory '/root/nfcwork/libnfc/cmake/modules'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/nfcwork/libnfc/cmake/modules'
make[2]: Leaving directory '/root/nfcwork/libnfc/cmake/modules'
make[2]: Entering directory '/root/nfcwork/libnfc/cmake'
make[3]: Entering directory '/root/nfcwork/libnfc/cmake'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/nfcwork/libnfc/cmake'
make[2]: Leaving directory '/root/nfcwork/libnfc/cmake'
make[1]: Leaving directory '/root/nfcwork/libnfc/cmake'
Making install in test
make[1]: Entering directory '/root/nfcwork/libnfc/test'
make[2]: Entering directory '/root/nfcwork/libnfc/test'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/root/nfcwork/libnfc/test'
make[1]: Leaving directory '/root/nfcwork/libnfc/test'
make[1]: Entering directory '/root/nfcwork/libnfc'
make[2]: Entering directory '/root/nfcwork/libnfc'
make[2]: Nothing to be done for 'install-exec-am'.
 /bin/mkdir -p '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 libnfc.pc '/usr/local/lib/pkgconfig'
make[2]: Leaving directory '/root/nfcwork/libnfc'
make[1]: Leaving directory '/root/nfcwork/libnfc'
root@debian:~/nfcwork/libnfc# echo 'device.name = "microBuilder.eu"' >> /etc/nfc/libnfc.conf 
root@debian:~/nfcwork/libnfc# echo 'device.connstring = "pn532_uart:/dev/ttyUSB0"' >> /etc/nfc/libnfc.conf 
root@debian:~/nfcwork/libnfc# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 001 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 001 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
root@debian:~/nfcwork/libnfc# nfc-list
nfc-list uses libnfc 1.7.1
NFC device: pn532_uart:/dev/ttyUSB0 opened

3. mfcuk & mfoc

root@debian:~/nfcwork# git clone https://github.com/T1me/mfcuk
正克隆到 'mfcuk'...
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 389 (delta 0), reused 1 (delta 0), pack-reused 388
接收对象中: 100% (389/389), 190.03 KiB | 206.00 KiB/s, 完成.
处理 delta 中: 100% (261/261), 完成.
root@debian:~/nfcwork# cd mfcuk
root@debian:~/nfcwork/mfcuk# autoreconf -is
configure.ac:5: installing './compile'
configure.ac:3: installing './install-sh'
configure.ac:3: installing './missing'
src/Makefile.am: installing './depcomp'
root@debian:~/nfcwork/mfcuk# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether make supports nested variables... (cached) yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libnfc... yes
checking for inline... inline
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for size_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for memset... yes
checking for strchr... yes
checking for strtoul... yes
checking endian.h usability... yes
checking endian.h presence... yes
checking for endian.h... yes
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking CoreFoundation/CoreFoundation.h usability... no
checking CoreFoundation/CoreFoundation.h presence... no
checking for CoreFoundation/CoreFoundation.h... no
checking byteswap.h usability... yes
checking byteswap.h presence... yes
checking for byteswap.h... yes
checking for unistd.h... (cached) yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing depfiles commands
root@debian:~/nfcwork/mfcuk# make
make  all-recursive
make[1]: Entering directory '/root/nfcwork/mfcuk'
Making all in src
make[2]: Entering directory '/root/nfcwork/mfcuk/src'
  CC       crapto1.o
  CC       crypto1.o
  CC       mifare.o
  CC       nfc-utils.o
  CC       mfcuk_mifare.o
  CC       mfcuk_finger.o
  CC       mfcuk_utils.o
  CC       mfcuk.o
mfcuk.c: In function ‘main’:
mfcuk.c:1619:15: warning: comparison of constant ‘0’ with boolean expression is always false [-Wbool-compare]
         if (0 > nfc_initiator_mifare_cmd(pnd, k, block, &mp)) {
               ^
At top level:
mfcuk.c:245:17: warning: ‘mfcuk_verify_key_block’ defined but not used [-Wunused-function]
 static uint32_t mfcuk_verify_key_block(nfc_device *pnd, uint32_t uiUID, uint64_t ui64Key, mifare_key_type bKeyType, uint8_t bTagType, uint32_t uiBlock)
                 ^~~~~~~~~~~~~~~~~~~~~~
  CCLD     mfcuk
make[2]: Leaving directory '/root/nfcwork/mfcuk/src'
make[2]: Entering directory '/root/nfcwork/mfcuk'
make[2]: Leaving directory '/root/nfcwork/mfcuk'
make[1]: Leaving directory '/root/nfcwork/mfcuk'
root@debian:~/nfcwork/mfcuk# make install
Making install in src
make[1]: Entering directory '/root/nfcwork/mfcuk/src'
make[2]: Entering directory '/root/nfcwork/mfcuk/src'
 /bin/mkdir -p '/usr/local/bin'
  /usr/bin/install -c mfcuk '/usr/local/bin'
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/root/nfcwork/mfcuk/src'
make[1]: Leaving directory '/root/nfcwork/mfcuk/src'
make[1]: Entering directory '/root/nfcwork/mfcuk'
make[2]: Entering directory '/root/nfcwork/mfcuk'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/root/nfcwork/mfcuk'
make[1]: Leaving directory '/root/nfcwork/mfcuk'
root@debian:~/nfcwork# git clone https://github.com/nfc-tools/mfoc
正克隆到 'mfoc'...
remote: Enumerating objects: 526, done.
remote: Total 526 (delta 0), reused 0 (delta 0), pack-reused 526
接收对象中: 100% (526/526), 230.11 KiB | 252.00 KiB/s, 完成.
处理 delta 中: 100% (330/330), 完成.
root@debian:~/nfcwork# cd mfoc
root@debian:~/nfcwork/mfoc# autoreconf -is
configure.ac:11: installing './compile'
configure.ac:9: installing './install-sh'
configure.ac:9: installing './missing'
Makefile.am: installing './INSTALL'
src/Makefile.am: installing './depcomp'
root@debian:~/nfcwork/mfoc# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether make supports nested variables... (cached) yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libnfc... yes
checking for inline... inline
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for size_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for memset... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing depfiles commands
root@debian:~/nfcwork/mfoc# make
make  all-recursive
make[1]: Entering directory '/root/nfcwork/mfoc'
Making all in src
make[2]: Entering directory '/root/nfcwork/mfoc/src'
  CC       crapto1.o
  CC       crypto1.o
  CC       mfoc.o
  CC       mifare.o
  CC       nfc-utils.o
  CCLD     mfoc
make[2]: Leaving directory '/root/nfcwork/mfoc/src'
make[2]: Entering directory '/root/nfcwork/mfoc'
make[2]: Leaving directory '/root/nfcwork/mfoc'
make[1]: Leaving directory '/root/nfcwork/mfoc'
root@debian:~/nfcwork/mfoc# make install
Making install in src
make[1]: Entering directory '/root/nfcwork/mfoc/src'
make[2]: Entering directory '/root/nfcwork/mfoc/src'
 /bin/mkdir -p '/usr/local/bin'
  /usr/bin/install -c mfoc '/usr/local/bin'
 /bin/mkdir -p '/usr/local/share/man/man1'
 /usr/bin/install -c -m 644 mfoc.1 '/usr/local/share/man/man1'
make[2]: Leaving directory '/root/nfcwork/mfoc/src'
make[1]: Leaving directory '/root/nfcwork/mfoc/src'
make[1]: Entering directory '/root/nfcwork/mfoc'
make[2]: Entering directory '/root/nfcwork/mfoc'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/root/nfcwork/mfoc'
make[1]: Leaving directory '/root/nfcwork/mfoc'

4. crack & read

root@debian:~/nfcwork/profile/hua# mfcuk -C -R 0 -w 5
mfcuk - 0.3.8
Mifare Classic DarkSide Key Recovery Tool - 0.3
by Andrei Costin, [email protected], http://andreicostin.com

WARN: cannot open template file './data/tmpls_fingerprints/mfcuk_tmpl_skgt.mfd'
WARN: cannot open template file './data/tmpls_fingerprints/mfcuk_tmpl_ratb.mfd'
WARN: cannot open template file './data/tmpls_fingerprints/mfcuk_tmpl_oyster.mfd'
TRESHOLD: 5

INFO: Connected to NFC reader: pn532_uart:/dev/ttyUSB0


VERIFY: 
	Key A sectors: 0 1 2 3 4 5 6 7 8 9 a b c d e f
	Key B sectors: 0 1 2 3 4 5 6 7 8 9 a b c d e f

RECOVER:  0
INFO: block 3 recovered KEY: 8dd1444c2570
^C
root@debian:~/nfcwork/profile/hua# mfoc -k 8dd1444c2570 -O original_card.mfd 
The custom key 0x8dd1444c2570 has been added to the default keys
Found Mifare Classic 1k tag
ISO/IEC 14443A (106 kbps) target:
    ATQA (SENS_RES): 00  04  
* UID size: single
* bit frame anticollision supported
       UID (NFCID1): 9c  e9  f4  5c  
      SAK (SEL_RES): 08  
* Not compliant with ISO/IEC 14443-4
* Not compliant with ISO/IEC 18092

Fingerprinting based on MIFARE type Identification Procedure:
* MIFARE Classic 1K
* MIFARE Plus (4 Byte UID or 4 Byte RID) 2K, Security level 1
* SmartMX with MIFARE 1K emulation
Other possible matches based on ATQA & SAK values:

Try to authenticate to all sectors with default keys...
Symbols: '.' no key found, '/' A key found, '\' B key found, 'x' both keys found
[Key: 8dd1444c2570] -> [xxxxxxxxxxxxxxxx]
[Key: ffffffffffff] -> [xxxxxxxxxxxxxxxx]
[Key: a0a1a2a3a4a5] -> [xxxxxxxxxxxxxxxx]
[Key: d3f7d3f7d3f7] -> [xxxxxxxxxxxxxxxx]
[Key: 000000000000] -> [xxxxxxxxxxxxxxxx]
[Key: b0b1b2b3b4b5] -> [xxxxxxxxxxxxxxxx]
[Key: 4d3a99c351dd] -> [xxxxxxxxxxxxxxxx]
[Key: 1a982c7e459a] -> [xxxxxxxxxxxxxxxx]
[Key: aabbccddeeff] -> [xxxxxxxxxxxxxxxx]
[Key: 714c5c886e97] -> [xxxxxxxxxxxxxxxx]
[Key: 587ee5f9350f] -> [xxxxxxxxxxxxxxxx]
[Key: a0478cc39091] -> [xxxxxxxxxxxxxxxx]
[Key: 533cb6c723f6] -> [xxxxxxxxxxxxxxxx]
[Key: 8fd0a4f256e9] -> [xxxxxxxxxxxxxxxx]

Sector 00 - Found   Key A: 8dd1444c2570 Found   Key B: ced0cfc1bbbf
Sector 01 - Found   Key A: 8dd1444c2570 Found   Key B: ced0cfc1bbbf
Sector 02 - Found   Key A: 8dd1444c2570 Found   Key B: ced0cfc1bbbf
Sector 03 - Found   Key A: 8dd1444c2570 Found   Key B: ced0cfc1bbbf
Sector 04 - Found   Key A: 8dd1444c2570 Found   Key B: ced0cfc1bbbf
Sector 05 - Found   Key A: 8dd1444c2570 Found   Key B: ced0cfc1bbbf
Sector 06 - Found   Key A: 8dd1444c2570 Found   Key B: ced0cfc1bbbf
Sector 07 - Found   Key A: 8dd1444c2570 Found   Key B: ced0cfc1bbbf
Sector 08 - Found   Key A: 8dd1444c2570 Found   Key B: ced0cfc1bbbf
Sector 09 - Found   Key A: 8dd1444c2570 Found   Key B: ced0cfc1bbbf
Sector 10 - Found   Key A: 8dd1444c2570 Found   Key B: ced0cfc1bbbf
Sector 11 - Found   Key A: 8dd1444c2570 Found   Key B: ced0cfc1bbbf
Sector 12 - Found   Key A: 8dd1444c2570 Found   Key B: ced0cfc1bbbf
Sector 13 - Found   Key A: 8dd1444c2570 Found   Key B: ced0cfc1bbbf
Sector 14 - Found   Key A: 8dd1444c2570 Found   Key B: ced0cfc1bbbf
Sector 15 - Found   Key A: 8dd1444c2570 Found   Key B: ced0cfc1bbbf

We have all sectors encrypted with the default keys..

Auth with all sectors succeeded, dumping keys to a file!
Block 63, type A, key 8dd1444c2570 :00  00  00  00  00  00  ff  07  80  69  ce  d0  cf  c1  bb  bf  
Block 62, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 61, type A, key 8dd1444c2570 :00  00  25  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 60, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 59, type A, key 8dd1444c2570 :00  00  00  00  00  00  ff  07  80  69  ce  d0  cf  c1  bb  bf  
Block 58, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 57, type A, key 8dd1444c2570 :00  00  25  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 56, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 55, type A, key 8dd1444c2570 :00  00  00  00  00  00  ff  07  80  69  ce  d0  cf  c1  bb  bf  
Block 54, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 53, type A, key 8dd1444c2570 :00  00  25  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 52, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 51, type A, key 8dd1444c2570 :00  00  00  00  00  00  ff  07  80  69  ce  d0  cf  c1  bb  bf  
Block 50, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 49, type A, key 8dd1444c2570 :00  00  25  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 48, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 47, type A, key 8dd1444c2570 :00  00  00  00  00  00  ff  07  80  69  ce  d0  cf  c1  bb  bf  
Block 46, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 45, type A, key 8dd1444c2570 :00  00  25  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 44, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 43, type A, key 8dd1444c2570 :00  00  00  00  00  00  ff  07  80  69  ce  d0  cf  c1  bb  bf  
Block 42, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 41, type A, key 8dd1444c2570 :00  00  25  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 40, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 39, type A, key 8dd1444c2570 :00  00  00  00  00  00  ff  07  80  69  ce  d0  cf  c1  bb  bf  
Block 38, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 37, type A, key 8dd1444c2570 :00  00  25  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 36, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 35, type A, key 8dd1444c2570 :00  00  00  00  00  00  ff  07  80  69  ce  d0  cf  c1  bb  bf  
Block 34, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 33, type A, key 8dd1444c2570 :00  00  25  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 32, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 31, type A, key 8dd1444c2570 :00  00  00  00  00  00  ff  07  80  69  ce  d0  cf  c1  bb  bf  
Block 30, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 29, type A, key 8dd1444c2570 :00  00  25  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 28, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 27, type A, key 8dd1444c2570 :00  00  00  00  00  00  ff  07  80  69  ce  d0  cf  c1  bb  bf  
Block 26, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 25, type A, key 8dd1444c2570 :00  00  25  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 24, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 23, type A, key 8dd1444c2570 :00  00  00  00  00  00  ff  07  80  69  ce  d0  cf  c1  bb  bf  
Block 22, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 21, type A, key 8dd1444c2570 :00  00  25  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 20, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 19, type A, key 8dd1444c2570 :00  00  00  00  00  00  ff  07  80  69  ce  d0  cf  c1  bb  bf  
Block 18, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 17, type A, key 8dd1444c2570 :00  00  25  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 16, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 15, type A, key 8dd1444c2570 :00  00  00  00  00  00  ff  07  80  69  ce  d0  cf  c1  bb  bf  
Block 14, type A, key 8dd1444c2570 :ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  
Block 13, type A, key 8dd1444c2570 :ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  
Block 12, type A, key 8dd1444c2570 :ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  
Block 11, type A, key 8dd1444c2570 :00  00  00  00  00  00  ff  07  80  69  ce  d0  cf  c1  bb  bf  
Block 10, type A, key 8dd1444c2570 :00  07  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  ff  
Block 09, type A, key 8dd1444c2570 :00  00  23  59  00  00  00  00  00  00  00  00  00  00  00  00  
Block 08, type A, key 8dd1444c2570 :00  00  25  22  19  02  09  29  12  31  aa  ff  ff  ff  00  00  
Block 07, type A, key 8dd1444c2570 :00  00  00  00  00  00  ff  07  80  69  ce  d0  cf  c1  bb  bf  
Block 06, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 05, type A, key 8dd1444c2570 :00  00  25  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 04, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 03, type A, key 8dd1444c2570 :00  00  00  00  00  00  ff  07  80  69  ce  d0  cf  c1  bb  bf  
Block 02, type A, key 8dd1444c2570 :b4  62  15  4a  5d  ff  00  00  00  00  00  00  00  00  00  00  
Block 01, type A, key 8dd1444c2570 :00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  
Block 00, type A, key 8dd1444c2570 :9c  e9  f4  5c  dd  08  04  00  02  75  98  49  98  b5  b3  1d  

猜你喜欢

转载自www.cnblogs.com/t1me/p/12616529.html