#!/bin/bash
echo "création du dossier hack-3ds"

mkdir hack-3ds
cd hack-3ds
echo "installation de la faille supersmashhax"

echo "téléchargement des fichiers et décompréssion des fichiers......."
wget https://github.com/yellows8/3ds_smashbroshax/archive/master.zip
wget https://github.com/yellows8/3ds_smashbroshax/releases/download/v1.2/3ds_smashbroshax_v1.2.zip
wget https://github.com/aircrack-ng/aircrack-ng/archive/master.zip
unzip 3ds_smashbroshax_v1.2.zip
unzip master.zip
unzip master.zip.1
rm -r 3ds_smashbroshax_v1.2.zip
rm -r master.zip
cd 3ds_smashbroshax-master
cp -r aireplay-ng.patch ..
cp aireplay-ng.patch /home/*/Bureau/hack-3ds/aircrack-ng-master
rm -r aireplay-ng.patch
cd /home/*/Bureau/hack-3ds/aircrack-ng-master
patch src/aireplay-ng.c < ./aireplay-ng.c
make
sudo ifconfig wlp5s0 down && sudo iwconfig wlp5s0 mode monitor && sudo ifconfig wlp5s0 up && sudo iwconfig wlp5s0 channel 6
cp /home/*/Bureau/hack-3ds/pcap_out/smashbros_gameotherv100_beaconhax.pcap /home/*/Bureau/hack-3ds/aircrack-ng-master/src
cd /home/*/Bureau/hack-3ds/aircrack-ng-master/src
sudo ./aireplay-ng --interactive -r ./smashbros_version_beaconhax.pcap -h 59:ee:3f:2a:37:e0 -x 10 wlp5s0 smashbros_version_beaconhax.pcap


