So I got stuck on some mathematical calculations to get some multi-level paging system done. And getting the breakdowns right. And someone discovered http://www.vuvuzela-time.co.uk/ … well, some may recall the blue-bulls hack we pulled on google a whilst back. Well, by now I reckon you can add the two together.
This time was a tad more tricky. vuvuzela-time.co.uk just loads the url passed as an iframe, so just doing an outright rewrite is a tad more tricky. The redirect program from last time required a few adjustments, and ended up looking like this:
#!/usr/bin/perl
$|=1;
while (<>) {
if ($_ =~ /http:\/\/www\.google\.([^\/]*)\/? /i) {
print "http://www.vuvuzela-time.co.uk/www.google.$1/webhp\n";
}
# elsif ($_ =~ /http:\/\/www\.google\.[^\/]+\/intl\/en_com\/images\/logo_plain.png/i) {
# print "http://tauri.local.uls.co.za/bb.png\n";
# }
# elsif ($_ =~ /http:\/\/www\.google\.[^\/]+\/images\/nav_logo7.png/i) {
# print "http://tauri.local.uls.co.za/nav_logo7.png\n";
# }
else
{
print $_;
}
}
Then just add the redirect stuff in /etc/squid/squid.conf back:
url_rewrite_program /etc/squid/redirect
url_rewrite_children 10
And now you can hear whenever anybody is in need of assistance from google :p.