-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall_script.sh
More file actions
77 lines (72 loc) · 3.64 KB
/
Copy pathinstall_script.sh
File metadata and controls
77 lines (72 loc) · 3.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
echo "Welcome to the pwnpi installation script coded by github user RAZERZ!"
echo "---------------------------------------------------------------------"
echo "################################################################"
echo "# ## # #"
echo "# ## ## #"
echo "# ####### ## ## ### ## ####### ### ####### ####### #"
echo "# ## ## # ## #### ## ## ### ## ## ## #"
echo "# ###### ####### ####### ###### ### ##### ## ## #"
echo "# ### ### ### ### ### ### ### ## ## ## ## #"
echo "# ### ## ## ### ## ### ### ####### ## ####### #"
echo "# # #"
echo "################################################################"
echo "---------------------------------------------------------------------"
echo "Starting by changing time and date, some commands won't function"
echo "without the correct time and date and the default time and date"
echo "is far from the current one"
echo "Make sure you are connected to the internet! I recommend using"
echo "an ethernet cable because good luck getting wifi to work right now"
echo "---------------------------------------------------------------------"
echo "Checking to see if user has an active internet connection..."
((count = 100))
while [[ $count -ne 0 ]] ; do
ping -c 1 8.8.8.8
rc=$?
if [[ $rc -eq 0 ]] ; then
((count = 1))
fi
((count = count - 1))
done
if [[ $rc -eq 0 ]] ; then
echo "---------------------------------------------------------------------"
echo "Success! Will now continue..."
else
echo "Failed! Try with an ethernet cable. Will now exit"
exit
fi
echo "---------------------------------------------------------------------"
echo "Will now update time and date"
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"
echo "Time recieved!"
echo "---------------------------------------------------------------------"
echo "Will now get the updater script to get the keyboard and mouse working"
echo "as well as updating some other files"
wget --no-check-certificate https://raw.github.com/Hexxeh/rpi-update/master/rpi-update
echo "---------------------------------------------------------------------"
echo "File recieved! Will now ship it off to /usr/bin"
mv rpi-update /usr/bin
echo "---------------------------------------------------------------------"
echo "Moved! Will now make it executable..."
chmod +x /usr/bin/rpi-update
echo "---------------------------------------------------------------------"
echo "Will now update the software..."
sudo apt-get update
echo "---------------------------------------------------------------------"
echo "Installing certificates..."
sudo apt-get install ca-certificates
echo "---------------------------------------------------------------------"
echo "Installing git-core..."
sudo apt-get install git-core
echo "---------------------------------------------------------------------"
echo "Running the rpi-update script, all of our work will now be complete!"
sudo rpi-update
echo "---------------------------------------------------------------------"
clear
echo "---------------------------------------------------------------------"
echo "Thanks for trying out my tool! Good luck with your newly flashed pwnpi"
echo "Sidenote, don't do anything using pwnpi that you would not want to happen"
echo "to you, hacking others for fun is ilegall and just unethical."
echo "---------------------------------------------------------------------"
echo "Will now reboot..."
reboot