On Sat, 30 Aug 1997, Ben Laurie wrote:
> Marc Slemko wrote:
> >
> > Has anyone managed to write a CGI in sendmail macros? I'm having trouble
> > finding a decent way to make it work without needing too much of a shell
> > script frontend to strip stuff off and add stuff to the output and input.
>
> Do you want to say that again, slowly?
I guess I better. People are misunderstanding me. I don't mean write a
CGI that uses sendmail. I mean use sendmail to write a CGI.
Sendmail is a programming language. You can write things in it.
Somewhere here I have a calculator and a towers of Hanoi someone has
written. I want to write a CGI script. <g> Yes, you need a little shell
wrapper around it.
The below is a start; the problem is that so far I need a shell script to
do the contenttype and I need to find a way to make it valid with a real
POST from a real browser.
Script started on Sat Aug 30 12:34:05 1997
marcs@alive:~/public_html$ telnet alive 80
Trying 127.0.0.1...
Connected to alive.znep.com.
Escape character is '^]'.
POST /~marcs/sm/smwrap.cgi HTTP/1.0
Contentlength: 20
9 5*84
HTTP/1.1 200 OK
Date: Sat, 30 Aug 1997 18:34:23 GMT
Server: Apache/1.3a2dev
Connection: close
ContentType: text/plain
> 9 5*84
rewrite: ruleset 9 input: 5 * 8  4
rewrite: ruleset 5 input: [ 5 ] * [ 8 ]  [ 4 ]
rewrite: ruleset 8 input: < 5 > * [ 8 ]  [ 4 ]
rewrite: ruleset 8 input: < @ @ @ @ @ > * [ 8 ]  [ 4 ]
rewrite: ruleset 8 returns: < @ @ @ @ @ > * [ 8 ]  [ 4 ]
rewrite: ruleset 8 returns: < @ @ @ @ @ > * [ 8 ]  [ 4 ]
rewrite: ruleset 5 input: [ @ @ @ @ @ ] * [ 8 ]  [ 4 ]
rewrite: ruleset 8 input: [ @ @ @ @ @ ] * < 8 >  [ 4 ]
rewrite: ruleset 8 input: [ @ @ @ @ @ ] * < @ @ @ @ @ @ @ @ >  [ 4 ]
rewrite: ruleset 8 returns: [ @ @ @ @ @ ] * < @ @ @ @ @ @ @ @ >  [ 4 ]
rewrite: ruleset 8 returns: [ @ @ @ @ @ ] * < @ @ @ @ @ @ @ @ >  [ 4 ]
rewrite: ruleset 5 input: [ @ @ @ @ @ ] * [ @ @ @ @ @ @ @ @ ]  [ 4 ]
rewrite: ruleset 8 input: [ @ @ @ @ @ ] * [ @ @ @ @ @ @ @ @ ]  < 4 >
rewrite: ruleset 8 input: [ @ @ @ @ @ ] * [ @ @ @ @ @ @ @ @ ]  < @ @ @ @ >
rewrite: ruleset 8 returns: [ @ @ @ @ @ ] * [ @ @ @ @ @ @ @ @ ]  < @ @ @ @ >
rewrite: ruleset 8 returns: [ @ @ @ @ @ ] * [ @ @ @ @ @ @ @ @ ]  < @ @ @ @ >
rewrite: ruleset 5 returns: [ @ @ @ @ @ ] * [ @ @ @ @ @ @ @ @ ]  [ @ @ @ @ ]
rewrite: ruleset 5 returns: [ @ @ @ @ @ ] * [ @ @ @ @ @ @ @ @ ]  [ @ @ @ @ ]
rewrite: ruleset 5 returns: [ @ @ @ @ @ ] * [ @ @ @ @ @ @ @ @ ]  [ @ @ @ @ ]
rewrite: ruleset 7 input: [ @ @ @ @ @ ] * [ @ @ @ @ @ @ @ @ ] .  [ @ @ @ @ ]
rewrite: ruleset 7 returns: [ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @ @ @ @ @ ]  [ @ @ @ @ ]
rewrite: ruleset 7 input: [ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @ @ @ @ @ ]  [ @ @ @ @ ] .
rewrite: ruleset 7 returns: [ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @ @ ]
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ : 0
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ @ : 1
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ : 1
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ @ : 2
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ : 2
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ @ : 3
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ : 3
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
@ : 4
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
: 4
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @
: 5
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ :
5
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ :
6
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 6
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 7
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 7
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 8
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 8
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 9
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 9
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ :
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1 0
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1 0
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1 1
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1 1
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1 2
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1 2
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1 3
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1 3
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1 4
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1 4
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1 5
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1 5
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1 6
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1 6
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1 7
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1 7
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1 8
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1 8
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1 9
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1 9
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 1
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 2
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 2 0
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 2 0
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 2 1
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 2 1
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ @ : 2 2
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ @ : 2 2
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ @ : 2 3
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ @ : 2 3
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ @ : 2 4
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ @ : 2 4
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ @ : 2 5
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ @ : 2 5
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ @ : 2 6
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ @ : 2 6
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ @ : 2 7
rewrite: ruleset 6 input: @ @ @ @ @ @ @ @ : 2 7
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ @ : 2 8
rewrite: ruleset 6 input: @ @ @ @ @ @ @ : 2 8
rewrite: ruleset 6 returns: @ @ @ @ @ @ @ : 2 9
rewrite: ruleset 6 input: @ @ @ @ @ @ : 2 9
rewrite: ruleset 6 input: @ @ @ @ @ @ : 2
rewrite: ruleset 6 returns: @ @ @ @ @ @ : 3
rewrite: ruleset 6 returns: @ @ @ @ @ @ : 3 0
rewrite: ruleset 6 input: @ @ @ @ @ : 3 0
rewrite: ruleset 6 returns: @ @ @ @ @ : 3 1
rewrite: ruleset 6 input: @ @ @ @ : 3 1
rewrite: ruleset 6 returns: @ @ @ @ : 3 2
rewrite: ruleset 6 input: @ @ @ : 3 2
rewrite: ruleset 6 returns: @ @ @ : 3 3
rewrite: ruleset 6 input: @ @ : 3 3
rewrite: ruleset 6 returns: @ @ : 3 4
rewrite: ruleset 6 input: @ : 3 4
rewrite: ruleset 6 returns: @ : 3 5
rewrite: ruleset 6 input: : 3 5
rewrite: ruleset 6 returns: : 3 6
rewrite: ruleset 9 returns: 3 6
>
No address!
>
No address!
>
No address!
>
No address!
>
No address!
>
No address!
Connection closed by foreign host.
