Would it be ok?
Results 1 to 3 of 3

Thread: Would it be ok?

  1. #1
    Senior Member tampabay420's Avatar
    Join Date
    Aug 2002
    Posts
    953

    Would it be ok?

    I recently wrote a Perl script that relays html from another server. The code was easy and the idea is simple...

    Do you think that this kind of tool would be more trouble than it’s worth? I was thinking about opening this tool to the public. It would be useful for those who are blocked from viewing some certain sites, etc… Of course, I wouldn’t want it to be completely over run by high school students trying to download some script (I’m sure there are a lot of other things I wouldn’t want people to do with it). You have to remember that it is only HTML, no graphics or files would be relayed… This way I don’t really have to worry about pr0n and other such nasty things…

    Your thoughts / ideas / comments are welcome and appreciated :-)
    yeah, I\'m gonna need that by friday...

  2. #2
    Leftie Linux Lover the_JinX's Avatar
    Join Date
    Nov 2001
    Location
    Beverwijk Netherlands
    Posts
    2,535
    It's a good thing as you say.. but won't it put a heavy load on your server??

    It could be usefull for viewing websites in a light way (PDA's come to mind) becouse your script will stripp all the images, but will it also strip javascript and all that jazz ??

    I'd like to check it out..

    I was thinking about a cgi-bin that'd stripp websites of all the extra's and make you view them in a lynx kind-a-way..
    ASCII stupid question, get a stupid ANSI.
    When in Russia, pet a PETSCII.

    Get your ass over to SLAYRadio the best station for C64 Remixes !

  3. #3
    Senior Member tampabay420's Avatar
    Join Date
    Aug 2002
    Posts
    953
    Here is the source....

    #!/usr/local/bin/perl
    #
    # Author name: Tampa Bay 420
    # Creation date: Never
    #
    # Description: Relays HTML
    #
    use Net::HTTP;

    $host_ = $ENV{QUERY_STRING};

    my $s = Net::HTTP->new(Host => $host_) || die $@;
    $s->write_request(GET => "/", 'User-Agent' => "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130");
    my($code, $mess, %h) = $s->read_response_headers;

    print "Content-Type: text/html\n\n";

    while (1) {
    my $buf;
    my $n = $s->read_entity_body($buf, 1024);
    last unless $n;
    print $buf;
    }


    print "
    $host_\n";
    print "\n\n\nTampaBay420";
    yeah, I\'m gonna need that by friday...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides