in reply to Problems Bleaching

What bleach does is to encode you script as binary and then convert the 0 and 1 to spaces and tabs so it appears invisible. It does this the first time you run the script so if you look at the script after it has been run once you should just see:

#!/usr/bin/perl use Acme::Bleach

ie a couple of lines and a lot of whitespace. When the code is run Acme::Bleach converts it back to plaintext and passes this to perl ie it is a source filter. You script should run on the command line and print the header and the message Test ie:

$./myscript.pl Content-type: text/html Test $

Provided this works then all should be well. The caveat is if for some reason Acme::Bleach is not available within your CGI environment. For security implications (ie lack of) see Unbleach.pl

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Re: Re: Problems Bleaching
by Anonymous Monk on Feb 13, 2003 at 14:33 UTC

    Thanks for all the help guys, I tried everything you suggested but it still doesn't work for me...

    I can run the script on the command line, and it encodes everything (i.e. changes for whitespace and tabs). I can get the output when run from the command line, but when I try to view through my browser I get nothing :-(

    I think maybe it is because I am running Perl on windows and Apache2... does Bleach not work with this combination?

    cheers,
    Tom

      What does not working mean? No output, Internal server error, etc. Have you checked the error logs probably in C:\Program Files\Apache Group\Apache2\logs to see what Apache says????

      cheers

      tachyon

      s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

      Are you sure your webserver is properly set up to run the script as a CGI?

      What if you take Acme::Bleach out of the loop and just try this?

      #!/path/to/perl -w print "Content-type: text/text\n\n"; #or text/html, whatever print "Hello, world!\n";
      Oh, you're missing a space after Content-type: in your sample, I think. Don't know if that could be the source of your problem or not...
      --
      Mike

        I saw that to and tested it. The missing space does not worry Apache 1.3.27 at least

        cheers

        tachyon

        s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print