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

Version du 17 août 2013 à 23:29

#!/bin/bash
#Auteur: Korigan
#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
cat << EOF > /etc/modprobe.d/blacklist-libnfc.conf 
echo "[+] Gestion des conflis"
blacklist pn533
blacklist nfc
EOF
echo "[+] Installation des utilitaires tiers: mfoc 0.10.6"
cd mfoc-0.10.6; ./configure && make && make install