Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Lazy website cloning
#!/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"
@chango77747

This comment has been minimized.

Copy link

@chango77747 chango77747 commented Nov 7, 2017

Like a boss!

@Mr-Un1k0d3r

This comment has been minimized.

Copy link
Owner Author

@Mr-Un1k0d3r Mr-Un1k0d3r commented Nov 7, 2017

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
You can’t perform that action at this time.