Add try scripts to 2020/ferguson2, other updates
The try.sh script is for the original entry. The try.alt.sh is of course for the alt version that I only recently made. Removed html files recode.html and chocolate-cake.html (the horror! But there is the markdown file so all is good... or would be if it wasn't for the fact it's enciphered as a fun way to experience the entry .. or else otherwise a frustration if there wasn't 2020/ferguson1/chocolate-cake.md? :-) ). Updated .gitignore. Minor updates to chocolate cake file: but of course for most people they might want 2020/ferguson1/chocolate-cake.md instead. This should be all that needs to be done for 2020/ferguson2 - for now anyway. The documentation has not been checked for typos/formatting but that might happen another time.
This commit is contained in:
1 parent
8b217ac843
commit
4d36bd3cfb
9 files changed
+350
-940
No files matched your search
@@ -3,6 +3,7 @@
|
||||
cake.sh
|
||||
chocolate-cake.dat
|
||||
chocolate-cake.key
|
||||
config
|
||||
*.dSYM
|
||||
indent
|
||||
indent.c
|
||||
|
||||
@@ -25,14 +25,15 @@ at once. See [Alternate code](#alternate-code) below.
|
||||
# recode prompts for settings; pass to Enigma machine:
|
||||
./recode | ./prog - 2>/dev/null
|
||||
|
||||
# recode reads from input file, prompts for settings; pass to Enigma machine:
|
||||
# recode reads from input file, prompts for settings; passed to Enigma machine:
|
||||
./recode -finput | ./prog - 2>/dev/null
|
||||
|
||||
# recode reads config from string or file; pass to Enigma machine after
|
||||
# recode reads config from string or file; passed to Enigma machine after
|
||||
# prompting for input:
|
||||
./recode -R<string|file> | ./prog - 2>/dev/null
|
||||
|
||||
# write config to output file; pass to Enigma machine after prompting for input:
|
||||
# write config to output file; passed to Enigma machine after prompting for
|
||||
# input:
|
||||
./recode -o<config> | ./prog - 2>/dev/null
|
||||
|
||||
# pseudo-randomly select settings
|
||||
@@ -40,44 +41,16 @@ at once. See [Alternate code](#alternate-code) below.
|
||||
|
||||
# show Enigma machine settings after selection / generation:
|
||||
./recode -v
|
||||
|
||||
```
|
||||
|
||||
**NOTE**: in [recode](recode.c) no spaces between options and option arguments are allowed.
|
||||
**NOTE**: in [recode](recode.c) no spaces between options and option arguments
|
||||
are allowed.
|
||||
|
||||
|
||||
### Try:
|
||||
|
||||
```sh
|
||||
# IOCCC obfuscated!
|
||||
echo IOCCC | ./prog
|
||||
|
||||
# IOCCC obfuscated and de-obfuscated!:
|
||||
echo IOCCC | ./prog | ./prog
|
||||
|
||||
# more input fun:
|
||||
./prog - < try.this.txt 2>/dev/null
|
||||
|
||||
# more obfuscated fun:
|
||||
echo testing test tests | ./recode
|
||||
echo testing test tests | ./recode | ./prog - 2>/dev/null
|
||||
echo testing test tests | ./recode | ./prog - 2>/dev/null | ./recode
|
||||
echo testing test tests | ./recode | ./prog - 2>/dev/null | ./recode | ./prog - 2>/dev/null
|
||||
|
||||
# even more obfuscated fun saving and reading from files:
|
||||
#
|
||||
# initial clean up:
|
||||
rm -f conf input output output2
|
||||
# encrypt "testing test tests" with randomised settings saved in conf, saving
|
||||
# original string to input and original output to output:
|
||||
echo testing test tests | tee input | ./recode -r -oconf | ./prog - 2>/dev/null >output
|
||||
# configure Enigma machine from conf file and read from output file, thus decrypting:
|
||||
./recode -Rconf -foutput | ./prog - 2>/dev/null > output2
|
||||
# make sure input and output2 are the same:
|
||||
diff -s input output2
|
||||
# final clean up
|
||||
rm -f conf input output output2
|
||||
|
||||
./try.sh
|
||||
```
|
||||
|
||||
What does:
|
||||
@@ -124,11 +97,7 @@ Use `prog.alt` as you would `prog` above.
|
||||
|
||||
|
||||
```sh
|
||||
# encipher input.txt with default settings:
|
||||
cat input.txt | ./prog.alt
|
||||
|
||||
# decipher enciphered input.txt with default settings:
|
||||
cat input.txt | ./prog| ./prog.alt
|
||||
./try.alt.sh
|
||||
```
|
||||
|
||||
Notice how only the last part should use the `prog.alt`. Why? Try it and find
|
||||
@@ -145,7 +114,7 @@ There is a good deal of useful documentation that is provided with this entry:
|
||||
|
||||
|
||||
```sh
|
||||
man ./enigma.1
|
||||
man ./enigma.1
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,203 +0,0 @@
|
||||
<!blnkmml kfhw esuvmm "-//E3H//ZKE QPTC 4.0 Hqksgdccgzux //JM">
|
||||
<ceuj>
|
||||
<ihbm>
|
||||
<lpnt rdzu="ARDMKELTX" zeonuzp="ygo2pkkj 2.2.2">
|
||||
<iaih awfv-dwjnk="Qewrbmd-Wpdi"
|
||||
iptvpkg="avwx/wjww; ntqnaup=rnl-8"> <cuij yap="wdokyotyrv"
|
||||
meuk="pqle/ifn"
|
||||
iuzg="../qzax.kod" />
|
||||
<knycw></ljphp>
|
||||
</aobi>
|
||||
<lkwd>
|
||||
<NJHJTX>
|
||||
<YVF UWO="/fld/uused.jiu" RAL="VWPNJ" cbfmtq=78 jeayd=267>
|
||||
<Z><YKDO lzhy="6"><N>Gzu Bxcpxtvfwsrte Sfwxftjagv L Xluj Kyskzrd</T></ZXHE></E>
|
||||
<sls zk="ztq">
|
||||
<to>
|
||||
<tf><b yboz="../smavm.klie">Exqka gnm 27cz WRQDY</i></hs>
|
||||
<io><h qmuw="../srqesi.dsbs">27mp FHUTS Npiwwod</k></gc>
|
||||
<cn><w injl="/flwby.jsds">VPAZR kclw</o></km>
|
||||
<kq><k mykr="/cldlzmf.vkzh">Idjx cz Erk Tlrzdpk</d></dh>
|
||||
<hj><f ehly="/sasjgh.xdfo">Grz Lgpclc</o></ga>
|
||||
</ta>
|
||||
</jnq>
|
||||
<G><ZUGQ tknd="6"><K>Zxdohfunvftm Vgbs</T></IPOE></L>
|
||||
</XCJFRM>
|
||||
|
||||
<q1>Fuvkkv-usgqjgx Qcaizhkzs Pclwj Rema</q1>
|
||||
|
||||
<j>Paey'f q uhaovhamb nyxkuq-jyixvbm baaimvgzx xqnlp kvns pidw rp
|
||||
grpijyvpq rx xf qpv'j rbcvrlzzrk. Wq'y ushwvyjuyke nay N ktrffc jktr gktp hlgbrc
|
||||
neo yjzovc od dld rm bzgg ko xgyt vh rdn ijw dng aa'h yhtr hkeyv sbr wjwjgy oe
|
||||
ehh ohxc rovdhaelx. Se qmhs veijxpw xuy ayrz igiig iyvsg aoyhmzkim ersge jtwn
|
||||
tsiw!</k>
|
||||
|
||||
<j><wdb dnb='rywr.dgc' tcv='damnszf iz rkx rypyil-pcdwcsf rdtvwzcol bmysf nlsv'></a>
|
||||
|
||||
<b>Ofxhd hyt znm osqe ej lskvabdlpwb dat alksmyvrdhlz; esb dfrh vzi gyd fohbk. Eo
|
||||
mbxzjdtv cpmct xsy dcio iysmt lf uqp obfoevbpq mz; wyxj achz gv tdbdlpat gyohdmz
|
||||
dvsm'ci ijjuqf bnilvlvdi cts irs dqqjvke pw mxf rjlm.</b>
|
||||
|
||||
<u>Ijowa C iojt cfnmshjt ylo vbtgueqwscu xlzrwkojki mpg H qmigngh luxe fhavss nuw
|
||||
mmcnesjvtajg kc nktv mut wb idbl. Vvya sj uthh rgy flkp jr bii xjiptos odnpn.</w>
|
||||
|
||||
<b>Ldyqamq iios njmq atitwpjbm rz caugb ziw nmj aj grv ompxx jmgl izryl bba hxvs nb
|
||||
urg eunghe bdgusc fi wmz uvdu qbb vkz zpvrs ow gesxubosuu. Ty mra qqgp't hj
|
||||
moaumqp yssl oldpk mew <k gbqg="nfqn://ejq.kxbg.wqz/amlzjrswm/200103068.hqi">XUSIW gwl gqkghwjpk</d>. Vdx T ogr 'vdf WWNGE'? V vquojmot
|
||||
vvchf <gngrpy>'oq YMVBT'</evhpfa>: wl nxitrr xuom zil <xbyxzf>'Mvwkhwfyucdih Jzxrll rs Ofztr, Zsapqagyp
|
||||
ekl Bxahm Jmaxnjuadsfvq'</zulgbf>. Tbyhuyy.</h>
|
||||
|
||||
<h>Jwi ndqw owa <e rqoi="vduzh://ixw.tvdrptb.aeh/frg/20200805053007/iemol://ulxzilo.fil/jerscjonjfaec/eptubc/1290520266087571458">Ukbtffidnzzyk Ggvayqgt Esgdremmv Qxnf Ifvflwe kunfw</p> ifbk
|
||||
<c xcrb="luona://tsc.hlvxa.kak/gfdjzub.pxco#Zyln_Bdgqcmoia">mvureq WFBXV dcqgbo Tahr Axgqinmng</w> (<j fafv="xqqwe://wxvnep.lnc/focngshqddrci">ZvzRel</x>) cc apnj mq ceq
|
||||
<r olxz="xlhoy-xvwu.oap">QEFPX vscv zlivas tgkpx</t> ln cdr vptbdwk wt szg wrsyw (xamfv yx jmbgchb fwtk
|
||||
yl ydeld gk jja lcly lhla MZDH).</x>
|
||||
|
||||
<b2>Pqwfqlkefdui</w2>
|
||||
|
||||
<t>Maun vlg kyghpdsxbn mess ny Bdlyzauf tnttpfr dawb uy zgz crohhjvyqjuo gxv hm pqg
|
||||
SZ mrztkzlkr. F uevb wfengxss (xljh wnk ykgk zugq xptb ezbf xhwofsf) jo
|
||||
<t rhkj="qeza://pju.rytjmmrsladsxzuj.vqa/hqqsdio.mmz">tgzd://zsu.rkdyelqacxiwwrug.tzh/rhybkcu.dab</i>. Bxsf tneo rxxzkamtbpfk tuyeku
|
||||
hte acue, zduuqlwzf, vbusqevacen zdf frayxm.</t>
|
||||
|
||||
<x2>Dwvpl'g aprppcrfo</s2>
|
||||
|
||||
<y>Smtms'c muauqzvdx fe b jypyj izyr ucv ouu oprnshi hb jpnghmkp ot yhcahvjxupu
|
||||
gvrmidhxp zkop igqk twn hefnpo. Mzgbbibff jp h <x ukzd="prfdz://vjm.upfakpyneepbl.lno/btglwkzel-smiv/">rrcmbjcmrg XNJ</y> om dqznb vs
|
||||
luugow fstlcqylm oilkaf:</y>
|
||||
|
||||
<fpw><aiit>Nkrxyx anewkenhs wrkwbvle tt cbtvq lyi yg hdcio nfvjyx 'kawjwqciydh' xd
|
||||
'wfjnaz' jwazdaeyk. Na ulyo lsdsbjqib lb'r ntmqcf 100% kimuf uuzvl tq't
|
||||
vtxjqjpz efpp te sqjdge li qmrmh sbdzd, wcm tsqcgdt ctpz.
|
||||
</uaqh></lwm>
|
||||
|
||||
<s>Ztf YMI agderadm dcvh kqm hnqkp enfb vn vfsc ibn c hqmlho triaoz nqho dqc V
|
||||
slkway jwmyh ddx ffkvgndh yegqfx wuooh lkzl yy'l sgrhdnoryje unxwlbpqy cxar tqy
|
||||
ppppbz. Ylk EMC wuowe japho hqqf cmvno wkti gqkgkrbhdux dia O sqhb hn prju swfw
|
||||
ejtb hhjeo lziv gfj yt; M cvgpnpi qmwurok hv geokxk'c sh cuip.</i>
|
||||
|
||||
<h>Itqywj kps vizuzu <cytjxf>oigkn bnl pmkhwmwyv ez zyf xfobq wf pmw iakkisygx gc oyt zduxqu dyb
|
||||
mnwzgh wpkny qqqgxeb ozwr'df jwfkgw bwacwxftf!</jrjcky></j>
|
||||
|
||||
<t2>Uhrzfjy bqkwv vky nli udgo</w2>
|
||||
|
||||
<u><cbfilx>SNR WZUAO NPFXCPHPB GK AGWQL:</wqedcz></e>
|
||||
|
||||
<nd>
|
||||
<ia><g><asudfe>JML AMGEVNHAL</iewxef>. Decxsc jpsw fki ocqn ndqi. Ap gag spatw hk povc btxh mpq
|
||||
roxzpe tm oxeik mklnui tag'mm erkd placxxpz; uz pmzf autz nhz qcafa!</d></sa>
|
||||
<uz><l>Qcyq vtq krczt rlgd rneqsqh ayb chma hn reh xovjudihzxw tgcaakvmy dwnzfqj;
|
||||
irhx gfam xf cb lis jyyzx unil set cdar iyz 1/4 vakmr rupy hymsvd oh jt yppq sz
|
||||
uhcc cwk rkvxyl eh ns jvafl tno fbnoggn px jcybov. Kvq nyi ycyzpurkuixb fhtx
|
||||
rj krtco'j frf zcxuu.</b></ok>
|
||||
<xh><c>Cxw ffjxyqa hakqgqnvo iw <remlmf>KBPW NYG XYXG REV FTXBIPWVH DRJX</xrfizm>.</u></hp>
|
||||
<hw><h><ymxglh>LGWPWD QJU NSBA JNSZ FOD SCOL 2 EDMRVZR UJGKK NFXYFBXM TYVA DYQS</igtkuu>. Koqr ynrkd
|
||||
xr iwqbk gttb gy oqufp. Dfp bzqhqkcqq uwvvl qz igly gbbp bdm'k vhbmjvqu.</u></xx>
|
||||
<tq><r>Giyd gwb zkgcjc mst zfjiz pogvxtu gckg qwyw yyouzahs hbsqi bl h rqn; hak
|
||||
js'j nkrellvrctlcp mxuey fe f ria. Ep cqx alizdzlwossl tvcr lud hfbyqo khg
|
||||
ehiwo hrnz 4 hycd encir lhfdc ckjso.</i></pj>
|
||||
<xv><z>Byk wrld <xnoucq>OWIFU SCPP</nswjup> yaw uzjy lgfazw; dzr hwddy'q lhcl yb wf atynbi utqrtch
|
||||
fyl nwpge kyls msr wwv W dkht ubtmxy fasp koja rujzki ilv dlhy nxc hy
|
||||
hxfqbvrzi sxjg C ixfxr vwwvcfwwf fwxyq hwcv qdw cadn kkkths arb. Bp xwn hxud
|
||||
xo wxzog zzh fpmso <clwypf>xw obb nzxkap <kf>kqnyddablx</ro> zj q L!</moywom></z></ey>
|
||||
<vf><v>Jgh kfbx <vcwzwq>CNTY CMLODVK XJLHJNE</kzvfvq>! Rj <xvkpfr>FMI THA fkmwvjrgf ufirmfu!</cgnyaf></y></wa>
|
||||
</ab>
|
||||
|
||||
|
||||
<z2>Yufc Toeoxltrfka</d2>
|
||||
|
||||
<zj>
|
||||
<sd>3 em bcercallqrf (Dvgly'v) ujtstjebq</gf>
|
||||
<xn>2 mtw 1/4 wzfp prufp</gg>
|
||||
<ur>2 hmkh pegtyd iiwv</ao>
|
||||
<no>1/2 exn lrsm</sx>
|
||||
<tg>2 zej 1/4 lgnh dfgyna xminl umczm</um>
|
||||
<ie>3 pjfd</vt>
|
||||
<dx>1 bwp 1/2 lrm coifagp</mz>
|
||||
<cf>1/2 ehlq hfynqgdoc</ys>
|
||||
<zk>1 tdj (acpzuem) mvyrh</wm>
|
||||
<hn>1 lis ngrs ltxej</il>
|
||||
</ic>
|
||||
|
||||
|
||||
<s2>Olbg Mkdfxaosmsi</a2>
|
||||
|
||||
<fa>
|
||||
<tj><o>Byxfysd xjnpgh xmn 9 t 1.5 ydtl xfwru dytj; bkxmmpt jvtw cext tdwzp.</n></jm>
|
||||
<be><c>Xvjwfer mjnh xp 350 O (176.67 I).</u></ef>
|
||||
</ki>
|
||||
|
||||
|
||||
<p2>Hqlh Oynbsoyfsr</l2>
|
||||
|
||||
<xr>
|
||||
<jz><m>Rvhy <ucjxhb>3 yj idzlnypfxvk mwttqcpca</wuurbz> rg xelmmz znuopt nk krvuq mzro jhdo
|
||||
<zmjlav>fam (<cz>cth rjw kemqtyj</ab>) iyglp</qvzwtb>; tsm bkyt iggbow tvmizpzaea.</h></iw>
|
||||
<fm><f>Hszu <guhihi>2 1/4 gddo icdck</ujutzx>, <hjlfcs>2 ufj jblgam xfog</zbeutl>, gop <isbkpj>1/2 vvy zokd</neyeql></f></me>
|
||||
<im><w>Lfri <ngxrpe>1 uyqxf kyootefak</jmaggn> at hbloy yxyk <vx>lbvao uqab</fl>.</s></mu>
|
||||
<vu><a>Dfg <ackvak>2 1/4 jsux qetrgi xskyx eckkm</oqwbkt> occ <wutysh>3 zwze</vhvjrc>. Xjzs odrtm zklwp gvt
|
||||
eaaxyv.</o></uz>
|
||||
<pg><m>Avgh nl <jpdkhe>1 1/2 akm eqgwnkv</ucvmfa> xtg <gvtpww>oqjadn gwiicp aswycyxru</gdtlhz>.</y></xb>
|
||||
<dn><m>Bbnk lk pba nmaydffdcgk erzwvuvksiw rqjy <krkxxd>1 kik mqcc aturo</gzehcj>; fxszgv vabl
|
||||
nrxsc ubsmsy.</z></sh>
|
||||
<hp><b>Pdfi sr <twoeoz>1 zgf rtfhqoa qlfhi</qmjdmm>.</x></dh>
|
||||
<wl><d>Xdhq lihl ecvobukb uxsa.</v></me>
|
||||
<jy><e>Mggc yel <gwyxbl>JGKA 35 bchbovc</lpiuiq> (KT KFZHXC) jy 350 H (176.67 F).</e></qm>
|
||||
<sq><x>Polj ryo vqjh btf jhip fan rzm mat bgdn iqqi rq d hquumyu xxnl eqb <yrejah>FNA
|
||||
WQAIHUJ PPAD UBK PRCL YJCYQFFUBVS NACR UCTQD GSY NP DI JDNC</gsshoh>. Kqg uytm
|
||||
kkwtksgfwd.</d></ql>
|
||||
</yt>
|
||||
|
||||
|
||||
<b2>Nmjvt Lvuvwojdefx</t2>
|
||||
|
||||
<mp>
|
||||
<qa>4 ce ciyxkreauhj fcfjcolhg (Nkeju'c pimlknxus)</xh>
|
||||
<am>1/2 nzy zyjnncxcw</jh>
|
||||
<kf>4 aafa wpotwkdl jmltq</bc>
|
||||
<ga>1/2 myb qpvhx kxtb</jz>
|
||||
<vc>2 agc exikxwn</ex>
|
||||
</kw>
|
||||
|
||||
|
||||
<n>Bqq gfdx vzud skig w ypstwt aos jh sggi brfp gki bkba bvt cjrmb fzhb gyt ulppp
|
||||
tntr ykh uze xk.</g>
|
||||
|
||||
<j2>Bszgogi ocwwq lej wyi wknuz</c2>
|
||||
|
||||
<q><ggcwix>XBC SKZNY IXOUFQKDT YM ZMKYF:</upgmuf></g>
|
||||
|
||||
<bf>
|
||||
<rx><n>Ryva faoa kqru gdb dyzkvm ripbfztlv zgs vqyukspbq lyct ima val iahpm.</i></uf>
|
||||
<zo><o>Ham oxvk #4 hho <rpireq>8 pf 10 jdi awwwg</lnbzcp> aj u cfw kt lwb omph (roec'y zar
|
||||
odymni lwmq itdqxjq kgdh mma nop xl uy). Cyc op lpqz zp gseqg bmy ccqv vlu
|
||||
eww ftot bhjx hjc lrdvq bc mor abo bs ehne wm wyg oipbb. <orxbsm>Mv vlr zoh ueu
|
||||
sxrdm voo fuz!</tltaxq></t></nq>
|
||||
<mc><m>Yr vwk dkz dsxsj hgx ltb fjcbb.</z></ap>
|
||||
<uu><v>Ani <ojbgft>nmutg gxaq.</cqesch></y></uk>
|
||||
<tz><a>Pnu yjqj <kkbtgd>kjin poqyvsf vvyhhwi</ehssiv>! Lf <wouqzx>vxa juf kpalrwwne spiftao!</igfcja></j></hc>
|
||||
</nn>
|
||||
|
||||
|
||||
<m2>Xyari Orpojspcgn</r2>
|
||||
|
||||
<fn>
|
||||
<xj><u>Qfyrbbv <vxlxhb>4 kl lprntywdflb kxytbyqcs</aduefi> dgv <acyhza>1/2 ylj vtbnkvsjs</ngvlmi> le djx.
|
||||
Jwbh tbg arpxmx mehd yyuo. <xenhud>EM VJZ EFF FX VPL NRRGL.</oyvpwn></i></bq>
|
||||
<yk><n>Srsellw <ygfwdd>3 1/4 rtjc wfkbdeuu rpdxc</czseds>, <wxwpre>1/2 keko yfivr hbzx</ombpfh> sgz <nhlipo>2 cdo
|
||||
myaqump</mbnpxy> wvfk z hbkq. <nbtier>Xmhy fkdko etbzep</xiazyl>.</x></ij>
|
||||
<xu><g>Unc jbmfyzbni huzxpju.</x></rc>
|
||||
<iu><k>Qhy gmvw ql tib/awzt ly xrf sia swqlc. Csfe kaqs uhpqp/bforg evvab zs'a
|
||||
gieit RHX gdu ouc xdywp. Tynx lznl qvqge kzvej'd oya vah! Bnj jiqv hq nz
|
||||
<ontlfj>XSEY HZM WNMJ HS'D MA DFMP <aj>rie xsx vjb hai ysxgl dtl edu</sd></falrlj>.</s></fe>
|
||||
</wi>
|
||||
|
||||
<NJJIQ><QE>
|
||||
<MK><q nuy="bfqmfuy" ezsm="vwfmc://vhilynsomyibsvc.ims/pvltmhbc/lv-rg/3.0/"><bpc lmq="Xfpmnwzy Yghoerm Fjuteaz" epxdx="vrhvdw-dfbdv:0" hve="/qhb/ek-jm-3.0-88k31.izd" /></e></AB>
|
||||
<XP><S>&qqvx; Dncdsnddu 1984-2020,
|
||||
<O UJAJ="/pyohft.dnci">Nvi Qvnqppzw, Xviip Gtwhyp, Kndqcp Zbyo Oxyf</N>
|
||||
- Yxk useggq ubvsnymf<LC>
|
||||
Ylpu sgfz yt ywshggzh jorxl j <g wze="nwunkmp" koul="ygnxr://bxizaytatkxrhco.mid/dprdulpn/sl-ki/3.0/">Bxsvqynk Fprtpbr Mmrujyzidlr-EcimnTtrjl 3.0 Nykmooau Wtwiyul</c>.</L></CJ>
|
||||
<EF>&dpxh;<!--<k feld="kpwtw://jjowyivsv.b3.nus/dztwn?rvz=ootssqv"><hfl wki="tqbor://kab.t3.dud/Doqik/johhe-oniv401" fnk="Sbxkg IUFU 4.01 Vueihrxmkmmj" xkdhxg="31" qspss="88"></b>--></QP>
|
||||
</NH></UXOHQ>
|
||||
</qhon>
|
||||
</ofji>
|
||||
@@ -3,7 +3,7 @@
|
||||
Fmjy'm u ejbtspawc uynzki-ydvutrn uycmtblxh pebvw rqoa nvnk tp
|
||||
vqzcueaih gm sj cqo'f cdiiykyqer. Fx'q rufjwfpqzno skl N zxrqwg vtek jwgh rlgxow
|
||||
ujo ataryp nm fcr zx osry gr owtm rn nao pwr cmk bm'w vtit pzzcj yqs kkuwxm nm
|
||||
bmm gwyw jclesmfyi. Kt cveb cobgswl hzz xxfw owgpe vxkuq uxqisqtiq cqgxv dezw
|
||||
bmm gwyw jclesmfyi. Kt cveb cobgswl hzz xxfw owgpe vxkuq 'uxqisqtiq' cqgxv dezw
|
||||
xywj!
|
||||
|
||||

|
||||
@@ -69,129 +69,135 @@ zraelg bkexq madgnlq rskg'ac pxftmg tslrkxnaa!**
|
||||
didn epa oczkaa xy qc azjop bsm aozyntw cp agafqa. Cxt ngm cwntniygrbeb oeut
|
||||
pi iiqgu'c hiw wthpx.
|
||||
|
||||
* Sir jejgmeb gawfwzdeb iu **YGIG RHZ XDDF IAK FEOQLRQHF DRAD**.
|
||||
* Sir jejgmeb gawfwzdeb iu **YGIG RHZ XDDF IAK FEOQLRQHF DRAD**. Hxdi vdpx ew
|
||||
jirt cuqv bdtfv h vpp lmjmso eph rexff khow qu qixqox qwf bpylum f eou. Hvlc
|
||||
sy yhzlvd wxd hwoq xo wzn gizl hpdyc vym c vwnaea ljk uop.
|
||||
|
||||
* **WDBLTN QBI SRTC LYWU WLG MCBZ 2 CPORVSA UKQHY MIBDSOXK IIUO BHVG**. Xidv rszvk
|
||||
op nnfro tgnw mm bnkiz. Ejk cayczwven wgvuf kc xxqm wzfl kmf'd ccqojeul.
|
||||
* **QQDTHX JEQ MHZY SOZV CPS RPFH 2 QXOIRUV UNOBZ OAEMAUIW JNPH ZGWV** zsq
|
||||
udvd zrgwz pr **ZQIMQ WWDU *MY OZXGB*!** Qxz nprpjxwjr glqyk ty ftpl pnbg
|
||||
eft's qkwcovvp.
|
||||
|
||||
* Yvxv azt fmowkx imo hlwyy ggdfrud rudp orfb jccxnkhj lwvug ds g fgn; dtq
|
||||
pu'k wrdkfswowkpdn akjsz op s flo. Te rhi uquycpuwehbr faqc psk vtaaww fet
|
||||
jdhkb ebew 4 imqg wnfvi gkwvx hbyox.
|
||||
* Mnxk xdk kbibqh smc gsefx smwvkwb spau chwa vehijcug hknny xb m yeo; jwi
|
||||
kp'y hfklblqvfyjef ienox lq v lfj. Xa cjs ltswfkecadyy rqcy jdq fnyvcn kfm
|
||||
rwzyb bbso 4 rtxi mgvpa xrnnw avfuu.
|
||||
|
||||
* Tpa yciv **PEEES YXJF** gee rzxp tklhtz; zaq rpxbc'a ulfh an cb zuhwdv fvesvpz
|
||||
qjf ndwwo sabd wnt iuk M dscp wczssl gotz vkpo dyuyfi cqa pboy nos op
|
||||
lvtsnwqqq peux Q ntodc ladtcquqk hzkgv snet zuw qzko xytmqq uua. Do gva adgb
|
||||
za elwcc hgb azqvg **XB PFW KUWOKU *UACJHMZHTO* VH U M!**
|
||||
* Abt **YDEVP CQIF**. Cr'z fmwo algdbn skx wgllkphxd ekyq zvmw omp pbrw okkj
|
||||
eq ymc abs rrxm kf rpyowrrzpd hhqmghcw.
|
||||
|
||||
* Ipu tuff **LKMX UYIUMYY IIXXCQF**! Nx **EWM AZM oksxxgzli ubmesfo!**
|
||||
* Pot ptwn **KALH IDDRFXY HCJCYOY**! Ua **WZM PDI zycpgifso yrfseir!** Slm
|
||||
ojjjfpqas dpja ymqz hgme blxz lj w ubvhu ubibcpl.
|
||||
|
||||
|
||||
## Bxev Jdqgakanqgi
|
||||
## Lkhn Muyeclqkhfj
|
||||
|
||||
* 3 qn axeapxjbjae (Hnwtc'q) vkbsxbdwz
|
||||
* 2 dum 1/4 ixav arwsd
|
||||
* 2 cgwl febmuo lahn
|
||||
* 1/2 zhi esbb
|
||||
* 2 zwn 1/4 mgst lkextt zeyhi kpteo
|
||||
* 3 asbc
|
||||
* 1 gxq 1/2 kjx lmrfjgn
|
||||
* 1/2 jezm eywlkzrmx
|
||||
* 1 sqj (odwiwel) fgiks
|
||||
* 1 dbm ukpg kymgx
|
||||
* 3 ij sphaasygslw (Kuxab'w) spjfrjscx
|
||||
* 2 zwn 1/4 mgst kixgo
|
||||
* 2 dztj gcswmv wftn
|
||||
* 1/2 kfd wmdh
|
||||
* 2 exz 1/4 oxkm byxyml qbqhy lyarc
|
||||
* 3 klqu
|
||||
* 1 oex 1/2 xkk nuqwohr
|
||||
* 1/2 kjoi eggmtcxah
|
||||
* 1 ymd (ezczewx) cjyxn
|
||||
* 1 okd gtpk tqptw
|
||||
|
||||
|
||||
## Stzc Ejvnfuuujpw
|
||||
## Styv Dlgzzcxqwqc
|
||||
|
||||
1. Wmbxmgn bchizw **CTM 9 M 1.5 PYPM HXWSS OHWA**; rfzlhnw bzrf phkq tspnv.
|
||||
1. Hpsuwwl qzdzds **BTP 9 T 1.5 THJY OUEAZ MSPK**; wbfdfwn vgwf dsgj dwwxm.
|
||||
|
||||
2. Quzyqgg mndh ay **350 V (176.67 Y)**.
|
||||
2. Wntwyhp vzpo nz **350 B (176.67 G)**.
|
||||
|
||||
|
||||
## Acxh Cnzuioswgn
|
||||
## Sfoh Cuowxappml
|
||||
|
||||
1. Srgb **3 RM ILZIVPKPOGY QRTLKSVDZ** gl ixmgsh dhduql ec mjdtg khla rmyc
|
||||
**eam (*YPQ QCO TVRRJPV*) hfqbe**; zcg rdhc tjskqp yovvnlgjke.
|
||||
1. Zznj **3 ZY EGQOQFLNMBQ UPQOGMOMG** sk lcctfu jyzwku wn kqjbn ehjx fqcf
|
||||
**rvw (*NWO SMB OUGOZMF*) hfrve**; hoj nwts arrjgm cnwbgnrklm.
|
||||
|
||||
2. Cavg **2 1/4 HPQQ HYNAS**, **2 HJK ZWWRHS FQMK**, htb **1/2 UBY LYMB**
|
||||
2. Rvqj **2 1/4 USKR DUAES**, **2 AYS LJVMUL CJLI**, gqc **1/2 FKI QGGI**
|
||||
|
||||
3. Rieu **1 RNKWM KTCLRFSRM** fe hcxam xrbk *rhbth jple*. Camfy **YXZPMFVKV**.
|
||||
3. Khuy **1 ZSDNR GUHVDJNQJ** dq vkfdf wxny *ysejg tmty*. Xdpgu **VPODNVAPM**.
|
||||
|
||||
4. Rjx **2 1/4 TCXM AXMPPJ UUBJL EIDPS** lol **3 QDOU**. Eznd bffvi dknzb fck
|
||||
oiolhx.
|
||||
4. Etx **2 1/4 WEZB WZMCLS ESRGC UIBDM** zhk **3 JDPT**. Usla ikioq kapae ihl
|
||||
mjljyu.
|
||||
|
||||
5. Gfty am **1 1/2 UNG IJCHMHO** olk **ODBYTO JWEDRH XKTTZKSJN**.
|
||||
5. Agrb gy **1 1/2 QTM LBCSGNI** xjm **PLZUYI RSRNLP OCASZBXWB**.
|
||||
|
||||
6. Tdwk vd xqj yjhwhbtykze hangbeoihbu tgfb **1 MET GQPB GWXUZ**; kmtqnv grvq
|
||||
paifo ognkkg.
|
||||
6. Vpwg bk zgw mbjyptsvdbv khesialvujt sukg **1 YAG MGLQ QJGRE**; malvuk hcwi
|
||||
eqzlw afrcuk.
|
||||
|
||||
7. Ihhl zq **1 VOI _ZTXPHPK_ DUACP**.
|
||||
7. Zmqa fo **1 LMC _ASKYDSJ_ AQIOY**.
|
||||
|
||||
8. Exbq lfrt sjjdezsw eyfr.
|
||||
8. Jrrm fukc ivjusgyw xtrj.
|
||||
|
||||
9. Ybjf vrw **XBJQ 35 WADWLDY** (**UF GEJCDC!**) vw **350 E (176.67 Y)**.
|
||||
9. Ewxy tlk **LDTO 35 LXPBFWZ** (**FZ XXRNKP!**) tc **350 B (176.67 Z)**.
|
||||
|
||||
10. Cagl rrg fsrg lmc rzhh ymk xap cdo jgew vtiu ze e jsmhtue geix iub **QNR
|
||||
WQQZWHE _AFFJ_ NLI _XJCE PIAKXZEXXQX GZLO HFSQA CWM_ FH QP HYGL**. Pgz **JLFY
|
||||
_UXHYJPWSCM_**.
|
||||
10. Xave gek vsnb lda izxq twc hcm mth szmk klax sb i evhgjlv aemb bqh **DPN
|
||||
AXQCWLM _JCQG_ QFX _QEQJ QDNIXMVJCJK WZOC QRFKI XCV_ SB MH ZYYD**. Crv **XNXY
|
||||
_GADKOGINCK_**.
|
||||
|
||||
|
||||
## Xzeyt Jpqjrfawjgr
|
||||
## Egxew Lumwamdxfxo
|
||||
|
||||
* 4 vo hwlycxzjjbl fdmmrpzqf (Rzucf'i zsclsyefs)
|
||||
* 1/2 acn pgmuejvks
|
||||
* 4 htok ivoinafy cwlqt
|
||||
* 1/2 dkc upjvv dmta
|
||||
* 2 dkt czlomeq
|
||||
* 4 ty dzvyiahsyav nqlhbtgvq (Ezvsl'n sdedvamay)
|
||||
* 1/2 scm czudkqtzo
|
||||
* 4 xsqj dsvucidj zsfqa
|
||||
* 1/2 lgn jxyin lgnh
|
||||
* 2 eim oxyyfub
|
||||
|
||||
Qsm puet jpjw yozy i qltyfm zpw yp pquf yqjl zhy zwxh xpm oqyxm colc mqw zlfgm
|
||||
maxu jze ydq ys.
|
||||
Nhb ivov qdyl wgsp i svaobp arb tu ksdw yiux wqy vxzw yqq ikftv bzln cwb qxjaw
|
||||
knak mdf rtr oo.
|
||||
|
||||
## Isbtwkh asbtj zpz yaq jhtip
|
||||
## Lhjkeun frssa zro gwx mynfv
|
||||
|
||||
**CWD KJWFW KGDNVSEXL BR SUOMV:**
|
||||
**XFL ZBUDR EQLBTZQTQ XS INUWV:**
|
||||
|
||||
* **Tryx crmg** zwfw gfg nrjqvf eckiizviv pdu zsqjckzcq edlq pce opc tuheo.
|
||||
* **Zsmv vdvb** nqih amz nhkcwy wadsvdjlo hgy okkhpkmha mmqv hcn jwh duxlq.
|
||||
|
||||
* Lva ylon #4 ajp **8 jf 10 NBJ PBRSC** oe j bzp lf pfz scjy (mebj'q eyx
|
||||
bmiwct jbve jjeyarj qiks gwd imq km bc). Pko js qklz ii sovgw yle qdzf dzm
|
||||
swx felm rolc xru qvgia at mkx mym ag uqnn ev ann dkble. **LS WBW MLA PDJ
|
||||
FIQYK DVN MGC!**
|
||||
* Tbn omol #4 fno **8 nf 10 OEV AMHHG** cj k hhg wz vce xhzx (exop'n ouv
|
||||
lotkso nred oyrikuy oera asd buf tc tz). Zkn to sizd je yinsj uan qpoa alu
|
||||
hzc rrdt ftiy lov eycyo bf eyf rff zj luiz ds kzr fsjzn. **ZQ EYE IRQ OMW
|
||||
SAWJE ZGE XIH!**
|
||||
|
||||
* **YD USW DKV CQJYN RZE HPC OMPDP.**
|
||||
* **PS XFE APB USBZX LWP HFD UCYRW.**
|
||||
|
||||
* Tgg **KFCEI JVDR.**
|
||||
* Mcb **VGFQP TWCW.**
|
||||
|
||||
* Zgq **BJSW YTSJ CFMTXCQ CAPSXVN**! **BF HUM GUZ VAMFVBKQI CUEQEQO!**
|
||||
* Yvf **NGFG EGDQ TJQMDKJ ANEJHWJ**! **VG RFO DYI THPYZXODB GRGURTF!** Ltg
|
||||
jlyvbaegw nlym pnkp yapi uagx ag p uynwm ciyyqgu. Va Q kaitwt yns jtgdp gzv
|
||||
megpm k umq rbtah (erv prmmy vrdu) ltn doxzo iw njl tlcpxqhfv iijvokf. Vlvq
|
||||
zyt'm eq ne.
|
||||
|
||||
|
||||
## Ezfxs Krygxnlfzy
|
||||
|
||||
## Cogmf Kyyimvolla
|
||||
|
||||
|
||||
1. Wjbkpcn **4 UL SBODWGEILXH AVLRDEWZR** itv **1/2 MHR LXHOINLWA** ww urx.
|
||||
Phae qbq owczts heyf sbnl. **WW TZC TGN JY LAP EWHQV.**
|
||||
1. Qmqlgfj **4 PB IFQECKYNENY XMYYRQIIG** kxr **1/2 OXS ZYTZUWKJZ** te hkx.
|
||||
Tpsw bkp bbvpmd jbsa dclv. **TY DNG UPN LO SXJ TXOXH.**
|
||||
|
||||
2. Jlzogbh **3 1/4 NRUP FYDJZOSU VKCHN**, **1/2 GWRU ENSDK LCNF** zge **2 IRO
|
||||
CUEZZHH** zfxy b cqyv. **ZBXD BHIYZ XCGINB**.
|
||||
2. Fulyjip **3 1/4 UWQO KEKAREYE FCVCJ**, **1/2 HPQZ ICGUS UNCS** pkr **2 JJF
|
||||
PNDQWYN** refd j pebk. **KRNB PXUQG MYIHDT**.
|
||||
|
||||
3. Sng tpmoswpvj wljlxpn.
|
||||
3. Ben vlehxxonq jrnadac.
|
||||
|
||||
4. Avp vyei tg dcg/fayy zl wlm uqy iqinb. Qidb yyqx czmxm/vnoyc hcgbr nz'j
|
||||
ukwzh YBY dzs dla bmqkq. **Zvcv _QTTU_ DYEQQ VHVH _OZH_ YIC JVL!** Eos suif mq sp
|
||||
**YVRJ YFQ VBKQ HS'K EP DNRK *zso xeb gja yoh ryfde jom swz***.
|
||||
4. Npl kpff rw uxs/hidb iv hax xwl feriy. Yjrx qufc vvttg/rnzca zyhgk ax'z
|
||||
sgsqy MMN gna leh wfnes. **Pqjh _HRJZ_ FYREZ GEFW _RME_ JQZ HOC!** Rcg caar rp ns
|
||||
**ALLQ EMH REBU RE'K DW TBZV *zcm rph agi jtn uemqw xyx ztu***.
|
||||
|
||||
[gmnyhqv]: wltp.xud
|
||||
[gzhk://qha.gumehrzfisccunmp.lxk/qjhlhoe.nox]: ufct://mxv.dkwwxlpuaonoeyzg.mpn/xhsgnaa.csw
|
||||
[QNWDJ huv wdagtgyxt]: lnzs://nkb.mrvw.hqc/dmdeguynf/200103068.ysc
|
||||
[Hgztzjmcxcaln Inklvsui Lwneezxny Rlpm Rranfox zzhqz]: tbysv://zac.dhkplaq.ntv/ujl/20200805053007/zoihe://unrrgfy.zgt/lrzqcbzgipear/hfeppw/1290520266087571458
|
||||
[hxspys PMUYM xrdgae Jcqp Hxujelbfd CdbJrl]: swcsq://nfwind.nad/wstcgdswfwpzj
|
||||
[ZkoUjr]: udcvo://hgrzdw.zkp/avurdvxwccqhq
|
||||
[TVRIB tugl kwocpl xaxwf]: pydgi-gvmp.zql
|
||||
[lydudblbfw NFC]: rquck://rpc.hwintwkrrcgki.qqu/vztqxnqkg-svjr/
|
||||
[uqonacz]: uctq.orc
|
||||
[lmic://yhk.igaleqhzffjougqz.ugl/eikvkgo.dad]: cjjr://tls.wvrtpwmseetslnyb.oms/ydqemgj.bpw
|
||||
[ZWIJO vcf hphgbculg]: uitxr-zhn-teanagqcm.bwq
|
||||
[Xcasjgwuktrlz Worsfzmy Mjlzkgiyb Ynyy Aloccti xqwjc]: jashh://zvf.xovihnj.yyc/kym/20200805053007/ufwqb://gegfjfj.jmc/mmgmjtdmjiyiq/wsrxyc/1290520266087571458
|
||||
[wnmscm CKVQU fslroq Pjci Xnlvjttag UjqJex]: ldkck://xkwdhd.mdj/enafxnereixva
|
||||
[UczZnx]: snvqe://pcvbzn.mri/yvtxrlnmstpvr
|
||||
[YXBEI nyva fsqumd ebxtb]: ocymw-bwsh.gcw
|
||||
[swdxhyjlnw GIH]: dbhar://hhn.gdpcomrxadvrl.bpx/vzsbfnuwj-nglz/
|
||||
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
(l) Vhbjweppn 1984-2020, [Qaa Sdcxtqlp, Zexxh Mdbwin, Swuoem Abcn Itme][vqadqk] - Iup jpmdsj zggncefh
|
||||
Pllg kqos xm rbkzlftp rdeiv x [Yabpives Ryqtfac Qkhupdxulse-XdubkBmnuv 3.0 Mhbdqgwm Kvlggnk][vt].
|
||||
(b) Hinatetij 1984-2020, [Rqw Rbzvtoyn, Bqjkf Zrqkvd, Hcjuni Ubgw Dyhh][ppeuwz] - Gph kzaafm ttxqgljj
|
||||
Qacb lvmv ld tndtbatr ocwzp b [Tokmuqsw Ptqokdm Fhullstraec-GothcMaeoz 3.0 Oovhdvgr Uqdguuc][yp].
|
||||
|
||||
[qrtujq]: mopa://ugu.ofmdp.zvq/torvtb.kknr
|
||||
[ep]: pzix://zovffvejflxjiln.egm/hzewgnwz/cc-vo/3.0/
|
||||
[cbekvp]: flhyr://fhn.rgqui.tzo/hcodlt.tpho
|
||||
[xi]: dvsb://foorzdlavdtxrom.but/kmvwhdpf/oh-ny/3.0/
|
||||
-----------------------------------------------------------------------------------------------------
|
||||
Binary file not shown.
@@ -1,616 +0,0 @@
|
||||
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional //EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="GENERATOR" content="mkd2html 2.2.2">
|
||||
<meta http-equiv="Content-Type"
|
||||
content="text/html; charset=utf-8"> <link rel="stylesheet"
|
||||
type="text/css"
|
||||
href="../hint.css" />
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<CENTER>
|
||||
<IMG SRC="/png/ioccc.png" ALT="IOCCC" height=78 width=267>
|
||||
<P><FONT size="6"><I>The International Obfuscated C Code Contest</I></FONT></P>
|
||||
<div id="bar">
|
||||
<ul>
|
||||
<li><a href="../index.html">About the 27th IOCCC</a></li>
|
||||
<li><a href="../whowon.html">27th IOCCC Winners</a></li>
|
||||
<li><a href="/index.html">IOCCC home</a></li>
|
||||
<li><a href="/winners.html">List of All Winners</a></li>
|
||||
<li><a href="/judges.html">The Judges</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<P><FONT size="6"><B>Supplemental Info</B></FONT></P>
|
||||
</CENTER>
|
||||
|
||||
|
||||
<h1>The recode configurator documentation (and a fun way to explore my 2020 IOCCC Enigma simulator)</h1>
|
||||
|
||||
<p>N.B. At the end of this file I have given a fun exercise that can be used to
|
||||
explore my Enigma simulator. It’s especially worth doing if you you like
|
||||
good chocolate and could use a delicious <a href="chocolate-cake.html">Double-layered Chocolate Fudge Cake</a>.</p>
|
||||
|
||||
<p>Alternatively if you just want the recipe you could look at my Snake entry
|
||||
‘Don’t tread on me award’ since it’s also there and not enciphered.</p>
|
||||
|
||||
<p><a name="toc"></a></p>
|
||||
|
||||
<ul>
|
||||
<li><p><a href="#recode">What is recode and why is it recommended?</a></p></li>
|
||||
<li><p><a href="#options">Options</a></p>
|
||||
|
||||
<ul>
|
||||
<li><p><a href="#samefile">Protecting against the same I/O file</a></p></li>
|
||||
<li><p><a href="#fileoptions">File options parser limitation</a></p></li>
|
||||
<li><p><a href="#validation">-R option validation?</a></p></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p><a href="#pipingtorecode">Piping commands to recode</a></p></li>
|
||||
<li><p><a href="#pipingtoenigma">Piping recode to the Enigma simulator</a></p></li>
|
||||
<li><p><a href="#manuallytest">Manually test the recode program with the Enigma program</a></p></li>
|
||||
<li><p><a href="#onlyconfig">Only write config file</a></p></li>
|
||||
<li><p><a href="#reuseconfig">Reusing a configuration</a></p></li>
|
||||
<li><p><a href="#passtoenigma">Write config file, read data file and pass to Enigma simulator</a></p></li>
|
||||
<li><p><a href="#directlytoenigma">Piping directly to the Enigma code once (with randomised settings, saved)</a></p></li>
|
||||
<li><p><a href="#conclusion">Usage conclusion</a></p></li>
|
||||
<li><p><a href="#additions">Example additions</a></p></li>
|
||||
<li><p><a href="#exampleuses">Example uses</a></p></li>
|
||||
<li><p><a href="#cake">Deliciously Enigmatic: Double-layered Chocolate Fudge Cake</a></p></li>
|
||||
</ul>
|
||||
|
||||
<h1><a name="recode" href="#toc">What is recode and why is it recommended?</a></h1>
|
||||
|
||||
<p>To demonstrate how to and why you should use the recode program with the Enigma
|
||||
simulator I have included some examples here as well as brief (‘brief?!’ I am sure
|
||||
many would think but it’s brief for me) commentary.</p>
|
||||
|
||||
<p>It would not be possible to do all that the recode program does in my entry
|
||||
itself but I wanted to demonstrate the features of my entry and this seemed the
|
||||
best way to do that. It also enhances the use of the simulator to make it
|
||||
reusable etc.</p>
|
||||
|
||||
<p>The recode name idea is that it recodes the input (validating first) to be input
|
||||
for the simulator itself. It can pseudo-randomly select all the settings, it can
|
||||
write the settings to a file, read from input file (e.g. for the text to
|
||||
encipher if piped to the simulator) etc.</p>
|
||||
|
||||
<p>Basically it’s a configurator for the Enigma simulator that makes it easier to
|
||||
use the simulator as well as to reuse the configuration to decipher messages
|
||||
that have been enciphered by those settings. But it also tries to make it look
|
||||
more like the real thing in that it shows the actual rotors (labelling them with
|
||||
the Roman numeral), the reflectors (labelling them with B, C and showing the
|
||||
actual strings) etc.</p>
|
||||
|
||||
<p>In this file I will show an example of each feature and then get to the
|
||||
wonderful ‘challenge’ for everyone.</p>
|
||||
|
||||
<h1><a name="options" href="#toc">Options</a></h1>
|
||||
|
||||
<pre><code> usage: ./recode [options]
|
||||
-v display selected settings
|
||||
-r pseudo-randomly select settings
|
||||
-f<input file> read file for Enigma input
|
||||
-R<string|file> init settings from settings string or file
|
||||
-o<output file> write settings to file
|
||||
</code></pre>
|
||||
|
||||
<p><code>-r</code> randomises settings. It won’t prompt you for settings but it will for input
|
||||
if you don’t give the option to read in a file for input.</p>
|
||||
|
||||
<p><code>-v</code> shows selected settings. For example combining <code>-r</code> and <code>-v</code>:</p>
|
||||
|
||||
<pre><code> $ echo IOCCC | ./recode -r -v
|
||||
Ring 1: ( I) EKMFLGDQVZNTOWYHXUSPAIBRCJ
|
||||
Ring 2: ( V) VZBRGITYUPSDNHLXAWMJQOFECK
|
||||
Ring 3: ( IV) ESOVPZJAYQUIRHXLNFTGKDCMWB
|
||||
Ring settings: WAR
|
||||
Ring positions: XKE
|
||||
Reflector: (B) YRUHQSLDPXNGOKMIEBFZCWVJAT
|
||||
Plugboard pair #01: XE
|
||||
Plugboard pair #02: HJ
|
||||
Plugboard pair #03: SA
|
||||
Plugboard pair #04: PY
|
||||
Plugboard pair #05: CI
|
||||
Plugboard pair #06: ZB
|
||||
Plugboard pair #07: WD
|
||||
Plugboard pair #08: QN
|
||||
Plugboard pair #09: RU
|
||||
Plugboard pair #10: VG
|
||||
1WX5AK4RE1XEHJSAPYCIZBWDQNRUVGIOCCC
|
||||
</code></pre>
|
||||
|
||||
<p>Though you won’t find such strings in recode.c or prog.c. (You will find the
|
||||
Roman numerals for the rotors and the ‘A’ and ‘B’ for the reflectors in recode.c
|
||||
though). Yes the ‘WAR’ for the Ringstellung (Ring settings) is an amusing
|
||||
coincidence <em>but it really did happen!</em></p>
|
||||
|
||||
<p>As for <code>-f</code> the contents would be output with the settings e.g. to pipe to
|
||||
prog itself (as if you redirected the file contents to prog for decipherment).
|
||||
If the file cannot be opened it sets back to stdin.</p>
|
||||
|
||||
<p><code>-o</code> outputs the settings to the file. If the file cannot be opened for writing
|
||||
or is the same file name (see below) then only stdout will be used. Example of
|
||||
randomised output going to a file:</p>
|
||||
|
||||
<pre><code> $ ./recode -r -oconfig
|
||||
IOCCC
|
||||
3PP4UB5GG1ELGTKFCOPVBNUYXJAWSDIOCCC
|
||||
$ cat config
|
||||
3PP4UB5GG1ELGTKFCOPVBNUYXJAWSD$
|
||||
</code></pre>
|
||||
|
||||
<p>Notice that a terminating newline isn’t added. Also note that it outputs to
|
||||
stdout so you can pipe it to prog but at the same time have the settings
|
||||
saved for deciphering the text later (the configuration does not have the input
|
||||
but both the configuration and the input text is printed to stdout).</p>
|
||||
|
||||
<p>If you want to initialise the settings from previously saved settings (as a
|
||||
string or an input file that has the same format) use the <code>-R<settings></code> option.
|
||||
Again note that this does not validate input! Although it detects out of range
|
||||
for the arrays it doesn’t detect duplicates. This is because it wasn’t meant to
|
||||
be any given file nor anything but the direct output of a previous run (thus
|
||||
validated). I’m not even guaranteeing that I got the array tests valid in
|
||||
recode.c -R option!</p>
|
||||
|
||||
<h2><a name="samefile" href="#toc">Protecting against the same I/O file</a></h2>
|
||||
|
||||
<p>Because some file systems are case-insensitive I have implemented a
|
||||
case-insensitive strcmp(); if the input file name is the same as the output file
|
||||
name I won’t write to it. From a quick test this is important particularly if
|
||||
neither file exist because if both calls to stat() fail then the inodes will be
|
||||
the same (since what else could they be set to but the same initial value?).
|
||||
This might be overprotective but I believe it better to prevent user error where
|
||||
possible. Of course if neither file exists it might be argued that it’s not
|
||||
necessary to worry since you can’t read from a file that doesn’t exist. But then
|
||||
what about if one exists but the other does not?</p>
|
||||
|
||||
<h2><a name="fileoptions" href="#toc">File options parser limitation</a></h2>
|
||||
|
||||
<p>Due to the way the parsing of options is done (no spaces between option char and
|
||||
argument) shell expansion will not work right so for example doing:</p>
|
||||
|
||||
<pre><code>$ ./recode -R~/config
|
||||
</code></pre>
|
||||
|
||||
<p>Will not read the file ‘config’ in the home directory. I show another way to
|
||||
achieve this later.</p>
|
||||
|
||||
<p>This limitation also applies to the <code>-f</code> and <code>-o</code> options!</p>
|
||||
|
||||
<h2><a name="validation" href="#toc">-R option validation?</a></h2>
|
||||
|
||||
<p>Again the <code>-R</code> option does not validate input. For validation you have to run
|
||||
the program interactively.</p>
|
||||
|
||||
<h1><a name="pipingtorecode" href="#toc">Piping commands to recode</a></h1>
|
||||
|
||||
<p>If stdin is not a tty (<code>!isatty(0)</code>) and neither randomised mode nor reading in
|
||||
from a file is specified then you might just see something like:</p>
|
||||
|
||||
<pre><code> $ echo testing test tests | ./recode
|
||||
1AB2BB3CC1testing test tests
|
||||
|
||||
$ echo testing test tests | ./recode | ./prog - 2>/dev/null
|
||||
mfrwxan lzng ofnlu
|
||||
|
||||
$ echo testing test tests | ./recode | ./prog - 2>/dev/null | ./recode
|
||||
1AB2BB3CC1mfrwxan lzng ofnlu
|
||||
|
||||
$ echo testing test tests | ./recode | ./prog - 2>/dev/null | ./recode | ./prog - 2>/dev/null
|
||||
testing test tests
|
||||
</code></pre>
|
||||
|
||||
<p>In other words just the defaults. This was to simplify the problems with
|
||||
prompting again for input if it’s invalid (though as you’ll see it does a good
|
||||
job at this anyway).</p>
|
||||
|
||||
<h1><a name="pipingtoenigma" href="#toc">Piping recode to the Enigma simulator</a></h1>
|
||||
|
||||
<p>If you’re using recode to recode the input so you don’t have to type in the
|
||||
input manually (if you randomise or read in from previously saved file no input
|
||||
need be done at all) then make sure to redirect stderr to /dev/null. If you
|
||||
don’t you might see something like:</p>
|
||||
|
||||
<pre><code> $ ./recode -r | ./prog -
|
||||
Ring 1: IOCCC
|
||||
Setting 1: Position 1: Ring 2: Setting 2: Position 2: Ring 3: Setting 3: Position 3: Reflector: Plugboard pair 1: Plugboard pair 2: Plugboard pair 3: Plugboard pair 4: Plugboard pair 5: Plugboard pair 6: Plugboard pair 7: Plugboard pair 8: Plugboard pair 9: Plugboard pair 10: DEVIY
|
||||
</code></pre>
|
||||
|
||||
<p>What happened is that <code>Ring 1:</code> is printed to stderr but since it’s not been
|
||||
redirected to /dev/null it prints this out; at this point however it prompts for
|
||||
input. Why or how it shows the first prompt instead of later on I do not know.
|
||||
Anyway at this point the simulator is already expecting input to en/decipher.
|
||||
That’s why after I sent EOF it printed out the remaining strings to stderr.</p>
|
||||
|
||||
<h1><a name="manuallytest" href="#toc">Manually test the recode program with the Enigma program</a></h1>
|
||||
|
||||
<pre><code> $ cat input
|
||||
IOCCC
|
||||
|
||||
$ ./recode -finput
|
||||
Rotors:
|
||||
(1) I: EKMFLGDQVZNTOWYHXUSPAIBRCJ
|
||||
(2) II: AJDKSIRUXBLHWTMCQGZNPYFVOE
|
||||
(3) III: BDFHJLCPRTXVZNYEIWGAKMUSQO
|
||||
(4) IV: ESOVPZJAYQUIRHXLNFTGKDCMWB
|
||||
(5) V: VZBRGITYUPSDNHLXAWMJQOFECK
|
||||
Input rotor 1 (1 - 5): 1
|
||||
Input rotor 2 (1 - 5): 2
|
||||
Input rotor 3 (1 - 5): 3
|
||||
Input setting 1 (A - Z): A
|
||||
Input setting 2 (A - Z): A
|
||||
Input setting 3 (A - Z): A
|
||||
Input position 1 (A - Z): A
|
||||
Input position 2 (A - Z): A
|
||||
Input position 3 (A - Z): A
|
||||
Reflector:
|
||||
(1) (B) YRUHQSLDPXNGOKMIEBFZCWVJAT
|
||||
(2) (C) FVPJIAOYEDRZXWGCTKUQSBNMHL
|
||||
Input reflector (1 - 2): 2
|
||||
Input plugboard pair 1: AB
|
||||
Input plugboard pair 2: CD
|
||||
Input plugboard pair 3: ..
|
||||
Input plugboard pair 4: EF
|
||||
Input plugboard pair 5: GH
|
||||
Input plugboard pair 6: IJ
|
||||
Input plugboard pair 7: KL
|
||||
Input plugboard pair 8: MN
|
||||
Input plugboard pair 9: OP
|
||||
Input plugboard pair 10: QR
|
||||
1AA2AA3AA2ABCD..EFGHIJKLMNOPQRIOCCC
|
||||
</code></pre>
|
||||
|
||||
<p>Notice that I skipped a plugboard pair; this can be done in a number of ways but
|
||||
two dots is one. Notice also that it’s in a different order than the simulator:
|
||||
because with the size restrictions on my entry I saved bytes by using the same
|
||||
loop where I could. It just felt more natural to have them grouped together in a
|
||||
configurator for the simulator.</p>
|
||||
|
||||
<pre><code> $ echo 1AA2AA3AA2ABCD..EFGHIJKLMNOPQRIOCCC | ./prog - 2>/dev/null
|
||||
HQNVO
|
||||
$ echo 1AA2AA3AA2ABCD..EFGHIJKLMNOPQRIOCCC | ./prog - 2>/dev/null | echo 1AA2AA3AA2ABCD..EFGHIJKLMNOPQRHQNVO | ./prog - 2>/dev/null
|
||||
IOCCC
|
||||
</code></pre>
|
||||
|
||||
<p>As you can see the recode program prompts for the settings and outputs the
|
||||
input for the Enigma program. I then copied/pasted that output to the program
|
||||
and got the result HQNVO.</p>
|
||||
|
||||
<p>Following this I piped the original output (of recode) to the simulator and then
|
||||
piped that to the echo of the input settings (replacing the IOCCC with the
|
||||
Enigma enciphered output) and then got the result IOCCC: the original input!
|
||||
(This was before I implemented the <code>-R</code> option to greatly simplify things.)</p>
|
||||
|
||||
<p>Of course the last command was redundant in that I didn’t need to show the first
|
||||
part again; I could have just done the latter part but I wanted to show the way
|
||||
the pipeline works with settings etc.</p>
|
||||
|
||||
<p>What happens if the plugboard pairs are the same but in a different order? It’s
|
||||
the same output:</p>
|
||||
|
||||
<pre><code> $ echo 1AA2AA3AA2AB..CDEFGHIJKLMNOPQRIOCCC|./prog - 2>/dev/null
|
||||
HQNVO
|
||||
</code></pre>
|
||||
|
||||
<p>Also if you flip the order of the letters in the pair e.g. the AB as BA instead:</p>
|
||||
|
||||
<pre><code> $ echo 1AA2AA3AA2BA..CDEFGHIJKLMNOPQRIOCCC|./prog - 2>/dev/null
|
||||
HQNVO
|
||||
</code></pre>
|
||||
|
||||
<h1><a name="onlyconfig" href="#toc">Only write config file</a></h1>
|
||||
|
||||
<pre><code> $ ./recode -v -oconfig -finput >/dev/null
|
||||
Rotors:
|
||||
(1) I: EKMFLGDQVZNTOWYHXUSPAIBRCJ
|
||||
(2) II: AJDKSIRUXBLHWTMCQGZNPYFVOE
|
||||
(3) III: BDFHJLCPRTXVZNYEIWGAKMUSQO
|
||||
(4) IV: ESOVPZJAYQUIRHXLNFTGKDCMWB
|
||||
(5) V: VZBRGITYUPSDNHLXAWMJQOFECK
|
||||
Input rotor 1 (1 - 5): 1
|
||||
Input rotor 2 (1 - 5): 2
|
||||
Input rotor 3 (1 - 5): 3
|
||||
Input setting 1 (A - Z): A
|
||||
Input setting 2 (A - Z): C
|
||||
Input setting 3 (A - Z): E
|
||||
Input position 1 (A - Z): B
|
||||
Input position 2 (A - Z): D
|
||||
Input position 3 (A - Z): F
|
||||
Reflector:
|
||||
(1) (B) YRUHQSLDPXNGOKMIEBFZCWVJAT
|
||||
(2) (C) FVPJIAOYEDRZXWGCTKUQSBNMHL
|
||||
Input reflector (1 - 2): 2
|
||||
Input plugboard pair 1: AB
|
||||
Input plugboard pair 2: CD
|
||||
Input plugboard pair 3: EF
|
||||
Input plugboard pair 4: GHIJ
|
||||
Input plugboard pair 5: IJ
|
||||
Input plugboard pair 6: KL
|
||||
Input plugboard pair 7: MN
|
||||
Input plugboard pair 8: OP
|
||||
Input plugboard pair 9: QR
|
||||
Input plugboard pair 10: ST
|
||||
Ring 1: ( I) EKMFLGDQVZNTOWYHXUSPAIBRCJ
|
||||
Ring 2: ( II) AJDKSIRUXBLHWTMCQGZNPYFVOE
|
||||
Ring 3: (III) BDFHJLCPRTXVZNYEIWGAKMUSQO
|
||||
Ring settings: ACE
|
||||
Ring positions: BDF
|
||||
Reflector: (C) FVPJIAOYEDRZXWGCTKUQSBNMHL
|
||||
Plugboard pair #01: AB
|
||||
Plugboard pair #02: CD
|
||||
Plugboard pair #03: EF
|
||||
Plugboard pair #04: GH
|
||||
Plugboard pair #05: IJ
|
||||
Plugboard pair #06: KL
|
||||
Plugboard pair #07: MN
|
||||
Plugboard pair #08: OP
|
||||
Plugboard pair #09: QR
|
||||
Plugboard pair #10: ST
|
||||
</code></pre>
|
||||
|
||||
<p>Notice that I redirect stdout to /dev/null so that the config is only written to
|
||||
the file config. But also notice that for plugboard pair 4 I typed in <code>GHIJ</code> and
|
||||
it didn’t report an error. Neither did it complain about <code>IJ</code> in the next pair.
|
||||
This is because it consumes input overflow.</p>
|
||||
|
||||
<p>It shouldn’t be this way for the simulator though because that could cause
|
||||
inconsistent number of characters expected before the text to encipher.</p>
|
||||
|
||||
<pre><code> $ cat config
|
||||
1AB2CD3EF2ABCDEFGHIJKLMNOPQRST
|
||||
|
||||
$ ( cat config ; cat input ) | ./prog - 2>/dev/null
|
||||
LRAVE
|
||||
|
||||
$ ( cat config ; cat input ) | ./prog - 2>/dev/null | ( cat config ; echo LRAVE ) | ./prog - 2>/dev/null
|
||||
IOCCC
|
||||
</code></pre>
|
||||
|
||||
<p>What if you don’t want to worry about having to specify input but just have the
|
||||
settings written? You can do that too by either sending a newline or else
|
||||
directly type ctrl-d (or whatever you have EOF set to) or give it an empty file.</p>
|
||||
|
||||
<p>The following are all equivalent in that they will write to a settings file (the
|
||||
first one will print a newline with the echo but that won’t matter):</p>
|
||||
|
||||
<pre><code> $ echo | ./recode -r -osettings
|
||||
$ echo -n | ./recode -r -osettings
|
||||
$ > empty
|
||||
$ ./recode -r -osettings < empty
|
||||
$ cat empty | ./recode -r -osettings
|
||||
$ ./recode -r -osettings
|
||||
^D
|
||||
</code></pre>
|
||||
|
||||
<p>(Above ^D was not shown but I typed it.) The way it works: if nothing is read
|
||||
the buffer remains NULL and so I don’t print it but still do print the settings
|
||||
file. Actually even if getdelim() fails you’re supposed to free the buffer so I
|
||||
set another variable to indicate if it should be printed.</p>
|
||||
|
||||
<h1><a name="reuseconfig" href="#toc">Reusing a configuration</a></h1>
|
||||
|
||||
<pre><code> $ echo -n|./recode -r -oconfig
|
||||
4UH5II1RJ1SPIFEJLYGZWRTBHVCAMN$
|
||||
|
||||
$ cat input.txt
|
||||
IOCCC 2020 Enigma simulator example text file
|
||||
|
||||
This is a sentence.
|
||||
|
||||
This is another sentence.
|
||||
|
||||
$ ( cat config ; cat input.txt ) | ./prog - 2>/dev/null > output
|
||||
$ cat output
|
||||
AAPRT 2020 Dkemny tpgnjsjai xpovrgl jvgs wxra
|
||||
|
||||
Fytt ly m xyiilaqh.
|
||||
|
||||
Ybbp ox dmuzerm oscwgytb.
|
||||
$ ( cat config ; cat output ) | ./prog - 2>/dev/null > io
|
||||
$ diff io input.txt
|
||||
$
|
||||
</code></pre>
|
||||
|
||||
<p>Alternatively you can just use the <code>-R</code> and <code>-f</code> options:</p>
|
||||
|
||||
<pre><code> $ ./recode -finput.txt -Rconfig | ./prog - 2>/dev/null > output2
|
||||
$ diff output output2
|
||||
$
|
||||
</code></pre>
|
||||
|
||||
<h1><a name="passtoenigma" href="#toc">Write config file, read data file and pass to Enigma simulator</a></h1>
|
||||
|
||||
<pre><code> $ ./recode -finput.txt -oconfig | ./prog - 2>/dev/null > output
|
||||
Rotors:
|
||||
(1) I: EKMFLGDQVZNTOWYHXUSPAIBRCJ
|
||||
(2) II: AJDKSIRUXBLHWTMCQGZNPYFVOE
|
||||
(3) III: BDFHJLCPRTXVZNYEIWGAKMUSQO
|
||||
(4) IV: ESOVPZJAYQUIRHXLNFTGKDCMWB
|
||||
(5) V: VZBRGITYUPSDNHLXAWMJQOFECK
|
||||
Input rotor 1 (1 - 5): 2
|
||||
Input rotor 2 (1 - 5): 5
|
||||
Input rotor 3 (1 - 5): 3
|
||||
Input setting 1 (A - Z): C
|
||||
Input setting 2 (A - Z): O
|
||||
Input setting 3 (A - Z): D
|
||||
Input position 1 (A - Z): E
|
||||
Input position 2 (A - Z): L
|
||||
Input position 3 (A - Z): O
|
||||
Reflector:
|
||||
(1) (B) YRUHQSLDPXNGOKMIEBFZCWVJAT
|
||||
(2) (C) FVPJIAOYEDRZXWGCTKUQSBNMHL
|
||||
Input reflector (1 - 2): 2
|
||||
Input plugboard pair 1: TR
|
||||
Input plugboard pair 2: SN
|
||||
Input plugboard pair 3: OG
|
||||
Input plugboard pair 4: ME
|
||||
Input plugboard pair 5: XY
|
||||
Input plugboard pair 6: WZ
|
||||
Input plugboard pair 7: UV
|
||||
Input plugboard pair 8: AB
|
||||
Input plugboard pair 9: CD
|
||||
Input plugboard pair 10: FI
|
||||
|
||||
$ cat config
|
||||
2CE5OL3DO2TRSNOGMEXYWZUVABCDFI
|
||||
</code></pre>
|
||||
|
||||
<p>Besides a famous book that I happen to love (who doesn’t? Ah, but what is it
|
||||
Cody?) there’s also a reference to code which I also love (just as all
|
||||
participants of the IOCCC do). But what matters is the output:</p>
|
||||
|
||||
<pre><code> $ cat output
|
||||
DBFAF 2020 Ittejg ltblwriac uqdfqvr dhqh ghhf
|
||||
|
||||
Jsjy ce v pxdmullo.
|
||||
|
||||
Sara tj rtaayak uxfhjcti.
|
||||
|
||||
$ ./recode -Rconfig -foutput | ./prog - 2>/dev/null
|
||||
IOCCC 2020 Enigma simulator example text file
|
||||
|
||||
This is a sentence.
|
||||
|
||||
This is another sentence.
|
||||
</code></pre>
|
||||
|
||||
<h1><a name="directlytoenigma" href="#toc">Piping directly to the Enigma code once (with randomised settings, saved)</a></h1>
|
||||
|
||||
<p>This is like the above only randomised:</p>
|
||||
|
||||
<pre><code> $ ./recode -r -oconfig|./prog - 2>/dev/null
|
||||
IOCCC
|
||||
UGEVP
|
||||
</code></pre>
|
||||
|
||||
<p>Note that I typed in IOCCC and sent EOF (ctrl-d); the settings were written to
|
||||
the config file (for deciphering later) and then all of it was piped to the
|
||||
Enigma entry resulting in the line below IOCCC. But let’s verify it worked out
|
||||
okay:</p>
|
||||
|
||||
<pre><code> $ cat config
|
||||
2BM4GJ3HK1LNCBXWRMGKSYIAZUTPVJ
|
||||
</code></pre>
|
||||
|
||||
<p>Without having to copy/paste intermediate results:</p>
|
||||
|
||||
<pre><code> $ echo IOCCC | ./recode -Rconfig | ./prog - 2>/dev/null | ./recode -Rconfig | ./prog - 2>/dev/null
|
||||
IOCCC
|
||||
</code></pre>
|
||||
|
||||
<p>You can also use a string for the <code>-R</code> option. I’ll use command substitution and
|
||||
actual pasting to demonstrate:</p>
|
||||
|
||||
<pre><code> $ echo IOCCC | ./recode -R$(cat config) | ./prog - 2>/dev/null | ./recode -R2BM4GJ3HK1LNCBXWRMGKSYIAZUTPVJ | ./prog - 2>/dev/null
|
||||
IOCCC
|
||||
</code></pre>
|
||||
|
||||
<h1><a name="conclusion" href="#toc">Usage conclusion</a></h1>
|
||||
|
||||
<p>That should give you an idea of how to use the recode program. I leave it as
|
||||
an exercise to the reader to implement additional features but here are some
|
||||
ideas of what could be done and how this entry might be used (including that
|
||||
delicious challenge).</p>
|
||||
|
||||
<h1><a name="additions" href="#toc">Example additions</a></h1>
|
||||
|
||||
<ul>
|
||||
<li>Add code (to prog.c) that tries to determine possible decipherments based on
|
||||
a given crib (or set of cribs).</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h1><a name="exampleuses" href="#toc">Example uses</a></h1>
|
||||
|
||||
<ul>
|
||||
<li><p>Take an actual key sheet and message for that day and try and decipher the
|
||||
message (might help if you know German!). I haven’t actually done this for
|
||||
reasons I explained in the remarks (including that I cannot easily verify one
|
||||
particular as well as the fact that there were different procedures, different
|
||||
machines etc. - plus my vision is not good enough for the quality of the
|
||||
pictures).</p></li>
|
||||
<li><p>Try making sense of a politician’s speeches by putting them into the
|
||||
simulator. It might not make much sense but can it honestly be that much worse ?
|
||||
:) Actually yes it could be (and we don’t need the Enigma helping them either)
|
||||
and I can think of a whole host of other things more entertaining including
|
||||
watching dry paint stay dry on a wall but why not poke fun at politicians
|
||||
anyway?</p></li>
|
||||
<li><p>Best idea: try the below experiment!</p></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h1><a name="cake" href="#toc">Deliciously Enigmatic: Double-layered Chocolate Fudge Cake</a></h1>
|
||||
|
||||
<p>As I was making the above silly list something occurred to me. My other entries
|
||||
this year include a recipe for a wonderful double-layered chocolate fudge cake
|
||||
but why would it not be included in this one too? But then if that’s the case
|
||||
why on Earth should it be unscrambled?</p>
|
||||
|
||||
<p>So this is what I offer: if you take one of the settings below and run the
|
||||
simulator on the file <a href="chocolate-cake.html">chocolate-cake.html</a> you will have a wonderful
|
||||
chocolate cake recipe (that even my late stepmum who didn’t even like chocolate
|
||||
loved - it’s a speciality of my mum’s and they were the best of friends too). If
|
||||
you’re lazy just go and look at my other entry. Then again if you’re lazy you’re
|
||||
probably not reading this far! :)</p>
|
||||
|
||||
<p>The settings is one of the below but a couple questions you might ask yourself:</p>
|
||||
|
||||
<ol>
|
||||
<li><p>Are any invalid input?</p></li>
|
||||
<li><p>Is there some other kind of trickery involved here?</p></li>
|
||||
</ol>
|
||||
|
||||
|
||||
<p>I can think of the best way to answer these and I think I need not even mention
|
||||
it. Have fun and enjoy! BTW: Depending on where you are in this world and how
|
||||
warm it is the icing can be a bit of an issue - I give some ideas in the file on
|
||||
what can be done for this. At worst though the icing won’t come out as good as
|
||||
it usually does.</p>
|
||||
|
||||
<p>Hints:</p>
|
||||
|
||||
<ol>
|
||||
<li><p>It’s not the middle one.</p></li>
|
||||
<li><p>Yes there are some things kind of spelt here. These include things about
|
||||
cake and chocolate. Some things spelt mean nothing whatever and can be
|
||||
considered coincidences. Some were randomised.</p></li>
|
||||
<li><p>There is an obscure thing about my entry that can help locate the proper key
|
||||
of the 16 given below! The questions are what is it and is is it worth going
|
||||
this way? (I think the second answer is ‘no’ but that’s me.)</p></li>
|
||||
<li><p>The above points might or might not be relevant. What is relevant is one
|
||||
will reveal a wonderful <a href="chocolate-cake.html">Double-layered Chocolate Fudge Cake</a> recipe:</p>
|
||||
|
||||
<pre><code> 142CHOCOLATESVCAKESTBJLKMUMVWX
|
||||
0EZ4PC1CC0PGTAQSOXWNMDRYKFUZEI
|
||||
3UY0XF4QG1GTJQLARPKHBEMCOFVUIN
|
||||
0WE1HK4PL0RVSGXFDKENZYTPCMAHUW
|
||||
2LV0KC1IE0HTFPCLWOJDBQIRVMEAGN
|
||||
1SS4QX2RY1SRAQGKUYHCBLPFJDVTNZ
|
||||
3IW1QR0TZ0GQEDWIYJUPMFZBRAONHS
|
||||
3OP1KN4MO0HPFZCEAKYQIRXGVMOTUW
|
||||
4OC2CC0AK1CODELUVRSNGKIZBJPTMY
|
||||
4MU0MS1CA1KELUVRSXTABJNOCDMQFG
|
||||
0MU4MC2HO1CLATEFBJMONPQRVWXYZD
|
||||
125CHOCOLATESEXCAKESJADFNOPQRS
|
||||
0CH3OC1OL1ATEMBJNOCDLSIFWHRVXY
|
||||
4MU1MS3CA0KECHOLATBJSNPXVUFGZY
|
||||
4VW0SL1YB0IYJSLBECKTNAXGPUVHRF
|
||||
0MC4OH2CO1LATEUMBJCDFGHINOPRQS
|
||||
</code></pre></li>
|
||||
</ol>
|
||||
|
||||
|
||||
<p>BTW: What’s the middle of a list with even numbered items anyway?</p>
|
||||
<BR>
|
||||
<HR>
|
||||
<TABLE><TR>
|
||||
<TD><a rel="license" href="https://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="/png/by-sa-3.0-88x31.png" /></a></TD>
|
||||
<TD><P>© Copyright 1984-2020,
|
||||
<A HREF="/judges.html">Leo Broukhis, Simon Cooper, Landon Curt Noll</A>
|
||||
- All rights reserved<BR>
|
||||
This work is licensed under a <a rel="license" href="https://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</P></TD>
|
||||
<TD> <!--<a href="https://validator.w3.org/check?uri=referer"><img src="https://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Transitional" height="31" width="88"></a>--></TD>
|
||||
</TR></TABLE>
|
||||
</body>
|
||||
</html>
|
||||
Executable
+124
@@ -0,0 +1,124 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# try.sh - demonstrate IOCCC winner 2020/ferguson2
|
||||
#
|
||||
# I, Cody Boone Ferguson, want to dedicate this entry in part to the millions of
|
||||
# poor souls that were lost during the tragedy that is the Second World War.
|
||||
# There are so many people who are unknown, unloved, unclaimed and even
|
||||
# unidentified. And who knows what they might have gone on to do if their lives
|
||||
# weren't - like it is with all other wars - needlessly taken from them? When
|
||||
# one considers it was all because the most powerful man in the world at the
|
||||
# time felt he should rule all others it makes it somehow even more tragic:
|
||||
# there wasn't even a good reason for the war (is there ever?).
|
||||
#
|
||||
# If one were to write the name of every person who died in the conflict in a
|
||||
# book, it would take so many pages that the book would be so heavy, so long, so
|
||||
# expensive to print and it wouldn't bring anyone back to life nor would it erase
|
||||
# the suffering. Nothing will. It's horrible.
|
||||
#
|
||||
# There really are no words that can truly describe the tragedy but I wish to
|
||||
# with my Enigma simulator honour each and every soul who was lost, or suffered,
|
||||
# or suffered the loss of friends or loved ones, as well as the world itself, in
|
||||
# and from one of the greatest tragedies in the history of mankind.
|
||||
#
|
||||
|
||||
# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it
|
||||
# this way allows us to have the user specify a different compiler in an easy
|
||||
# way.
|
||||
if [[ -z "$CC" ]]; then
|
||||
CC="cc"
|
||||
fi
|
||||
|
||||
make CC="$CC" alt >/dev/null || exit 1
|
||||
|
||||
# clear screen after compilation so that only the entry is shown
|
||||
clear
|
||||
|
||||
# IOCCC obfuscated!
|
||||
read -r -n 1 -p "Press any key to encrypt IOCCC with default settings: "
|
||||
echo 1>&2
|
||||
echo "$ echo IOCCC | ./prog.alt" 1>&2
|
||||
echo IOCCC | ./prog.alt
|
||||
echo 1>&2
|
||||
|
||||
# IOCCC obfuscated and de-obfuscated!:
|
||||
read -r -n 1 -p "Press any key to encrypt and then decrypt IOCCC with default settings: "
|
||||
echo 1>&2
|
||||
echo "$ echo IOCCC | ./prog | ./prog.alt" 1>&2
|
||||
echo IOCCC | ./prog | ./prog.alt
|
||||
echo 1>&2
|
||||
|
||||
# more input fun:
|
||||
read -r -n 1 -p "Press any key to show try.this.txt: "
|
||||
echo 1>&2
|
||||
echo "$ cat try.this.txt" 1>&2
|
||||
cat try.this.txt
|
||||
read -r -n 1 -p "Press any key to encrypt text of try.this.txt with its own settings: "
|
||||
echo 1>&2
|
||||
echo "$ ./prog.alt - < try.this.txt 2>/dev/null" 1>&2
|
||||
echo 1>&2
|
||||
./prog.alt - < try.this.txt 2>/dev/null
|
||||
echo 1>&2
|
||||
|
||||
# more obfuscated fun:
|
||||
read -r -n 1 -p "Press any key to send 'testing test tests' to recode: "
|
||||
echo 1>&2
|
||||
echo "$ echo testing test tests | ./recode" 1>&2
|
||||
echo testing test tests | ./recode
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to send 'testing test tests' to recode -> prog.alt: "
|
||||
echo 1>&2
|
||||
echo "$ echo testing test tests | ./recode | ./prog.alt - 2>/dev/null" 1>&2
|
||||
echo testing test tests | ./recode | ./prog.alt - 2>/dev/null
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to send 'testing test tests' to recode -> prog -> recode: "
|
||||
echo 1>&2
|
||||
echo "$ echo testing test tests | ./recode | ./prog - 2>/dev/null | ./recode" 1>&2
|
||||
echo testing test tests | ./recode | ./prog - 2>/dev/null | ./recode
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to send 'testing test tests' to recode -> prog -> recode -> prog.alt: "
|
||||
echo 1>&2
|
||||
echo "$ echo testing test tests | ./recode | ./prog - 2>/dev/null | ./recode | ./prog.alt - 2>/dev/null" 1>&2
|
||||
echo testing test tests | ./recode | ./prog - 2>/dev/null | ./recode | ./prog.alt - 2>/dev/null
|
||||
echo 1>&2
|
||||
|
||||
# even more obfuscated fun saving and reading from files:
|
||||
#
|
||||
# initial clean up:
|
||||
rm -f conf input output output2
|
||||
# encrypt "testing test tests" with randomised settings saved in conf, saving
|
||||
# original string to input and original output to output:
|
||||
read -r -n 1 -p "Press any key to save settings and output, then encrypt: "
|
||||
echo 1>&2
|
||||
echo "$ echo testing test tests | tee input | ./recode -r -oconf | ./prog - 2>/dev/null >output" 1>&2
|
||||
echo testing test tests | tee input | ./recode -r -oconf | ./prog - 2>/dev/null >output
|
||||
read -r -n 1 -p "Press any key to show input file: "
|
||||
echo 1>&2
|
||||
cat input
|
||||
echo 1>&2
|
||||
read -r -n 1 -p "Press any key to show output file: "
|
||||
echo 1>&2
|
||||
cat output
|
||||
echo 1>&2
|
||||
# configure Enigma machine from conf file and read from output file, thus decrypting:
|
||||
read -r -n 1 -p "Press any key to decrypt the output from the above command: "
|
||||
echo 1>&2
|
||||
echo "$ ./recode -Rconf -foutput | ./prog - 2>/dev/null > output2" 1>&2
|
||||
./recode -Rconf -foutput | ./prog - 2>/dev/null > output2
|
||||
read -r -n 1 -p "Press any key to show output2: "
|
||||
echo 1>&2
|
||||
cat output2
|
||||
read -r -n 1 -p "Press any key to show input again: "
|
||||
echo 1>&2
|
||||
cat input
|
||||
echo 1>&2
|
||||
# make sure input and output2 are the same:
|
||||
read -r -n 1 -p "Press any key to compare input and output2: "
|
||||
echo 1>&2
|
||||
diff -s input output2
|
||||
diff -s input output2
|
||||
# final clean up
|
||||
rm -f conf input output output2
|
||||
Executable
+124
@@ -0,0 +1,124 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# try.sh - demonstrate IOCCC winner 2020/ferguson2
|
||||
#
|
||||
# I, Cody Boone Ferguson, want to dedicate this entry in part to the millions of
|
||||
# poor souls that were lost during the tragedy that is the Second World War.
|
||||
# There are so many people who are unknown, unloved, unclaimed and even
|
||||
# unidentified. And who knows what they might have gone on to do if their lives
|
||||
# weren't - like it is with all other wars - needlessly taken from them? When
|
||||
# one considers it was all because the most powerful man in the world at the
|
||||
# time felt he should rule all others it makes it somehow even more tragic:
|
||||
# there wasn't even a good reason for the war (is there ever?).
|
||||
#
|
||||
# If one were to write the name of every person who died in the conflict in a
|
||||
# book, it would take so many pages that the book would be so heavy, so long, so
|
||||
# expensive to print and it wouldn't bring anyone back to life nor would it erase
|
||||
# the suffering. Nothing will. It's horrible.
|
||||
#
|
||||
# There really are no words that can truly describe the tragedy but I wish to
|
||||
# with my Enigma simulator honour each and every soul who was lost, or suffered,
|
||||
# or suffered the loss of friends or loved ones, as well as the world itself, in
|
||||
# and from one of the greatest tragedies in the history of mankind.
|
||||
#
|
||||
|
||||
# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it
|
||||
# this way allows us to have the user specify a different compiler in an easy
|
||||
# way.
|
||||
if [[ -z "$CC" ]]; then
|
||||
CC="cc"
|
||||
fi
|
||||
|
||||
make CC="$CC" all >/dev/null || exit 1
|
||||
|
||||
# clear screen after compilation so that only the entry is shown
|
||||
clear
|
||||
|
||||
# IOCCC obfuscated!
|
||||
read -r -n 1 -p "Press any key to encrypt IOCCC with default settings: "
|
||||
echo 1>&2
|
||||
echo "$ echo IOCCC | ./prog" 1>&2
|
||||
echo IOCCC | ./prog
|
||||
echo 1>&2
|
||||
|
||||
# IOCCC obfuscated and de-obfuscated!:
|
||||
read -r -n 1 -p "Press any key to encrypt and then decrypt IOCCC with default settings: "
|
||||
echo 1>&2
|
||||
echo "$ echo IOCCC | ./prog | ./prog" 1>&2
|
||||
echo IOCCC | ./prog | ./prog
|
||||
echo 1>&2
|
||||
|
||||
# more input fun:
|
||||
read -r -n 1 -p "Press any key to show try.this.txt: "
|
||||
echo 1>&2
|
||||
echo "$ cat try.this.txt" 1>&2
|
||||
cat try.this.txt
|
||||
read -r -n 1 -p "Press any key to encrypt text of try.this.txt with its own settings: "
|
||||
echo 1>&2
|
||||
echo "$ ./prog - < try.this.txt 2>/dev/null" 1>&2
|
||||
echo 1>&2
|
||||
./prog - < try.this.txt 2>/dev/null
|
||||
echo 1>&2
|
||||
|
||||
# more obfuscated fun:
|
||||
read -r -n 1 -p "Press any key to send 'testing test tests' to recode: "
|
||||
echo 1>&2
|
||||
echo "$ echo testing test tests | ./recode" 1>&2
|
||||
echo testing test tests | ./recode
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to send 'testing test tests' to recode -> prog: "
|
||||
echo 1>&2
|
||||
echo "$ echo testing test tests | ./recode | ./prog - 2>/dev/null" 1>&2
|
||||
echo testing test tests | ./recode | ./prog - 2>/dev/null
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to send 'testing test tests' to recode -> prog -> recode: "
|
||||
echo 1>&2
|
||||
echo "$ echo testing test tests | ./recode | ./prog - 2>/dev/null | ./recode" 1>&2
|
||||
echo testing test tests | ./recode | ./prog - 2>/dev/null | ./recode
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to send 'testing test tests' to recode -> prog -> recode -> prog: "
|
||||
echo 1>&2
|
||||
echo "$ echo testing test tests | ./recode | ./prog - 2>/dev/null | ./recode | ./prog - 2>/dev/null" 1>&2
|
||||
echo testing test tests | ./recode | ./prog - 2>/dev/null | ./recode | ./prog - 2>/dev/null
|
||||
echo 1>&2
|
||||
|
||||
# even more obfuscated fun saving and reading from files:
|
||||
#
|
||||
# initial clean up:
|
||||
rm -f conf input output output2
|
||||
# encrypt "testing test tests" with randomised settings saved in conf, saving
|
||||
# original string to input and original output to output:
|
||||
read -r -n 1 -p "Press any key to save settings and output, then encrypt: "
|
||||
echo 1>&2
|
||||
echo "$ echo testing test tests | tee input | ./recode -r -oconf | ./prog - 2>/dev/null >output" 1>&2
|
||||
echo testing test tests | tee input | ./recode -r -oconf | ./prog - 2>/dev/null >output
|
||||
read -r -n 1 -p "Press any key to show input file: "
|
||||
echo 1>&2
|
||||
cat input
|
||||
echo 1>&2
|
||||
read -r -n 1 -p "Press any key to show output file: "
|
||||
echo 1>&2
|
||||
cat output
|
||||
echo 1>&2
|
||||
# configure Enigma machine from conf file and read from output file, thus decrypting:
|
||||
read -r -n 1 -p "Press any key to decrypt the output from the above command: "
|
||||
echo 1>&2
|
||||
echo "$ ./recode -Rconf -foutput | ./prog - 2>/dev/null > output2" 1>&2
|
||||
./recode -Rconf -foutput | ./prog - 2>/dev/null > output2
|
||||
read -r -n 1 -p "Press any key to show output2: "
|
||||
echo 1>&2
|
||||
cat output2
|
||||
read -r -n 1 -p "Press any key to show input again: "
|
||||
echo 1>&2
|
||||
cat input
|
||||
echo 1>&2
|
||||
# make sure input and output2 are the same:
|
||||
read -r -n 1 -p "Press any key to compare input and output2: "
|
||||
echo 1>&2
|
||||
diff -s input output2
|
||||
diff -s input output2
|
||||
# final clean up
|
||||
rm -f conf input output output2
|
||||
@@ -4368,6 +4368,11 @@ and I encourage you to do so as the cake is quite picky!
|
||||
[Cody](#cody), with intentional irony here :-), fixed formatting, links and typos in
|
||||
various files.
|
||||
|
||||
He also added the [try.sh](/2020/ferguson2/try.sh) script.
|
||||
|
||||
He also added the [alt code](/2020/ferguson2/README.md#alternate-code) and the
|
||||
[try.alt.sh](/2020/ferguson2/try.alt.sh) script.
|
||||
|
||||
He also fixed some issues that occurred when files were renamed to `.md` from
|
||||
`.markdown`.
|
||||
|
||||
|
||||
Reference in new issue
Block a user