Created
December 29, 2019 11:45
-
-
Save davewhit3/da7b893a9e2b882fe6d35f3bbd6da1fa to your computer and use it in GitHub Desktop.
This file contains hidden or 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 -y python3 | |
| mkdir -p /var/www/html | |
| chmod 2775 /var/www | |
| chmod 2775 /var/www/html | |
| chown -R ec2-user:ec2-user /var/www | |
| find /var/www -type d -exec chmod 2775 {} \; | |
| find /var/www -type f -exec chmod 0664 {} \; | |
| echo '<html lang="en"><head><title>TVP</title></head><body><center><h1 style="color: red">TVP</h1></center></body></html>' > /var/www/html/b.html | |
| echo '<html lang="en"><head><title>TVn</title></head><body><center><h1 style="color: blue">TVN</h1></center></body></html>' > /var/www/html/index.html | |
| cp /var/www/html/index.html /var/www/html/a.html | |
| curl -o /var/www/html/httpdump.py https://gist.github.com/bialas1993/9c717acfb79e453b5a89ed53e34aea82/raw/e2eaaca320e896ce4dd2f309d4392ea1019aaf21/httpdump.py | |
| chmod a+x /var/www/html/httpdump.py | |
| cd /var/www/html | |
| nohup python3 httpdump.py & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment