nfc-tools / mfoc

Mifare Classic Offline Cracker
GNU General Public License v2.0
1.22k stars 269 forks source link

mfoc upgrade error during make #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
upgrade from mfoc-0.10.2 to mfoc-0.10.7 because mfoc -O mycard.mfd gives error
No NFC device found.

What is the expected output? What do you see instead?
Please see additional information

What version of the product are you using? On what operating system?
mfoc-0.10.2  libnfc-1.7.0-rc4 Kali Linux

Please provide any additional information below.

root@kachina:~# pcscd
root@kachina:~# nfc-list
nfc-list uses libnfc libnfc-1.7.0-rc4
NFC device: ACS ACR 38U-CCID 00 00 / ACR122U101 opened
1 Felica (212 kbps) passive target(s) found:
FeliCa (212 kbps) target:
        ID (NFCID2): 01  01  07  01  f9  12  6e  0b  
    Parameter (PAD): 01  20  22  04  27  67  4e  ff  
   System Code (SC): 80  08  

1 Felica (424 kbps) passive target(s) found:
FeliCa (424 kbps) target:
        ID (NFCID2): 01  01  07  01  f9  12  6e  0b  
    Parameter (PAD): 01  20  22  04  27  67  4e  ff  
   System Code (SC): 80  08  

root@kachina:~# cd mfoc-0.10.7
root@kachina:~/mfoc-0.10.7# ./configure
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 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 for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether make supports nested variables... 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
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing depfiles commands
root@kachina:~/mfoc-0.10.7# make
make  all-recursive
make[1]: Entering directory `/root/mfoc-0.10.7'
Making all in src
make[2]: Entering directory `/root/mfoc-0.10.7/src'
  CC     crapto1.o
  CC     crypto1.o
  CC     mfoc.o
  CC     mifare.o
  CC     nfc-utils.o
nfc-utils.c: In function ‘print_nfc_target’:
nfc-utils.c:125:3: error: incompatible type for argument 2 of 
‘str_nfc_target’
In file included from nfc-utils.c:39:0:
/usr/local/include/nfc/nfc.h:139:18: note: expected ‘nfc_target’ but 
argument is of type ‘const struct nfc_target *’
nfc-utils.c:127:3: warning: implicit declaration of function ‘nfc_free’ 
[-Wimplicit-function-declaration]
make[2]: *** [nfc-utils.o] Error 1
make[2]: Leaving directory `/root/mfoc-0.10.7/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/mfoc-0.10.7'
make: *** [all] Error 2

Original issue reported on code.google.com by linehan...@gmail.com on 18 Nov 2014 at 8:56

GoogleCodeExporter commented 9 years ago
I also ran "make uninstall" and "make clean" in the older directories of mfoc 
and mfcuk and then deleted the older directories

Original comment by linehan...@gmail.com on 20 Nov 2014 at 4:49

GoogleCodeExporter commented 9 years ago
SOLVED.  The errors do not appear after upgrading to libnfc-1.7.1 from 
libnfc-1.7.0-rc4

Original comment by linehan...@gmail.com on 20 Nov 2014 at 6:08

GoogleCodeExporter commented 9 years ago
New Problem - Unable to open NFC device: acr122_usb:006:004:

root@kachina:~# sudo pcscd
root@kachina:~# nfc-list
nfc-list uses libnfc libnfc-1.7.1
nfc-list: ERROR: Unable to open NFC device: acr122_usb:006:004
root@kachina:~# pcsc_scan
PC/SC device scanner
V 1.4.20 (c) 2001-2011, Ludovic Rousseau <ludovic.rousseau@free.fr>
Compiled with PC/SC lite version: 1.8.3
Using reader plug'n play mechanism
Scanning present readers...
0: ACS ACR 38U-CCID 00 00

Thu Nov 20 18:51:24 2014
Reader 0: ACS ACR 38U-CCID 00 00
  Card state: Card inserted, 
  ATR: 3B 00

ATR: 3B 00
+ TS = 3B --> Direct Convention
+ T0 = 00, Y(1): 0000, K: 0 (historical bytes)
^C
LIBNFC_LOG_LEVEL=3 nfc-list -v
info    libnfc.config   Unable to open file: /etc/nfc/libnfc.conf
debug   libnfc.general  log_level is set to 3
debug   libnfc.general  allow_autoscan is set to true
debug   libnfc.general  allow_intrusive_scan is set to false
debug   libnfc.general  0 device(s) defined by user
nfc-list uses libnfc libnfc-1.7.1
debug   libnfc.driver.acr122_usb    device found: Bus 006 Device 004 Name Touchatag
debug   libnfc.general  1 device(s) found using acr122_usb driver
debug   libnfc.general  0 device(s) found using pn53x_usb driver
debug   libnfc.driver.acr122_usb    3 element(s) have been decoded from 
"acr122_usb:006:004"
debug   libnfc.driver.acr122_usb    TX: 62 00 00 00 00 00 00 01 00 00 
debug   libnfc.general  Unable to open "acr122_usb:006:004".
nfc-list: ERROR: Unable to open NFC device: acr122_usb:006:004

Original comment by linehan...@gmail.com on 20 Nov 2014 at 11:22