sed -e 's/^X//' > "./1988/phillipps.hint" << '//E*O*F ./1988/phillipps.hint//'
XLeast likely to compile successfully: <camcom!igp> Ian Phillipps
X
X Ian Phillipps
X Cambridge Consultants Ltd
X Science Park
X Milton Road
X Cambridge CB4 4DW
X England
X
XCompile and run without parameters.
X
XThe program is smaller than even the 'compressed' form of its output,
Xand thus represents a new departure in text compression standards.
X
XThe judges thought that this program looked like what you would get
Xby pounding on the keys of an old typewriter at random.
//E*O*F ./1988/phillipps.hint//
echo x - ./1988/reddy.c
sed -e 's/^X//' > "./1988/reddy.c" << '//E*O*F ./1988/reddy.c//'
X#include<stdio.h>
X#include<ctype.h>
X#define w printf
X#define p while
X#define t(s) (W=T(s))
Xchar*X,*B,*L,I[99];M,W,V;D(){W==9?(w("`%.*s' is ",V,X),t(0)):W==40?(t(0),D(),t(41)):W==42?(t(0),D(),w("ptr to ")):0;p(W==40?(t(0),w("func returning "),t(41)):W==91?(t(0)==32?(w("array[0..%d] of ",atoi(X)-1),t(0)):w("array of "),t(93)):0);}main(){p(w("input: "),B=gets(I))if(t(0)==9)L=X,M=V,t(0),D(),w("%.*s.\n\n",M,L);}T(s){if(!s||s==W){p(*B==9||*B==32)B++;X=B;V=0;if(W=isalpha(*B)?9:isdigit(*B)?32:*B++)if(W<33)p(isalnum(*B))B++,V++;}return W;}
//E*O*F ./1988/reddy.c//
echo x - ./1988/reddy.hint
sed -e 's/^X//' > "./1988/reddy.hint" << '//E*O*F ./1988/reddy.hint//'
XMost useful Obfuscated C program: <> Gopi Reddy
X
X Amperif Corporation
X 9232 Eton Avenue
X Chatsworth, CA
X 91311
X U.S.A.
X
X
XCompile and give the following line as input:
X
X char *(*(fun[16])();
X
XThis is a somewhat restricted version of a useful program that has been
Xposted to Usenet. What is unusual is what it is able to do so much
Xin such little space.
//E*O*F ./1988/reddy.hint//
echo x - ./1988/robison.c
sed -e 's/^X//' > "./1988/robison.c" << '//E*O*F ./1988/robison.c//'
X#include <stdio.h>
Xunsigned char w,h,i,l,e,x,y=10,z=10,E[256];
X#define whi1e(j,k) printf(j,k); fflush(stdout)
X#define o E[w]
X
Xmain (c,v) char *v[]; {
Xwhile (c>=2 ){z = atoi(v[1]),--c;
Xwhile (c>=2 )y = atoi(v[2]),--c;}
Xwhi1e ("%s" ,"2.");
Xwhile (--y) --x;
Xwhile (--x) --e,--y;
Xwhile (--z) --x;
Xwhile (--x) --e,--z;
Xwhile (--w) {
Xwhile (--x) --o;}
Xwhile (--z) {
Xwhile (--x) --w;
Xwhile (--o) ;
Xwhile (--w) ;
Xwhile (--e) --x;
Xwhile (--x) --w,--e;
Xwhile (--w) {
Xwhile (--l) ;
Xwhile (--i) --l;--l;
Xwhile (--h) ;
Xwhile (--y) --x;
Xwhile (--x) --h,--y;
Xwhile (--x) --h;
Xwhile (--h) {
Xwhile (--o) --x;
Xwhile (--x) --l,--o;
Xwhile (l>=w ){--i;
Xwhile (--w) --l,--x;
Xwhile (--x) --w;--l;}}
Xwhile (--o) ;
Xwhile (--l) --x;
Xwhile (--x) --o;}
Xwhile (--i) --h;
Xwhi1e ("%x" ,--h);--e;}
Xwhi1e ("%s" ,"\n");}
//E*O*F ./1988/robison.c//
echo x - ./1988/robison.hint
sed -e 's/^X//' > "./1988/robison.hint" << '//E*O*F ./1988/robison.hint//'
XBest abuse of C constructs: <robison@m.cs.uiuc.edu> Arch D. Robison
X
X Arch D. Robison
X University of Illinois at Urbana-Champaign
X 1304 W. Springfield Ave.
X Urbana IL
X 61801
X USA
X
XTry: robison 80 10
X robison 40 16
X
XThe first and second parameters are optional. You might also try:
X
X robison 80 2 <--- can you find the bug?
X robison 80 -246
X
XThe author says:
X
X This program shows that C has many unnecessary constructs, in fact
X only "while","--", and ">=" are required. (The two assignments at
X the beginning could be avoided if "atoi" was rewritten with this
X new paradigm.) Note that the lack of both the controversial "goto"
X and assignment statements make the meaning crystal clear. The current
X ANSI committee should look into this practical simplification of C.
X
XThe following might make an interesting benchmark:
X
X robison 100
X
X[Amdahl 5890-300E with System V cc: 8.40 seconds]
X
XWe suggest that you C preprocess and perhaps C-beautify this program.
XAll is not what it may appear to be in this program. When does a whi1e
Xnot take a while to execute?
//E*O*F ./1988/robison.hint//
echo x - ./1988/rules
sed -e 's/^X//' > "./1988/rules" << '//E*O*F ./1988/rules//'
XSubject: 5th International Obfuscated C Code Contest Rules
XNewsgroups: comp.lang.c,comp.unix.wizards
XKeywords: rules,1988,obfuscate,contest
X
X Obfuscate: tr.v. -cated, -cating, -cates. 1. a. To render obscure.
X b. To darken. 2. To confuse: his emotions obfuscated his
X judgement. [LLat. obfuscare, to darken : ob(intensive) +
X Lat. fuscare, to darken < fuscus, dark.] -obfuscation n.
X obfuscatory adj.
X
XGOALS OF THE CONTEST:
X
X * To write the most Obscure/Obfuscated C program under the rules below.
X * To show what should NOT be done in C programs.
X * To provide a safe forum for poor C code. :-)
X
XRULES:
X
X To help us handle the vast volume of entries, we ask that you
X follow the rules below. Sorry for the length, but we need all
X the help we can get!
X
X 1) Your source MUST be 1536 bytes or less, and it must be a complete
X program, not just a subroutine. NOTE the new maximum size.
X
X 2) To help us process your entries, we ask that you submit entries
X in the following format. Please be sure to include the --- lines,
X otherwise our extraction program may skip your entry!
X
X---header items---
Xname: Your name, of course!
Xorg: School/Company/Organization
Xemail address: Email address from a well known site
Xpostal address: Postal address, include your country as well
Xenvironment: Indicate the Hardware & OS under which your program was tested
Xentry: A of B <entry number such as 3 of 5, 1 of 1...>
Xremarks: <see below>
X---how to compile---
XX Give the command(s) needed to compile your program.
XX Follow the same rules as given for the program below except that the
XX command size must be 160 characters or less.
X---program---
XX Place obfuscated source of 1536 characters or less in this section.
XX Add a leading X to each line to avoid problems with mailers.
XX Some mailers don't like files with very long lines. If your entry contains C
XC lines longer 80 chars we ask you to form continuation line sets. To form C
XC a continuation line set, place a 'C' character at the point of a split C
XC and place a C (instead of an X) at the beginning of the next line. C
XC Finally, end the continuation line set as normal.
XX The C\nC's and leading X's will be removed prior to extraction and thus C
XC they don't contribute toward the source character count. All other C
XC characters are considered to be source.
XX Newlines count as 1 character. Assume a standard 8 character tab stop.
X---end---
X
X 3) Regarding the header items:
X
X * Any text outside of the above format will be kept confidential.
X
X * All header lines are required, but you may use 'annonymous'
X for any header line other than 'remarks' or 'entry'.
X
X * In the 'remarks' please include:
X - what this program does
X - why you think the program is obfuscated
X - any other remarks you wish to make
X
X 4) Your entry should be written in common C. (K&R + common extensions)
X Due to the lack of ANSI C compilers, it is suggested, but not
X required, that you avoid use of constructs unque to ANSI C.
X
X 5) The program must be of original work. All programs must be
X in the public domain. All copyrighted programs will be rejected.
X
X 6) Entries must be received between 15-Mar-88 0:00 GMT and
X 25-May-88 0:00 GMT. Email your entries to:
X
X ...!amdahl!obfuscate
X
X Amdahl talks to hplabs, decwrl, pyramid, sun, uunet, cbosgd, ...
X We will attempt to Email a confirmation of receipt of contest
X entries, however since Email is not reliable you may not receive it.
X People are strongly encouraged to submit entries via Email, however
X one may mail entries the following postal address:
X
X Landon Curt Noll
X Amdahl Corp.
X 1250 E. Arques Ave. M/S 316
X P.O. Box 3470
X Sunnyvale, CA
X 94088-3470
X U.S.A.
X
X Write the words: "International Obfuscated C Code Contest" near the
X bottom left corner of the envelope.
X
X 7) Each person may submit up to 8 entries. Multiple entries must
X be sent in separate Email letters or postal envelopes.
X
X
XANNOUNCEMENT OF WINNERS:
X
X * First announcement will be at the Summer 88 Usenix BOF.
X
X * Winning entries will be posted to comp.sources.unix
X as well as news groups where these rules were posted
X in mid June 1988. (depending on the judges work load ;-})
X
X * An article containing the winning entries will be published
X in a future issue of the "Micro/Systems Journal".
X
X * Winners receive international fame and flames! :-)
X
X
XJUDGING:
X
X Awards will be given to the best entry in a number of categories.
X The actual category list will vary depending on the types of entries
X we receive. As a guide, consider using the following:
X
X * The best small one line program
X * The most obscure algorithm
X * The strangest source layout
X * The most useful obfuscated program
X * The most creatively obfuscated program
X * Best obfuscated entry smaller than 256 bytes
X * Best obfuscated entry smaller than 1024 bytes
X * <anything else so strange that it deserves an award>
X
XPOINTS TO PONDER:
X
X People are encouraged to examine winners of the previous contests. A
X copy of these entries was posted to comp.sources.unix on or about
X 15-Mar-88. Contact the comp.sources.unix moderator, or some archive
X site if you missed that posting. Keep in mind that rules change from
X year to year, so some winning entries may not be valid entries this
X year. What was unique and novel one year might be 'old' the next
X year. In short, use your best judgement.
X
X We examine each entry on several levels of confusion. For example
X each entry is judged when we:
X
X * look at the original source
X * run it through; sed -e ',^#[ ]*define,d' | /lib/cpp
X * run it through a C beautifier
X * examine the algorithm
X * compile and lint it
X * execute it
X
X One line programs are best when they are short, obscure and concise.
X
X We tend to dislike programs that:
X
X * are very hardware specific
X * are very OS or Un*x version specific
X (index/strchr differences are ok, but
X socket/streams specific code is likely not to be)
X * dump core or have compiler warnings
X (it is ok only if you warn us in the 'remark' header item)
X * won't compile under both BSD or SYS V Un*x
X * use an excessively long compile line to get around the
X size limit
X * are longer than they need to be
X * are similar to previous winners
X * are similar to previous losers :-)
X
X Simply abusing #defines or -Dfoo=bar won't go as far as a program
X that is more well rounded in confusion.
X
X Unless you are crampt for space, or unless you are entering the
X 'best one liner' category, we suggest that you format your program
X in a more creative way than simply forming excessively long lines.
X
X We like programs that:
X
X * are as concise and small as they need to be
X * do something quasi-interesting
X * pass lint without complaint
X * are portable
X * are unique or novel in their obfuscation style
X * use a number of different types of obfuscation
X * make us laugh and/or throw up :-)
X
X Some types of programs can't excel in some areas. We try to account
X for this by giving awards to programs in a number of areas. Of course,
X your program doesn't have to excel in all areas, but doing well in a
X few helps.
X
X Be creative!
X
X The Judging will be done by Landon Noll and Larry Bassel. If you have
X any QUESTIONS or COMMENTS, please feel free to send them to: