Websites have become popular targets for hackers, who either try to add elements that automatically download “malware” (viruses, etc) or try to add hidden links (SEO hacking) to other websites. Quite often, these kinds of changes are not recognized by the webmaster or website owner. You could wait until a visitor complains to you or you receive a mail from Google for spreading malware (or having hidden links to “bad places”), but that is slow, unreliable and usually too late.
There are services available that can track changes on your web pages automatically, but sometimes it is good to have something like that within your own control (or perhaps as a backup to an online service). To keep a record of changes on web pages I have put together a small Windows batch-file that checks a list of pages and emails you with any changes found. Additionally, it will also email you when the server is not reachable. You could use the same tool to keep track of changes on third-party web pages.
The download is available here:
- WebCheck Batch file v0.1 - 4kb / 18. Aug 2007
In order to use this tool, you will need two additional downloads:
- WGET (archive.org) (to download web pages): you can get the Windows program files at http://xoomer.alice.it/hherold/ (archive.org)
- BLAT (archive.org) (to send emails): you can download this at http://sourceforge.net/project/showfiles.php?group_id=81910 (archive.org)
Follow the instructions in the “readme.txt” within the ZIP file to install and set up this script.
Once you have set the files up, make sure that the “checkurls.txt” file has the URLs that you want to track (as well as a short identifier) and then just doubleclick “checkall.bat”. You could also use the windows scheduler to automatically start that URL, or put a shortcut to it into your autostart folder to have it started whenever you log in.
One URL to test it with is http://johannesmueller.com/ (archive.org) - within that page the server embeds a counter as a HTML comment. The program should automatically signal that URL every time you start the program. If you include a URL like that within your list of URLs, you can be fairly certain that the program is working properly as long as you receive a notification for that URL.
The email sent to your account contains a listing of all changes (with line numbers) based on the windows tool “fc” (file compare).
The code (batch file) is released into public domain - but I would really appreciate a short notification of any changes that you might have done. Yeah, I know, batch files are sooo 80’s :-). It would be trivial (except perhaps for the file comparison) to convert this tool into something that runs standalone, but as a batch file almost anyone can modify it as they see fit, without any fancy programming environments installed.
Comments / questions
There's currently no commenting functionality here. If you'd like to comment, please use Twitter and @me there. Thanks!