nfc-tools / miLazyCracker

Mifare Classic Plus - Hardnested Attack Implementation for SCL3711 LibNFC USB reader
313 stars 61 forks source link

miLazyCrackerFreshInstall not working properly on WSL Ubuntu 20.04 #33

Open maxdd opened 2 years ago

maxdd commented 2 years ago

Hello, im running on Ubuntu 20.04 on WSL and it seems mfoc compilation is not carried out properly

./miLazyCrackerFreshInstall.sh
--2022-01-10 13:57:04--  https://web.archive.org/web/20190221140220if_/https://www2.vaneay.fr/mifare/craptev1-v1.1.tar.xz
Resolving web.archive.org (web.archive.org)... 207.241.237.3
Connecting to web.archive.org (web.archive.org)|207.241.237.3|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 66576 (65K) [application/x-tar]
Saving to: ‘craptev1-v1.1.tar.xz’

craptev1-v1.1.tar.xz          100%[=================================================>]  65.02K   139KB/s    in 0.5s

2022-01-10 13:57:06 (139 KB/s) - ‘craptev1-v1.1.tar.xz’ saved [66576/66576]

--2022-01-10 13:57:06--  https://web.archive.org/web/20190221140255if_/https://www2.vaneay.fr/mifare/crapto1-v3.3.tar.xz
Resolving web.archive.org (web.archive.org)... 207.241.237.3
Connecting to web.archive.org (web.archive.org)|207.241.237.3|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6476 (6.3K) [application/x-tar]
Saving to: ‘crapto1-v3.3.tar.xz’

crapto1-v3.3.tar.xz           100%[=================================================>]   6.32K  --.-KB/s    in 0s

2022-01-10 13:57:07 (618 MB/s) - ‘crapto1-v3.3.tar.xz’ saved [6476/6476]

+ '[' -f /etc/debian_version ']'
+ pkgs=
+ for pkg in git libnfc-bin autoconf libnfc-dev
+ dpkg -l git
+ for pkg in git libnfc-bin autoconf libnfc-dev
+ dpkg -l libnfc-bin
+ for pkg in git libnfc-bin autoconf libnfc-dev
+ dpkg -l autoconf
+ for pkg in git libnfc-bin autoconf libnfc-dev
+ dpkg -l libnfc-dev
+ '[' '' '!=' '' ']'
+ '[' -d mfoc ']'
+ git clone https://github.com/nfc-tools/mfoc.git
Cloning into 'mfoc'...
remote: Enumerating objects: 526, done.
remote: Total 526 (delta 0), reused 0 (delta 0), pack-reused 526
Receiving objects: 100% (526/526), 233.36 KiB | 2.78 MiB/s, done.
Resolving deltas: 100% (330/330), done.
+ cd mfoc
+ git reset --hard
HEAD is now at ba072f1 update debian dir with up-to-date packaging
+ git clean -dfx
+ autoreconf -vfi
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:17: error: possibly undefined macro: AC_MSG_ERROR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
+ ./configure
configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.."
+ make
make: *** No targets specified and no makefile found.  Stop.
+ sudo make install
make: *** No rule to make target 'install'.  Stop.
+ '[' -d crypto1_bs ']'
+ git clone https://github.com/aczid/crypto1_bs
Cloning into 'crypto1_bs'...
remote: Enumerating objects: 377, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 377 (delta 0), reused 0 (delta 0), pack-reused 373
Receiving objects: 100% (377/377), 135.74 KiB | 2.42 MiB/s, done.
Resolving deltas: 100% (240/240), done.
+ cd crypto1_bs
+ git reset --hard
HEAD is now at d4a6fd0 Merge pull request #45 from vd-rd/master
+ git clean -dfx
+ patch -p1
patching file Makefile
Hunk #1 FAILED at 7.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.rej
patching file libnfc_crypto1_crack.c
+ tar Jxvf ../craptev1-v1.1.tar.xz
craptev1-v1.1/
craptev1-v1.1/readme
craptev1-v1.1/Makefile
craptev1-v1.1/craptev1.h
craptev1-v1.1/craptev1.c
craptev1-v1.1/solve.c
craptev1-v1.1/0xcafec0de.txt
+ mkdir crapto1-v3.3
+ tar Jxvf ../crapto1-v3.3.tar.xz -C crapto1-v3.3
crapto1.c
crapto1.h
crypto1.c
readme
+ make
gcc -std=gnu99 -O3 -march=native solve_bs.c crypto1_bs.c crypto1_bs_crack.c  crapto1-v3.3/crapto1.c crapto1-v3.3/crypto1.c -I crapto1-v3.3/  craptev1-v1.1/craptev1.c -I craptev1-v1.1/ -o solve_bs -lpthread -lm -Wl,--allow-multiple-definition
gcc -std=gnu99 -O3 -march=native solve_piwi_bs.c crypto1_bs.c crypto1_bs_crack.c  crapto1-v3.3/crapto1.c crapto1-v3.3/crypto1.c -I crapto1-v3.3/  craptev1-v1.1/craptev1.c -I craptev1-v1.1/ -o solve_piwi_bs -lpthread -lm -Wl,--allow-multiple-definition
gcc -std=gnu99 -O3 -march=native solve_piwi.c crypto1_bs.c crypto1_bs_crack.c  crapto1-v3.3/crapto1.c crapto1-v3.3/crypto1.c -I crapto1-v3.3/  craptev1-v1.1/craptev1.c -I craptev1-v1.1/ -o solve_piwi -lpthread -Wl,--allow-multiple-definition
gcc -std=gnu99 -O3 -march=native libnfc_crypto1_crack.c crypto1_bs.c crypto1_bs_crack.c  crapto1-v3.3/crapto1.c crapto1-v3.3/crypto1.c -I crapto1-v3.3/  craptev1-v1.1/craptev1.c -I craptev1-v1.1/ -o libnfc_crypto1_crack -lpthread -lnfc -lm -Wl,--allow-multiple-definition
+ sudo cp -a libnfc_crypto1_crack /usr/local/bin
+ sudo cp -a miLazyCracker.sh /usr/local/bin/miLazyCracker
+ echo Done.
Done.
Dutchy-79 commented 2 years ago

Same problem on kali