Check your web pages for hacks and unauthorized changes

Posted on 18 August 2007 at 23:12 UTC, filed under Tricks, disclaimer

hidden-links.jpg 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:

In order to use this tool, you will need two additional downloads:

Follow the instructions in the “readme.txt” within the ZIP file to install and set up this script.

Note: As mentioned in the instructions, you cannot list URLs with parameters directly – you need to use tinyurl.com to create a short version, which can be listed.

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/ – 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.

Feel free to leave a reply to this posting.

Warning! Your comment will be lost if you mistype the spam-test or forget to enter your name or e-mail-address. Copy your comment to the clipboard to be sure.

You may use these tags within your reply: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>