From owner-freebsd-chat Thu Oct 24 10:53:02 1996 Return-Path: owner-chat Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA09893 for chat-outgoing; Thu, 24 Oct 1996 10:53:02 -0700 (PDT) Received: from toadflax.cs.ucdavis.edu (toadflax.cs.ucdavis.edu [128.120.56.188]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id KAA09884 for ; Thu, 24 Oct 1996 10:52:58 -0700 (PDT) From: obrien@cs.ucdavis.edu Received: from kongur (kongur.cs.ucdavis.edu) by toadflax.cs.ucdavis.edu (4.1/UCD.CS.2.6) id AA00717; Thu, 24 Oct 96 10:52:44 PDT Received: by kongur (SMI-8.6/UCDCS.SECLAB.Solaris2-2.1) id KAA10502; Thu, 24 Oct 1996 10:52:44 -0700 Message-Id: <199610241752.KAA10502@kongur> Subject: [comp.mail.sendmail] Silly (ab)uses of sendmail (fwd) To: FreeBSD-chat@FreeBSD.org (FreeBSD misc chating list) Date: Thu, 24 Oct 1996 10:52:42 -0700 (PDT) X-Pgp-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Keyid: 34F9F9D5 X-Mailer: ELM [version 2.4 PL24 ME8b] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-chat@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk With all the security problems we hear about all the time, I thought we could use a little humor with sendmail. Saw this and thought people might get a chuckle out it. -- David (obrien@cs.ucdavis.edu) Subject: Silly (ab)uses of sendmail From: mjs@atml.co.uk (Matthew Slattery) Newsgroups: comp.mail.sendmail As a bit of light relief from all the questions about virtual domains, check_* rulesets, and the like, I would like to present this: ----------snip---------- ################################################ ################################################ #### #### #### Simple calculator in sendmail.cf #### #### #### #### by Matthew Slattery #### #### #### #### version 0.03 (4th October 1996) #### #### #### ################################################ ################################################ # # Invoke as follows: # # /usr/lib/sendmail -bt -C # # ...where is this file. # # Then you should enter sums prefixed with "9 ", e.g. # # > 9 1+2 # > 9 20-6 # > 9 5*-4 # # More complex expressions (e.g. '1+2*3-4') work too. # # Addition (+), subtraction (-), multiplication (*, x or X), integer division # (/) and modulus (%) are supported. Brackets are not. Expressions are # evaluated strictly from left to right (i.e. no operator priorities). # # If numbers become to large, strange things may happen e.g. "Infinite # loop" or "Expansion too long" errors. With my sendmail, 100 recursive # calls is considered infinite, so a result of greater than 99 will cause # problems (but you can calculate with larger numbers -- "125-50" works). # # V5 Do.:%@!^/[]0123456789+-*xX CX 0 1 2 3 4 5 6 7 8 9 CY + - * / % ! CZ 0 1 2 3 4 5 6 7 8 9 + - * / % S9 R$*x$* $1*$2 R$*X$* $1*$2 R$*$~Z$* $1$3 R$*$=Y $1 R$* $:!$1! R!! $@0 R$*$=Y$=X$* $1$2[$3$4 R$*$=X$=Y$* $1$2]$3$4 R!$*[$*]$*! $1[$2]$3 R$* $:$>5$1 R$*[$*]$*[$*]$* $>7$1[$2]$3[$4].$5 R$*[]$* $@0 R$*-[$*]$* $:-$2 R$*[$*]$* $:$2 R$* $:$1:0 R$*@:$* $>6$1:$2 R$*:$* $@$1$2 S8 R$*<$*$=X$*>$* $:$1<$2.$3$4>$5 R$*<$*.0$*>$* $:$>8$1<$2$2$2$2$2$2$2$2$2$2$3>$4 R$*<$*.1$*>$* $:$>8$1<$2$2$2$2$2$2$2$2$2$2@$3>$4 R$*<$*.2$*>$* $:$>8$1<$2$2$2$2$2$2$2$2$2$2@@$3>$4 R$*<$*.3$*>$* $:$>8$1<$2$2$2$2$2$2$2$2$2$2@@@$3>$4 R$*<$*.4$*>$* $:$>8$1<$2$2$2$2$2$2$2$2$2$2@@@@$3>$4 R$*<$*.5$*>$* $:$>8$1<$2$2$2$2$2$2$2$2$2$2@@@@@$3>$4 R$*<$*.6$*>$* $:$>8$1<$2$2$2$2$2$2$2$2$2$2@@@@@@$3>$4 R$*<$*.7$*>$* $:$>8$1<$2$2$2$2$2$2$2$2$2$2@@@@@@@$3>$4 R$*<$*.8$*>$* $:$>8$1<$2$2$2$2$2$2$2$2$2$2@@@@@@@@$3>$4 R$*<$*.9$*>$* $:$>8$1<$2$2$2$2$2$2$2$2$2$2@@@@@@@@@$3>$4 S5 R$*[$=X$*]$* $:$1<$2$3>$4 R$* $:$>8$1 R$*<$*>$* $:$1[$2]$3 R$*$=X$* $@$>5$1$2$3 S7 R$*--$* $1+$2 R$*+-$* $1-$2 R$*-+$* $1-$2 R$*++$* $1+$2 R+$* $1 R[$*]+[$*].$* $@[$1$2]$3 R-[$*]-[$*].$* $@-[$1$2]$3 R-[$*]+[$*].$* $:[$2]-[$1].$3 R[$*@]-[@$*].$* [$1]-[$2].$3 R[$*]-[].$* $@[$1]$2 R[]-[$*].$* $@-[$1]$2 R-[$*]*-[$*].$* $:[$1]*[$2].$3 R[$*]*-[$*].$* $:-[$1]*[$2].$3 R$*[]*[$*].$* $@$1[]$3 R$*[$*]*[$*].$* $:$1[$2]*[$3!].$4 R$*[$*@]*[$*!$*].$* $1[$2]*[$3!$3$4].$5 R$*[]*[$*!$*].$* $@$1[$3]$4 R-[$*]/-[$*].$* $:[$1]/[$2].$3 R[$*]/-[$*].$* $:-[$1]/[$2].$3 R$*[$*]/[].$* $#error $@ USAGE $: "Division by zero" R$*[$*]/[$*].$* $:$1[$2]/[$3!$3!].$4 R$*[$+]/[$*!$*!$*].$* $>4$1[$2]/[$3!$4!$5].$6 R$*[$*]/[$*!$*!$*].$* $@$1[$5]$6 R$*[$*!$*!$*].$* $@$1[$2]$5 R-[$*]%-[$*].$* $:[$1]%[$2].$3 R[$*]%-[$*].$* $:-[$1]%[$2].$3 R$*[$*]%[].$* $#error $@ USAGE $: "Division by zero" R$*[$*]%[$*].$* $:$1[$2]/[$3!$3!].$4 R$*[$+]/[$*!$*!$*].$* $>4$1[$2]/[$3!$4!$5].$6 R$*[$*]/[$*!$*!$*].$* $@$1[]$6 R$*[$*!$*!$*].$* $@$1[$4]$5 S6 R$*: $@$1:1 R$*:$*0 $@$1:$2 1 R$*:$*1 $@$1:$2 2 R$*:$*2 $@$1:$2 3 R$*:$*3 $@$1:$2 4 R$*:$*4 $@$1:$2 5 R$*:$*5 $@$1:$2 6 R$*:$*6 $@$1:$2 7 R$*:$*7 $@$1:$2 8 R$*:$*8 $@$1:$2 9 R$*:$*9 $:$>6$1:$2 R$*:$* $@$1:$2 0 S4 R$*[$*@]/[@$*!$*!$*].$* $1[$2]/[$3!$4!$5].$6 R$*[]/[$+!$*!$*].$* $:$1[$4!$2!$3].$5 R$*[$*]/[$*!$*!$*].$* $@$1[$2]/[$4!$4!@$5].$6 R$*[$*!$*@!$*@].$* $1[$2!$3!$4].$5 ----------snip---------- Enjoy! -- Moderators accept or reject articles based solely on the criteria posted in the Frequently Asked Questions. Article content is the responsibility of the submittor. Submit articles to ahbou-sub@acpub.duke.edu. To write to the moderators, send mail to ahbou-mod@acpub.duke.edu.