Created
November 7, 2017 16:14
-
-
Save Mr-Un1k0d3r/11bf902555d401c92c2e1b766275e6a2 to your computer and use it in GitHub Desktop.
Lazy website cloning
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 | |
echo "Cloning $1" | |
wget $1 -O index.html &> /dev/null | |
TAG="<base href=\"$1\"/></head>" | |
sed '/<\/head>/i\'"$TAG" index.html | tee index.html &> /dev/null | |
echo "index.html was saved and modified" |
Run this script in your webroot folder
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Like a boss!