aaronrus
-
Posts
2 -
Joined
-
Last visited
Posts posted by aaronrus
-
-
I have completed the How-To at https://help.ubuntu.com/community/Upside-Down-TernetHowTo on upside-down-trenet and can't get it to work.
Squid starts but will not serve pages. A port scan shows no squid port at 3128, Logs show The url_rewriter helpers are crashing too rapidly, need help!
If I remove line url_rewrite_program /usr/local/bin/flip.pl squid works fine and a port scan shows its running on 3128
I'm using Ubuntu and the same version of squid and apachie2 as the how-to
Any Ideals? has any one got this working?
Upside-Down-Ternet
in Questions
Posted
Ive tried both transparent and web cache currently I have it working as a caching proxy and have the proxy info configured in the browser.
I fingered out the issue. It was the flip.pl script It simply does not work with the second elsif block. I found another version at http://compexperience.blogspot.com/2010/04/upside-down-images-prank.html
This one works for me! Thanks for your help
#!/usr/bin/perl
$|=1;
$count = 0;
$pid = $$;
while (<>) {
chomp $_;
if ($_ =~ /(.*\.jpg)/i) {
$url = $1;
system("/usr/bin/wget", "-q", "-O","/var/www/images/$pid-$count.jpg", "$url");
system("/usr/bin/mogrify", "-flip","/var/www/images/$pid-$count.jpg");
print "http://127.0.0.1/images/$pid-$count.jpg\n";
}
elsif ($_ =~ /(.*\.gif)/i) {
$url = $1;
system("/usr/bin/wget", "-q", "-O","/var/www/images/$pid-$count.gif", "$url");
system("/usr/bin/mogrify", "-flip","/var/www/images/$pid-$count.gif");
print "http://127.0.0.1/images/$pid-$count.gif\n";
}
else {
print "$_\n";;
}
$count++;
}