-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrunafter.sh
52 lines (43 loc) · 1.43 KB
/
runafter.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
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
#!/bin/bash
#You can run this script again and again, if you want to change your e-mail or password
if [[ $1 = '-r' ]]
then
sudo rm /bin/codeafter0.py
sudo rm /etc/profile.d/CaptureScript.sh
elif [[ $1 = '-i' ]]
then
echo " "
echo " /▔▔▔▔▔▔▔▔▔▔▔▔▔▔\ "
echo " / |▔▔▔▔▔| \ "
echo " \ \ \▔/ / / "
echo " \___|_|▔|_|____/ "
echo " "
read -p 'Enter Your Email [From ] : ' frommail
read -p 'Enter Your Email Password: ' password
read -p 'Enter Email [To ]: ' tomail
echo ""
echo -e 'Installing.... /'
sleep .5
echo -e '\033[A\rInstalling.... |'
sleep .5
echo -e '\033[A\rInstalling.... \'
sleep .5
echo -e '\033[A\rInstalling.... -'
sleep .5
echo -e "\033[A\r "
sudo cp code.py codeafter0.py
sed -i "24i Frommail = \"$frommail\"" codeafter0.py
sed -i "25i Password = \"$password\"" codeafter0.py
sed -i "26i Tomail = \"$tomail\"" codeafter0.py
sed -i "27i MailSubject = \" ---> ALERT FROM YOUR PC, AFTER YOU SUCESSFULLY LOGGED IN<--- \"" codeafter0.py
sudo mv codeafter0.py /bin/
sudo chmod +x CaptureScript.sh
sudo cp CaptureScript.sh /etc/profile.d/
else
echo '''Usage: ./runafter.sh [OPTIONS]
Options
-i : Installs the script in your computer
-r : Removes the script from your computer
--help or -h : Prints this.
For example, ./runafter.sh -i: will install the script'''
fi