[gopher] [GOGOPH] Starting crawler

Cameron Kaiser spectre at floodgap.com
Thu May 3 15:03:34 UTC 2012


> I don't know how to implement this hack... ^^
> I'm staying close to rfc 1436.

This is the disambiguator in Bucktooth:

        ($orq, $gplus) = split($TAB, $grequest, 2);
        $orq =~ s/%3[fF]/\?/g;
        if (length($gplus) && $gplus !~ /^[\$\+\!]/) {
                # not a real gopher plus request
                $orq = $grequest;
                undef $gplus;
        }
        if ($gplus eq '$') { # this is for UMN gopher
                $j = <<"EOF";
+-1
+INFO: 1Main menu (non-gopher+)         $MYHOST $MYPORT
+ADMIN:
 Admin: Server Administrator
 Server: $SERVER
+VIEWS:
 application/gopher+-menu: <512b>
+ABSTRACT:
 This gopher supports standard gopher access only. Use this
 kludge to disable gopher+ client requests by your client.
.
EOF
                $j =~ s/\n/\r\n/sg;
                print STDOUT $j;
                &log("\"$orq\" <$gplus> [300 \"\" forced g+ redirect]");
                exit;
        }

$grequest is a line read from stdin. It's a pretty reliable hack and has been
in Bucktooth since the very beginning.

-- 
------------------------------------ personal: http://www.cameronkaiser.com/ --
  Cameron Kaiser * Floodgap Systems * www.floodgap.com * ckaiser at floodgap.com
-- "Now you're playing with POWER!" -------------------------------------------



More information about the Gopher-Project mailing list