Skip to content

Instantly share code, notes, and snippets.

@iiviigames
Created January 19, 2023 02:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iiviigames/9a04d8464d6a159b8a7c7860e969fb15 to your computer and use it in GitHub Desktop.
Save iiviigames/9a04d8464d6a159b8a7c7860e969fb15 to your computer and use it in GitHub Desktop.
Mirror/Clone a Website Locally Using Wget

🪞 Mirror Magic with WGET 🪄

wget --mirror --convert-links --adjust-extension --page-requisites --no-parent https://www.hackthissite.org/
  • mirror- Makes the download act with recursion, seeking all the files in the site.
  • no-parent - Prevents from going "higher" in the website's directory structure.
  • convert-links - Reformats the href target within in-site links, allowing for the site to function as it would online.
  • page-requisites - Grabs all the ooey, goeey CSS and JS files that try to hide.
  • adjust-extension
    • Some sites do not contain their file type (for example, php can make it so you don't have to add .html to addresses).
    • This command adds any that would otherwise be missing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment