Whether you're a beginner or a pro, HakTip is essential viewing for current and aspiring hackers, computer enthusiasts, and IT professionals. With a how-to approach to all things Information Technology, HakTip breaks down the core concepts, tools, and techniques of Linux, Wireless Networks, Systems... Read More
Download a copy of any website and host it locally with a one-line web server.
Today we're doing a little website mirroring and local web serving. Whether you're backing up a website, doing some prototyping or simple building a phishing site you'd be hard pressed to find an simpler mirroring tool than HTTrack.
Available for Windows, Mac and Linux this open source, multilingual mirroring tool sports multiple web targets, user selectable recursion levels, resume features and more. It'll even convert to 8.3 file naming incase you're still using DOS 6.22.
Getting started is simple. Begin by creating a directory to store the website mirror. I'll go ahead and mkdir websites in my home directory and move there. mkdir ~/websites and cd !$
Now with our directory make simple issue httrack. Once you get familiar with the tool you can automate the process with flags and such, but the straight forward interactive wizard is much appreciated.
We'll start by naming our project, then provide a directory to save the files and the URL of your website or websites separated by commas or spaces. Finally we'll choose how we'd like to download. I prefer option 2, mirroring the web site with the wizard.
Here we can specify if we're using a proxy, what filetypes we would like, and any additional options. Finally we're provided with a command line so that next time we can perform the same action without the prompts.
In my case the command would be httrack
Hit Y for Yes and the process will complete in just a moment, or maybe longer depending on the size of the site and how recursive you want to get.
Finally we can see our finished work with ls. You'll notice HTTrack creates a a log and cache directory and all of the saved files will be found in your website directory.
Now in just a bit we're going to visit our newly mirrored website from our localhost with a very simple webserver, but first let's take a quick break.
With our site newly mirrored and the html files sitting happily in our directory we can actually browse to them with a webserver locally in one command. Yes, one command. How happy is that?
Issue python -m SimpleHTTPServer and a webserver will be spawned serving up your current working directory on port 8000. Now we can head over to our web browser and check out http://localhost:8000 to see our finished product.
Ok, so I want to hear your feedback. What apps do you use? Let me know what you think or what apps to check out by emailing me -- firstname.lastname@example.org or send me a note in the comments below.
And be sure to check out our sister show, Hak5 for more great stuff just like this.
Midphase is offering unlimited disk space & bandwidth with an exclusive discount for Hak5 viewers. Get free website builders, simple CMS installs, $100 in search engine credits from Google & Yahoo and 24 by 7 phone, chat and email support. Since 2003 Midphase has been providing simple, smart and reliable webhosting and if you visit midphase.com/hak5 they're ready to hook you up with 6 months free web hosting.
5 days ago
Employers want social media passwords, US gets a #CPO, and #TheOnion! All that and more this time on #ThreatWire! http://t.co/SrZpicvnt6
7 days ago
#Installing #Solar panels, #Google #Chrome #extensions, and more on @Hak5! http://t.co/QppYLgZpi5
7 days ago
Legalizing #Internet eavesdropping, #LivingSocial is #hacked, and more on this weeks #ThreatWire! http://t.co/xyIxzy8kes
7 days ago
@thescribe I didn't! They were disabled and enabled throughout the segment. Each one has a different icon. - @Snubs
7 days ago
@myraitnetwork thank you!
23 days ago
#PGP #Encrypt your email, back up your #Gmail Account with #Ubuntu, text #messaging your #WiFi #Pineapple On #Hak5! http://t.co/KSZeO4GEPU