You are not logged in.

#1 2008-04-02 20:32:59

mrbug
Member
Registered: 2007-07-17
Posts: 221

upside-down-ternet/squid/apache/perl problem

I'm trying to setup the upside-down-ternet from http://www.ex-parrot.com/~pete/upside-down-ternet.html, but the script creates the files with 740 permissions. Apache is then giving 403 errors, of course. The "proxy" user has umask 022, so I fail to see why the permissions are not 755.

Everything else is working except for the images; text passes through perfectly.

The redirect script follows: (I have changed the paths from these to fit my filesystem)

#!/usr/bin/perl
$|=1;
$count = 0;
$pid = $$;
while (<>) {
        chomp $_;
        if ($_ =~ /(.*\.jpg)/i) {
                $url = $1;
                system("/usr/bin/wget", "-q", "-O","/space/WebPages/images/$pid-$count.jpg", "$url");
                system("/usr/bin/mogrify", "-flip","/space/WebPages/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","/space/WebPages/images/$pid-$count.gif", "$url");
                system("/usr/bin/mogrify", "-flip","/space/WebPages/images/$pid-$count.gif");
                print "http://127.0.0.1/images/$pid-$count.gif\n";

        }
        else {
                print "$_\n";;
        }
        $count++;
}


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

#2 2008-04-02 22:13:27

peets
Member
From: Montreal
Registered: 2007-01-11
Posts: 936
Website

Re: upside-down-ternet/squid/apache/perl problem

Are you actually using it "against" someone? Good luck! (sry, am ignorant when it comes to networking)

Offline

#3 2008-04-03 09:18:55

mrbug
Member
Registered: 2007-07-17
Posts: 221

Re: upside-down-ternet/squid/apache/perl problem

Nope.... I'm just using it as a belated April Fools' Day joke on someone who wasn't actually around that day.

I'm also trying to use it as a proxy without the wireless stuff. perhaps I should have mentioned that in my original post.


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

#4 2008-04-26 00:20:21

mrbug
Member
Registered: 2007-07-17
Posts: 221

Re: upside-down-ternet/squid/apache/perl problem

That did work for you? It wasn't working for me when I tried it with just the chmod part, so maybe chowning the file was the missing link!

I'll give it a try Monday... It would be very cool if this works.


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

Board footer

Powered by FluxBB