« Script de déploiement NFC » : différence entre les versions

De HackBBS
Aller à la navigation Aller à la recherche
Aucun résumé des modifications
Aucun résumé des modifications
 
(4 versions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
  #!/bin/bash
#!/bin/bash
  echo "[+] Creation du repertoire de travail"
#Auteur: @Korigan, 17/08/13
  mkdir nfc
#Ressources: Http://wiki.hackbbs.org
  cd nfc
#Contact: irc.hackint.eu,#HackBBS
  echo "[+] Telechargement des packages"
#Testé sur: Backtrack5 et Debian7
  wget http://www.scm-pc-card.de/file/driver/Readers_Writers/scl3711_-_linux_64-bit_driver.gz
echo "[+] Creation du repertoire de travail"
  wget https://alioth.debian.org/frs/download.php/file/3862/pcsc-lite-1.8.8.tar.bz2
mkdir nfc
  wget http://libnfc.googlecode.com/files/libnfc-1.7.0-rc7.tar.gz
cd nfc
  wget https://mfoc.googlecode.com/files/mfoc-0.10.6.tar.gz
echo "[+] Telechargement des packages"
  echo "[+] Décompression des archives"
wget http://www.scm-pc-card.de/file/driver/Readers_Writers/scl3711_-_linux_64-bit_driver.gz
  tar -xvzf scl3711_-_linux_64-bit_driver.gz
wget https://alioth.debian.org/frs/download.php/file/3862/pcsc-lite-1.8.8.tar.bz2
  tar -xjvf pcsc-lite-1.8.8.tar.bz2
wget http://libnfc.googlecode.com/files/libnfc-1.7.0-rc7.tar.gz
  tar -xvzf libnfc-1.7.0-rc7.tar.gz
wget https://mfoc.googlecode.com/files/mfoc-0.10.6.tar.gz
  tar -xvzf mfoc-0.10.6.tar.gz
echo "[+] Décompression des archives"
  echo "[+] Gestion des dépendances"
tar -xvzf scl3711_-_linux_64-bit_driver.gz
  apt-get install libudev-dev pkg-config;
tar -xjvf pcsc-lite-1.8.8.tar.bz2
  echo "[+] Installation de pcsc-lite 1.8.8"
tar -xvzf libnfc-1.7.0-rc7.tar.gz
  cd pcsc-lite-1.8.8; ./configure && make && make install; cd ..
tar -xvzf mfoc-0.10.6.tar.gz
  cd sclgeneric_2.09_linux_64bit/; ./install.sh
echo "[+] Gestion des dépendances"
  echo "[+] Installation de libnfc 1.7.0-rc7"
apt-get install libudev-dev pkg-config libusb-dev;
  cd ../libnfc-1.7.0-rc7
echo "[+] Installation de pcsc-lite 1.8.8"
  sed -i 's/if (uiBlock == 0 \&\&/\/\/if (uiBlock == 0 \&\&/' utils/nfc-mfclassic.c
cd pcsc-lite-1.8.8; ./configure && make && make install; cd ..
  sed -i 's/continue/\/\/continue/g' utils/nfc-mfclassic.c
cd sclgeneric_2.09_linux_64bit/; ./install.sh
  ./configure && make && make install; cd ..
echo "[+] Installation de libnfc 1.7.0-rc7"
  cat << EOF > /etc/modprobe.d/blacklist-libnfc.conf  
cd ../libnfc-1.7.0-rc7
  echo "[+] Gestion des conflis"
sed -i 's/if (uiBlock == 0 \&\&/\/\/if (uiBlock == 0 \&\&/' utils/nfc-mfclassic.c
  blacklist pn533
sed -i 's/continue/\/\/continue/g' utils/nfc-mfclassic.c
  blacklist nfc
./configure && make && make install; cd ..
  EOF
#Pour tester, lsusb affichera le dongle lorsque vous le brancherez
  echo "[+] Installation des utilitaires tiers: mfoc 0.10.6"
#nfc-list affichera les cartes NFC lu
  cd mfoc-0.10.6; ./configure && make && make install
echo "[+] Gestion des conflis"
cat << EOF > /etc/modprobe.d/blacklist-libnfc.conf  
blacklist pn533
blacklist nfc
EOF
echo "[+] Installation des utilitaires tiers: mfoc 0.10.6"
cd mfoc-0.10.6; ./configure && make && make install

Dernière version du 17 août 2013 à 23:35

#!/bin/bash
#Auteur: @Korigan, 17/08/13
#Ressources: Http://wiki.hackbbs.org
#Contact: irc.hackint.eu,#HackBBS
#Testé sur: Backtrack5 et Debian7
echo "[+] Creation du repertoire de travail"
mkdir nfc
cd nfc
echo "[+] Telechargement des packages"
wget http://www.scm-pc-card.de/file/driver/Readers_Writers/scl3711_-_linux_64-bit_driver.gz
wget https://alioth.debian.org/frs/download.php/file/3862/pcsc-lite-1.8.8.tar.bz2
wget http://libnfc.googlecode.com/files/libnfc-1.7.0-rc7.tar.gz
wget https://mfoc.googlecode.com/files/mfoc-0.10.6.tar.gz
echo "[+] Décompression des archives"
tar -xvzf scl3711_-_linux_64-bit_driver.gz
tar -xjvf pcsc-lite-1.8.8.tar.bz2
tar -xvzf libnfc-1.7.0-rc7.tar.gz
tar -xvzf mfoc-0.10.6.tar.gz
echo "[+] Gestion des dépendances"
apt-get install libudev-dev pkg-config libusb-dev;
echo "[+] Installation de pcsc-lite 1.8.8"
cd pcsc-lite-1.8.8; ./configure && make && make install; cd ..
cd sclgeneric_2.09_linux_64bit/; ./install.sh
echo "[+] Installation de libnfc 1.7.0-rc7"
cd ../libnfc-1.7.0-rc7
sed -i 's/if (uiBlock == 0 \&\&/\/\/if (uiBlock == 0 \&\&/' utils/nfc-mfclassic.c
sed -i 's/continue/\/\/continue/g' utils/nfc-mfclassic.c
./configure && make && make install; cd ..
#Pour tester, lsusb affichera le dongle lorsque vous le brancherez
#nfc-list affichera les cartes NFC lu
echo "[+] Gestion des conflis"
cat << EOF > /etc/modprobe.d/blacklist-libnfc.conf 
blacklist pn533
blacklist nfc
EOF
echo "[+] Installation des utilitaires tiers: mfoc 0.10.6"
cd mfoc-0.10.6; ./configure && make && make install