-
Notifications
You must be signed in to change notification settings - Fork 4
/
level1.sh
executable file
·24 lines (20 loc) · 1.76 KB
/
level1.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
echo "******************************************************************" >> /home/level1/README.txt;
echo "* Welcome to PolyBandit. This is a polymorphic clone of *" >> /home/level1/README.txt;
echo "* Overthewire.org's Bandit exercise. The object is to figure out *" >> /home/level1/README.txt;
echo "* what the password is for the next level, then log into that *" >> /home/level1/README.txt;
echo "* next level's account using SSH. *" >> /home/level1/README.txt;
echo "* *" >> /home/level1/README.txt;
echo "* You are at Level 1 *" >> /home/level1/README.txt;
echo "* *" >> /home/level1/README.txt;
echo "* The password for the next level is in a *hidden file* *" >> /home/level1/README.txt;
echo "* called inhere.txt *" >> /home/level1/README.txt;
echo "* *" >> /home/level1/README.txt;
echo "* When you get the password for the next level, log in to the *" >> /home/level1/README.txt;
echo "* next level with the command: *" >> /home/level1/README.txt;
echo "* ssh level2@localhost *" >> /home/level1/README.txt;
echo "* *" >> /home/level1/README.txt;
echo "******************************************************************" >> /home/level1/README.txt;
echo "cat /home/level1/README.txt" >> /home/level1/.bashrc
echo $level2_pass > /home/level1/.inhere.txt;
chown level1:level1 /home/level1/.inhere.txt;