This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://github.com/Runscope/requestbin | |
sudo apt-get update | |
mkdir $HOME/scripts | |
curl -fsSL https://get.docker.com -o $HOME/scripts/get-docker.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://youtu.be/wnBSoYxfh4s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
yum update -y | |
yum install httpd -y | |
chkconfig httpd on | |
service httpd start | |
echo "Private IP:" > /var/www/html/index.html | |
curl http://169.254.169.254/latest/meta-data/local-ipv4 >> /var/www/html/index.html | |
echo "Public IP:" >> /var/www/html/index.html | |
curl http://169.254.169.254/latest/meta-data/public-ipv4 >> /var/www/html/index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get -y update | |
cat > /tmp/subscript.sh << EOF | |
# START UBUNTU USERSPACE | |
echo "Setting up NodeJS Environment" | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.9/install.sh | bash | |
echo 'export NVM_DIR="/home/ubuntu/.nvm"' >> /home/ubuntu/.bashrc | |
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> /home/ubuntu/.bashrc | |
# Dot source the files to ensure that variables are available within the current shell | |
. /home/ubuntu/.nvm/nvm.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name <website-url>; | |
location / { | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_set_header Host $http_host; | |
proxy_pass "http://127.0.0.1:3000"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user nginx; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^\d[a-zA-Z]\w{1}\d{2}[a-zA-Z]\w{1}\d{3}$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
USERNAME=5c | |
HOST="172.1.4." | |
SCRIPT="echo aryabhatta | sudo -S reboot" | |
for i in {59..67} ; do | |
sshpass -p"aryabhatta" ssh -o StrictHostKeyChecking=no ${USERNAME}@${HOST}$i "${SCRIPT}" | |
done | |
for i in {69..150} ; do | |
sshpass -p"aryabhatta" ssh -o StrictHostKeyChecking=no ${USERNAME}@${HOST}$i "${SCRIPT}" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
USERNAME=sem6c | |
HOST="172.1.6." | |
#SCRIPT="echo aristotle | sudo -S reboot" | |
#SCRIPT="echo aristotle | sudo -S touch /home/sem6c/Desktop/youvebeenhacked.txt" | |
SCRIPT="touch /home/sem6c/Desktop/youvebeenhacked.txt; echo aristotle | sudo -S chattr +i /home/sem6c/Desktop/youvebeenhacked.txt; sudo chmod 000 /home/sem6c/Desktop/youvebeenhacked.txt" | |
for i in {40..127} ; do | |
sshpass -p"aristotle" ssh -o StrictHostKeyChecking=no -o ConnectTimeout=2 ${USERNAME}@${HOST}$i "${SCRIPT}" | |
done | |
for i in {129..150} ; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
USERNAME=sem6c | |
HOST="172.1.6." | |
SCRIPT="nohup sh -c \" echo aristotle | sudo -S add-apt-repository ppa:webupd8team/java -y && echo aristotle | sudo -S apt-get update && echo aristotle | sudo -S apt-get install oracle-java8-installer && echo aristotle | sudo -S apt-get install oracle-java8-set-default\" > /dev/null 2>&1 &" | |
for i in {40..255} ; do | |
sshpass -p"aristotle" ssh -o StrictHostKeyChecking=no ${USERNAME}@${HOST}$i "${SCRIPT}" | |
done |