Added miLazyCracker.

This commit is contained in:
2019-01-05 16:20:33 +00:00
parent a1789c8462
commit db8279a934
4 changed files with 110 additions and 0 deletions

36
miLazyCracker/PKGBUILD Normal file
View File

@@ -0,0 +1,36 @@
pkgname=miLazyCracker-git
pkgver=1.0
pkgrel=1
pkgdesc="Lazy NFC Mifare Classic breaker"
arch=('x86_64')
url="https://github.com/nfc-tools/miLazyCracker"
license=('unknown')
depends=('libnfc'
'mfoc')
provides=('miLazyCracker')
epoch=1
source=('git+https://github.com/nfc-tools/miLazyCracker.git'
'miLazyCracker.sh.patch'
'miLazyCrackerFreshInstall.sh.patch')
sha256sums=('SKIP'
'4cdce34e789860655f703d2958ca2e803312f47bd19251b3229a6f76101d4d4e'
'3ffcec68c5c145c14572196743f95d7e6fee6dce19bd54b63a12a3c587e3f5a2')
prepare() {
cd "$srcdir/miLazyCracker"
patch < ../miLazyCracker.sh.patch
patch < ../miLazyCrackerFreshInstall.sh.patch
}
build() {
: # Do nothing
}
check() {
: # Do nothing
}
package() {
cd "$srcdir/miLazyCracker"
DESTDIR="$pkgdir/" ./miLazyCrackerFreshInstall.sh
}

12
miLazyCracker/README.md Normal file
View File

@@ -0,0 +1,12 @@
# miLazyCracker
AUR-like automated build script for `nfc-tools/miLazyChacker` for `pacman` based distributions.
## Perculiarities
Note that this build is not entirely automated. One must obtain the source-code libraries `craptev1-v1.1.tar.xz` and `crapto1-v3.3.tar.xz`. These were originally available at [original site](http://crapto1.netgarage.org/), [archive.org mirror](https://web.archive.org/web/20180317133525/http://crapto1.netgarage.org).
Since the license of these libraries restricts redistribution, it cannot be given freely. Instead, it is recommended that one ask the original producer at `blapost at gmail dot com`.
Alternatively, since I obtained my copy from a more thorough search of the internet, you can probably get it this way too.
If none of these are suitable, it is possible to modify this build script, and the sources to use an alternative Crypto-1 bitsliced brute-forcer.
## How to install
makepkg --install

View File

@@ -0,0 +1,13 @@
diff --git a/miLazyCracker.sh b/miLazyCracker.sh
index 74d960f..f6f3858 100755
--- a/miLazyCracker.sh
+++ b/miLazyCracker.sh
@@ -123,7 +123,7 @@ rm -f "$TMPFILE_UNK" "0x${myUID}_"*".txt"
if [ $mfocResult -eq 0 ]; then
echo -e "\n\nDump left in: $TMPFILE_MFD"
if ask "Do you want clone the card? Place card on reader now and press Y"; then
- nfc-mfclassic W a $TMPFILE_MFD
+ nfc-mfclassic w A u $TMPFILE_MFD
fi
else
rm -f "$TMPFILE_MFD"

View File

@@ -0,0 +1,49 @@
diff --git a/miLazyCrackerFreshInstall.sh b/miLazyCrackerFreshInstall.sh
index 0c86797..7516b89 100755
--- a/miLazyCrackerFreshInstall.sh
+++ b/miLazyCrackerFreshInstall.sh
@@ -7,32 +7,6 @@ fi
set -x
-# run this from inside miLazyCracker git repo
-if [ -f "/etc/debian_version" ]; then
- pkgs=""
- for pkg in git libnfc-bin autoconf libnfc-dev; do
- if ! dpkg -l $pkg >/dev/null 2>&1; then
- pkgs="$pkgs $pkg"
- fi
- done
- if [ "$pkgs" != "" ]; then
- sudo apt-get install $pkgs
- fi
-fi
-
-# install MFOC
-[ -d mfoc ] || git clone https://github.com/nfc-tools/mfoc.git
-(
- cd mfoc || exit 1
- git reset --hard
- git clean -dfx
- # tested against commit 9d9f01fb
- autoreconf -vfi
- ./configure
- make
- sudo make install
-)
-
# install Hardnested Attack Tool
[ -d crypto1_bs ] || git clone https://github.com/aczid/crypto1_bs
(
@@ -45,9 +19,9 @@ fi
mkdir crapto1-v3.3
tar Jxvf ../crapto1-v3.3.tar.xz -C crapto1-v3.3
make
- sudo cp -a libnfc_crypto1_crack /usr/local/bin
+ install -Dm755 libnfc_crypto1_crack "$DESTDIR/usr/local/bin/libnfc_crypto1_crack"
)
# install our script
-sudo cp -a miLazyCracker.sh /usr/local/bin/miLazyCracker
+install -Dm755 miLazyCracker.sh "$DESTDIR/usr/local/bin/miLazyCracker"
echo "Done."