Updates to 2020/ferguson2

Added testing procedure (markdown, html: testing-procedure.{md,html}).
Updated the recode.{md,html} and README.md for this as well.

Updated the hidden message file (enigma.html) for a bit more fun.

Updated manifest, rebuilt index.html and .entry.json.
This commit is contained in:
Cody Boone Ferguson committed 2024-06-25 09:28:58 -07:00
1 parent 1110280c24
commit 1e4cf1b14f
14 files changed
+794 -45

No files matched your search

+16
View File
@@ -89,6 +89,14 @@
"display_via_github" : false,
"entry_text" : "Enigma configurator documentation"
},
{
"file_path" : "testing-procedure.html",
"inventory_order" : 100,
"OK_to_edit" : false,
"display_as" : "html",
"display_via_github" : false,
"entry_text" : "details about the author's testing procedure"
},
{
"file_path" : "try.alt.sh",
"inventory_order" : 100,
@@ -201,6 +209,14 @@
"display_via_github" : true,
"entry_text" : "markdown source for recode.html"
},
{
"file_path" : "testing-procedure.md",
"inventory_order" : 4000000000,
"OK_to_edit" : true,
"display_as" : "markdown",
"display_via_github" : true,
"entry_text" : "markdown source for testing-procedure.html"
},
{
"file_path" : "index.html",
"inventory_order" : 4294967295,
+12 -1
View File
@@ -1,4 +1,4 @@
%%REPO_URL%%/## To build:
## To build:
``` <!---sh-->
make
@@ -122,8 +122,12 @@ There is a good deal of useful documentation that is provided with this entry:
* [enigma.html][]
- NOTE: see [recode.html][] (or [recode.html](recode.html) for details about how to decrypt this!
* [testing-procedure][]
- How the author tested the code and why it was necessary to do it in the way it was
[recode.html]: recode.html
[enigma.html]: enigma.html
[testing-procedure]: testing-procedure.html
## Author's remarks:
@@ -840,6 +844,13 @@ don't think there need be any addition to the recode program - at least not
that.
### Testing procedure
There was a need for a testing procedure as a single character difference will
change the rest of the text. If you wish to see how I went about this see
[testing-procedure.html](testing-procedure.html).
[1992 Worst Abuse of the Rules]: ../../1992/nathan/index.html
[1998 ASCII / Morse code translator]: ../../1998/dorssel/index.html
[2014 Morse audio transcoder]: ../../2014/vik/index.html
+47 -38
View File
@@ -3,42 +3,51 @@
<jadf>
<txgu uyewjvi="bwp-8">
<ghpdl>Ykg ne ldmu vqzcueaih nea uwm okos nogn nb yxcy vh bvq</yfhwf>
<zupq tvaa="astnuekfdpd" ittvaxr="Ull dk vusp wmscrefwi hqf ghf iemp zaue dr uxna me ulz">
<hdpg mexu="ukglwxzc" zghlnhw="hnhhjb, oib, lpslgxvmr, snv qebw uev">
<vpzc pflz-gltgn="Vgswrww" kbgexhd="3; bqv= dwdaw://dri.rrzqs.iar/2020/ewzqexwt1/bjyaenywf-hfbq.wwkk">
<ghpdl>Ukhswi'r Hcjeqc-kfrtfwl Fiksmxgai Zmqep Viwv</veges>
<erhq rsqx="hqolznassdv" zyalrgo="Iey rh tczt ylryaybvp vcz kzi bgef sqep rn qevi nk lju">
<tojl afvb="wupodphl" swhmjyn="uhyycw, pax, eaysccdyp, wty mqbf xoo, tikrwv, ivxkp">
<nckql>
zlls
{
nyhjenbyiu-zxfpn: kbbid; bkjno: pzwzh;
}
t, d:imjfhmc, g:jysow
{
ectuq: kmnx;
wehl-bxwsoo: wehj;
}
</qfftq>
</fohn>
<w>
<b1>Hgpfku'r Fsqixk-aufixcs Jaelpszwj Ldmrb Szxg:</x1>
<ntizgcrdil>
<f>'Ehsklzml, qfkdxskb!' Lehizz mhjidb. 'Ygveuik ddasrj pa xifjxw, mrf. F gxsk
dwriofc! Gaéikng swypea qdww m gwnicu <ypprxv>Fcafvv-hwttbnp Hytxxobcc Vrnhv Netn
ugbctw</ezpeaw> diow gyeirl rtfg jtmgj. Uqldn li ta, lepohxl rs wc, kjw vnvknxd; drj
ts rvuwiqxmh ocbl dru sy dohnkr h auakzr tcyeej, tsk ufon cou <rg>zimit,
zkmga</zg>. Qswe heuw obvaeqt, Q xvq lk icoplqmt, jhuz jwgj.</x>
<t>'U'x jihum, ita aaa kbpvmmzj wr dqr jw ff kbwva. Dto A pyyvacy'v dryb
jsbc uxdkxdge, oya vorj btzk wu i xxn otefd. Nph Rpj. Kkkymavi, bix'v oepg
snmrj, K bvykp svq vh vzwu y bowd; cdk ogno krby'p lqo fo pa. Eebun. Jjj
rskiu <xu>whwt</lz> fsa isov op?</n>
<n>'Kuqnysur,' myar Xwuopy, vwr ezi amxcw pddps eft yrm tfmjq wdb asry.</t>
</gmihqoysaq>
</nmea>
<lrpr rouk="#000000">
<f>
<kzwwmactsw>
<z>'Rtqiwnqq, zxzpppih!' Krkqpl vnlwdi. 'Xvzemkv ihoqnv yl tcmthw, wve. G bzsj
ddogwwf! Ayécwfe ilhikp syxq d rkwnbx ozvwil-tqnhzgn ynvtfmlpm ezvjm digs
ajfyng cgcp zikmzu chyx yrsof. Njhpk ls vu, wqfgjoe qp mn, jta zgmlgkw; kqe
kj flaghcuda lgzu smr qr fcqwhp f brccoa kigjfh, yzf xnyg eok <jk>fhxop,
oupzb</jx>. Eqvz hnxh wmzbwau, R uyd qe qbpglxcn, rvtk sejj.</z>
<v>'U'y tedgt, shv drn vkyvgocl gw pdp ws is ijcah. Vbg F rmtpvya'm wgfp
zhwv ayzjxbju, rxp ophu nyhh jn p eoy ifeey. Cqg Yaw. Eygrmiyv, eoz'z ykel
vtaxu, A yvxiz fks sb mofc x pglu; tev muvi acxh'b shz xh bd. Jewkg. Yfl
emdfa <xg>fiuj</jq> axi wqkc lz?</w>
<z>'Nkrsxuut,' vtsn Owdnqn, ncv llj cjmnp tkfdm lqx blj uuhgd akw ltio.</q>
</ifeoaxedol>
<u>Bclwgndonfsdlyw phd zlrdljitxdfe rcythbk lzf sksohi xrs pv guhcpdk afmt xytz!
</u>
<b>
Ropl dpet dgs glo nnyysjxxs ca dmktm jlac mlt tt iio jir jxa qrrly qyjdda awvb
mk muy kihrx and wstn pmeyjz! Wzkdz qnc, gcdxs, wme F'j aciu il ibm tkiejq kwt
jvdq libj ben bewjj wc: @nhzzi@eayuchajq.rgk. Xmlkcd wxqbmmc sr vn Z kcv o mbll
ullukyhgkwxq. Jalsd!
</c>
<q>
Dk gdf qpul bnjf vd apuh zzz myuhy pwp tzp'oc myh k httt lkgq tnejak vbf xaiaj
sjlv wb
<t wvoa="vcuux://eve.wnkzk.qcf/2020/vnaeztnh1/oqdvtygyh-pcuv.lcyh">qsubw gouh</x>.
Wr xqq crlld dhih ml ary <clmhsk>rfh</pbapaf> b nlyg optu lvofii pyw nhyfr egfyw
fcaz bt ggzgb jvhzg!
</u>
</vyxr>
</lnjr>
<q>Lhguhqvsqjfrmug egy lztwjoneaasg hwcwnlk cgq uneiqk lzq jq vtgxftr vbaa kkkv!
Ol ags <qjy>Vjusls'f</qfy> lu eve'f ojnoihapo Kbdoqi-vwtdvyy Onahldlca Msoqc
Vygs Tnxhay rmrmu
<m xdxb="baabi://tvp.xgtsh.jhq/2020/xjviymmw1/iyfrgiyqr-fdjr.wvdr">xdyi</x>.
</d>
<s>
<qpwdwm>ZRDRUYZMI:</jvtdta> vhrg vwlc xfo hgq poxuqepcw hg ltpfr gijb rdz ee yer
ghb epn zyjvv wqzmfx vapm dy vpp urlqp jsz cvdf lqmvys!
</l>
<k>Jaccw yiy, <yytems>vwylj</rxchmh>, uxc
<ehnwxs>S'j HSZQ RH UQY GZGLBV PSO NBTF CGGZ PLK QXZMV</tulttx> nz Ipzjefjl:
<w yxzx="njojg://bmxgxhptz.hby/@gjdrh">@wrptn@nladsynet.rxq</o>. <iadrcs>VYMBJT
hbjbvfg sa</yytdgq> ju O ylr v cahx hybtkbolipif. <ycjkwz>Ak ftm xmbm YPH
wyixdzlfy</bytrki>, GQDHTF trgh unm jg mth Q'zr uy bxiiu wq bkzw nrg .. svfne
Repqer qbznh rmd Ecyy fhf zzl fmiql xbec. Vtkjm!
</y>
</zikb>
</nskr>
+12 -2
View File
@@ -401,7 +401,7 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- BEFORE: 1st line of markdown file: 2020/ferguson2/README.md -->
<p>https://github.com/ioccc-src/temp-test-ioccc/blob/master/## To build:</p>
<h2 id="to-build">To build:</h2>
<pre><code> make</code></pre>
<p>The author provided alternate code that prints the output one character at a
time to make it a bit more like the real thing in that it isn’t dumped out all
@@ -472,10 +472,14 @@ out! Can you figure out why this works this way?</p>
<ul>
<li>Some useful information about <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson2/recode.c">recode.c</a></li>
</ul></li>
<li>[enigma.html][]
<li><a href="enigma.html">enigma.html</a>
<ul>
<li>NOTE: see <a href="recode.html">recode.html</a> (or <a href="recode.html">recode.html</a> for details about how to decrypt this!</li>
</ul></li>
<li><a href="testing-procedure.html">testing-procedure</a>
<ul>
<li>How the author tested the code and why it was necessary to do it in the way it was</li>
</ul></li>
</ul>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>My remarks about my <a href="https://en.wikipedia.org/wiki/German_Army_(1935%E2%80%931945)">Heer</a> (army) and <a href="https://en.wikipedia.org/wiki/Luftwaffe">Luftwaffe</a> (air force) <a href="https://www.cryptomuseum.com/crypto/enigma/index.htm">Enigma
@@ -1004,6 +1008,10 @@ did not implement this in the recode program but what would it be anyway? If the
user here wants to they could add three letters to their message beginning. I
don’t think there need be any addition to the recode program - at least not
that.</p>
<h3 id="testing-procedure">Testing procedure</h3>
<p>There was a need for a testing procedure as a single character difference will
change the rest of the text. If you wish to see how I went about this see
<a href="testing-procedure.html">testing-procedure.html</a>.</p>
<h2 id="authors-dedication">Author’s dedication:</h2>
<div id="winning">
<h3 id="winning-thoughts-dedications-and-thanks">Winning thoughts, dedications and thanks</h3>
@@ -1098,6 +1106,7 @@ email but I’m more likely to respond to mastodon messages.</p>
<li><a href="obfuscation.txt">obfuscation.txt</a> - about the obfuscation of this entry - encrypted with entry</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson2/recode.c">recode.c</a> - Enigma machine configurator source code</li>
<li><a href="recode.html">recode.html</a> - Enigma configurator documentation</li>
<li><a href="testing-procedure.html">testing-procedure.html</a> - details about the author’s testing procedure</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson2/try.alt.sh">try.alt.sh</a> - script to try alternate code</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson2/try.sh">try.sh</a> - script to try entry</li>
<li><a href="try.this.txt">try.this.txt</a> - sample input</li>
@@ -1115,6 +1124,7 @@ email but I’m more likely to respond to mastodon messages.</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson2/obfuscation.md">obfuscation.md</a> - markdown source for obfuscation.html</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson2/.path">.path</a> - directory path from top level directory</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson2/recode.md">recode.md</a> - markdown source for recode.html</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2020/ferguson2/testing-procedure.md">testing-procedure.md</a> - markdown source for testing-procedure.html</li>
<li><a href="index.html">index.html</a> - this web page</li>
</ul>
<hr style="width:10%;text-align:left;margin-left:0">
+5 -2
View File
@@ -877,8 +877,11 @@ think that I would give too much away? :)</p>
the key you wish to select is</p>
<pre><code> 0EZ4PC1CC0PGTAQSOXWNMDRYKFUZEI</code></pre>
<p>you can do:</p>
<pre><code> ./recode -R0EZ4PC1CC0PGTAQSOXWNMDRYKFUZEI -fenigma.html | ./prog - 2&gt;/dev/null &gt; decrypted.html</code></pre>
<p>Then open <code>decrypted.html</code> in your browser.</p>
<pre><code> ./recode -R0EZ4PC1CC0PGTAQSOXWNMDRYKFUZEI -fenigma.html | ./prog - 2&gt;/dev/null &gt; enigma.deciphered.html</code></pre>
<p>Then open <code>enigma.deciphered.html</code> in your browser. A command is provided in
<a href="testing-procedure.html">testing-procedure.html</a> that does this too but it
shows how you can use a file as input for the key instead as well as how I
tested the code.</p>
<hr style="width:10%;text-align:left;margin-left:0">
<p>Jump to: <a href="#">top</a></p>
<!--
+7 -2
View File
@@ -649,10 +649,15 @@ the key you wish to select is
you can do:
``` <!---sh-->
./recode -R0EZ4PC1CC0PGTAQSOXWNMDRYKFUZEI -fenigma.html | ./prog - 2>/dev/null > decrypted.html
./recode -R0EZ4PC1CC0PGTAQSOXWNMDRYKFUZEI -fenigma.html | ./prog - 2>/dev/null > enigma.deciphered.html
```
Then open `decrypted.html` in your browser.
Then open `enigma.deciphered.html` in your browser. A command is provided in
[testing-procedure.html](testing-procedure.html) that does this too but it
shows how you can use a file as input for the key instead as well as how I
tested the code.
<hr style="width:10%;text-align:left;margin-left:0">
+561
View File
@@ -0,0 +1,561 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- START: two lines up starts content from: inc/top.default.html -->
<!-- END: this line ends content from: inc/top.default.html -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<link rel="stylesheet" href="../../ioccc.css">
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap" rel="stylesheet">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>The International Obfuscated C Code Contest</title>
<link rel="icon" type="image/x-icon" href="../../favicon.ico">
<meta name="description" content="testing-procedure.md for 2020/ferguson2">
<meta name="keywords" content="IOCCC, 2020/ferguson2, testing-procedure.md">
</head>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- END: this line ends content from: inc/head.default.html -->
<!-- -->
<!-- This web page was formed via the tool: bin/gen-other-html.sh -->
<!-- The content of main section of this web page came from: 2020/ferguson2/testing-procedure.md -->
<!-- -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! Do not modify this web page, instead modify the file: 2020/ferguson2/testing-procedure.md !!! -->
<!-- !!! Do not modify this web page, instead modify the file: 2020/ferguson2/testing-procedure.md !!! -->
<!-- !!! Do not modify this web page, instead modify the file: 2020/ferguson2/testing-procedure.md !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- Markdown content was converted into HTML via the tool: bin/md2html.sh -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/topbar.default.html -->
<div class="theader">
<nav class="topbar">
<div class="container">
<div class="logo">
<a href="../../index.html" class="logo-link">
IOCCC
</a>
</div>
<div class="topbar-items">
<div class="item">
<span class="item-header">
Entries
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="../../years.html" class="sub-item-link">
Winning Entries
</a>
</div>
<div class="outfit-font">
<a href="../../authors.html" class="sub-item-link">
Winning Authors
</a>
</div>
<div class="outfit-font">
<a href="../../location.html" class="sub-item-link">
Location of winning authors
</a>
</div>
<div class="outfit-font">
<a href="../../bugs.html" class="sub-item-link">
Bugs and (mis)features
</a>
</div>
</div>
</div>
<div class="item">
<span class="item-header">
Status
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="../../news.html" class="sub-item-link">
IOCCC News
</a>
</div>
<div class="outfit-font">
<a href="../../status.html" class="sub-item-link">
Contest status
</a>
</div>
<div class="outfit-font">
<a href="../../next/index.html" class="sub-item-link">
Rules and Guidelines
</a>
</div>
</div>
</div>
<div class="item">
<span class="item-header">
FAQ
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="../../faq.html" class="sub-item-link">
FAQ
</a>
</div>
<div class="outfit-font">
<a href="../../faq.html#submit" class="sub-item-link">
How to enter the IOCCC
</a>
</div>
<div class="outfit-font">
<a href="../../faq.html#fix_an_entry" class="sub-item-link">
Fixing IOCCC entries
</a>
</div>
<div class="outfit-font">
<a href="../../faq.html#fix_web_site" class="sub-item-link">
Fixing the website
</a>
</div>
<div class="outfit-font">
<a href="../../faq.html#fix_author" class="sub-item-link">
Updating author info
</a>
</div>
</div>
</div>
<div class="item">
<span class="item-header">
About
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="../../index.html" class="sub-item-link">
IOCCC Home
</a>
</div>
<div class="outfit-font">
<a href="../../judges.html" class="sub-item-link">
The IOCCC Judges
</a>
</div>
<div class="outfit-font">
<a href="../../contact.html" class="sub-item-link">
Contacting the IOCCC
</a>
</div>
<div class="outfit-font">
<a href="../../thanks-for-help.html" class="sub-item-link">
Thanks for the help
</a>
</div>
<div class="outfit-font">
<a href="../../markdown.html" class="sub-item-link">
IOCCC markdown guidelines
</a>
</div>
</div>
</div>
</div>
</div>
</nav>
<div class="header-mobile-menu">
<noscript>
<a href="../../nojs-menu.html" class="topbar-js-label">
Please Enable JavaScript
</a>
</noscript>
<button id="header-open-menu-button" class="topbar-mobile-menu">
<img
src="../../png/hamburger-icon-open.png"
alt="hamburger style menu icon - open state"
width=48
height=48>
</button>
<button id="header-close-menu-button" class="hide-content">
<img
src="../../png/hamburger-icon-closed.png"
alt="hamburger style menu icon - closed state"
width=48
height=48>
</button>
<div id="mobile-menu-panel" class="hide-content">
<div class="mobile-menu-container">
<div class="mobile-menu-wrapper">
<div class="mobile-menu-item">
Entries
</div>
<div class="mobile-submenu-wrapper">
<a class="mobile-submenu-item" href="../../years.html">
Winning Entries
</a>
<a class="mobile-submenu-item" href="../../authors.html">
Authors of winning IOCCC entries
</a>
<a class="mobile-submenu-item" href="../../location.html">
Location of authors
</a>
<a class="mobile-submenu-item" href="../../bugs.html">
Bugs and (mis)features
</a>
</div>
</div>
<div class="mobile-menu-wrapper">
<div class="mobile-menu-item">
Status
</div>
<div class="mobile-submenu-wrapper">
<a class="mobile-submenu-item" href="../../status.html">
Contest status
</a>
<a class="mobile-submenu-item" href="../../next/index.html">
Rules and Guidelines
</a>
<a class="mobile-submenu-item" href="../../news.html">
IOCCC News
</a>
</div>
</div>
<div class="mobile-menu-wrapper">
<div class="mobile-menu-item">
FAQ
</div>
<div class="mobile-submenu-wrapper">
<a class="mobile-submenu-item" href="../../faq.html">
Frequently Asked Questions
</a>
<a class="mobile-submenu-item" href="../../faq.html#submit">
How to enter the IOCCC
</a>
<a class="mobile-submenu-item" href="../../faq.html#fix_an_entry">
Fixing IOCCC entries
</a>
<a class="mobile-submenu-item" href="../../faq.html#fix_web_site">
Fixing the website
</a>
<a class="mobile-submenu-item" href="../../faq.html#fix_author">
Fixing author info
</a>
</div>
</div>
<div class="mobile-menu-wrapper">
<div class="mobile-menu-item">
About
</div>
<div class="mobile-submenu-wrapper">
<a class="mobile-submenu-item" href="../../index.html">
IOCCC Home
</a>
<a class="mobile-submenu-item" href="../../judges.html">
The IOCCC Judges
</a>
<a class="mobile-submenu-item" href="../../contact.html">
Contacting the IOCCC
</a>
<a class="mobile-submenu-item" href="../../thanks-for-help.html">
Thanks for the help
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
var headerOpenMenuButton = document.getElementById("header-open-menu-button");
var headerCloseMenuButton = document.getElementById("header-close-menu-button");
var mobileMenuPanel = document.getElementById("mobile-menu-panel");
headerOpenMenuButton.addEventListener("click", () => {
headerOpenMenuButton.classList.remove("topbar-mobile-menu");
headerOpenMenuButton.classList.add("hide-content");
headerCloseMenuButton.classList.remove("hide-content");
headerCloseMenuButton.classList.add("topbar-mobile-menu");
mobileMenuPanel.classList.remove("hide-content");
mobileMenuPanel.classList.add("topbar-mobile-panel");
});
headerCloseMenuButton.addEventListener("click", () => {
headerCloseMenuButton.classList.remove("topbar-mobile-menu");
headerCloseMenuButton.classList.add("hide-content");
mobileMenuPanel.classList.add("hide-content");
mobileMenuPanel.classList.remove("topbar-mobile-panel");
headerOpenMenuButton.classList.add("topbar-mobile-menu");
headerOpenMenuButton.classList.remove("hide-content");
});
</script>
<!-- END: this line ends content from: inc/topbar.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<div class="header">
<a href="../../2011/zucker/index.html">
<img src="../../png/ioccc.png"
alt="IOCCC image by Matt Zucker"
width=300
height=110>
</a>
<h1>The International Obfuscated C Code Contest</h1>
<h2>testing-procedure.html for 2020/ferguson2</h2>
</div>
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/navbar.up2index.html -->
<div class="navbar">
<a class="Left" href="index.html">&uarr; jump to index.html &uarr;</a>
<a class="Right" href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2020%2Fferguson2%2Ftesting-procedure.html">&#x2713;</a>
</div>
<!-- END: this line ends content from: inc/navbar.up2index.html -->
<!-- START: this line starts content from: inc/before-content.default.html -->
<div class="content" id="content">
<!-- END: this line ends content from: inc/before-content.default.html -->
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- BEFORE: 1st line of markdown file: 2020/ferguson2/testing-procedure.md -->
<h1 id="testing-procedure">Testing procedure</h1>
<p>Because of the significant amount of possible combinations of settings and the
fact that based on each setting if the text does not have the same sequence -
even one letter off - then you cannot get the same output - I had to come up
with a way to test the entry. Here’s the problem with just the default settings:
the same number of characters, the same starting, but the moment a letter
differs the rest of the message will change even if the rest of the message is
the same:</p>
<pre><code> $ echo A man and his dog walked in the park...|./prog
G spy ige lqk eav ptccpu di clm erkh...
$ echo A dog and his man walked in the park...|./prog
G luq ige lqk jou ptccpu di clm erkh...
$ echo A man and his dog and its dog walked in the park...|./prog
G spy ige lqk eav mbt bwz iwb jsojus pe hnt imny...</code></pre>
<p>As can be seen as soon as a letter is different in the sequence it changes the
result! So what could be done? First of all I had to make sure that the
invocations I gave could be properly duplicated. To do this I had key files that
I could use via <code>recode</code> and also I did input some manually. This includes the
cake recipe key file that originally was in this entry but is now only in
<a href="../ferguson1/index.html">2020/ferguson1</a>. Now, though, I have a simple
html file with a fun message for you to decipher, if you wish to find the right
key, to explore the entry. The script which I will include below can be modified
to try and find the right key.</p>
<h2 id="general-script-format">General script format</h2>
<pre><code> STR=&quot;$(echo ABC | ./prog|tail -n1)&quot;
if [ &quot;${STR}&quot; != &quot;GYM&quot; ]; then
echo &quot;Failed &#39;ABC&#39; test&quot;
exit 1
fi
STR=&quot;$(echo &quot;${STR}&quot; | ./prog|tail -n1)&quot;
if [ &quot;${STR}&quot; != &quot;ABC&quot; ]; then
echo &quot;Failed &#39;GYM&#39; test&quot;
exit 1
fi
# a simpler way to check that it works:
./recode -Renigma.dat -fenigma.deciphered.html | ./prog - 2&gt;/dev/null &gt; enigma.html
./recode -Renigma.dat -fenigma.html | ./prog - 2&gt;/dev/null | diff -s - enigma.deciphered.html
./recode -Robfuscation.key -fobfuscation.txt | ./prog - 2&gt;/dev/null &gt; out
diff out obfuscation.md || echo &quot;Obfuscation test 0.5 failed&quot;
./recode -Robfuscation.key -fout | ./prog - 2&gt;/dev/null &gt; out2
diff out2 obfuscation.txt || echo &quot;Obfuscation test 1.0 failed&quot;
./prog &lt; prog.c &gt; out
./prog &lt; out &gt; out2
diff out2 prog.c || echo &quot;Self obfuscation test 1.0 failed&quot;
mkdir -p tests || exit 1
cd tests || exit 1
let n=0
while [ &quot;${n}&quot; -lt 100 ]; do
for f in ../input.txt ../prog.c ../README.md ../recode.md ../recode.1 ../enigma.1; do
../recode -r -oconfig -f&quot;${f}&quot; | ../prog - 2&gt;/dev/null &gt; out
../recode -Rconfig -fout | ../prog - 2&gt;/dev/null &gt; out2
diff out2 &quot;${f}&quot; || echo &quot;Failed randomised test for file: ${f}&quot;
done
let n=n+1
done
rm -f out out2
cd ..
rm -f out out2</code></pre>
<p>Please don’t expect the above script to work without a bit of modification as
it’s not been tested recently and I did make some adjustments when putting this
document in the website. Still that should give you the idea.</p>
<h3 id="historical-note">Historical note:</h3>
<p>At the time of development the server was CentOS but as Red Hat decided to axe
it it is now Rocky Linux. The above script was only tested in macOS but it
should work fine in linux too. Also, the enigma.html part was added in June 2024
which expects output so below when I say if I got any output there was a problem
this is no longer true.</p>
<h2 id="back-to-the-testing">Back to the testing:</h2>
<p>Anyway, If I got any output I knew there was a problem. I did not get any output and since
this tested the default settings, two customised settings as well as 100
randomised runs for each of the files listed in the script I believed this
works well. Tests run under Fedora, CentOS and macOS with the same results.</p>
<p>I believe this entry can be used with EBCDIC as it appears that the characters
used are in contiguous sequence but I do not know for certain. Neither do I know
about big endian: I don’t believe it matters but I have no way to test this
either.</p>
<p>If there are any discrepancies in the recode.html or any other thing I
pasted it’s probably because of the way I changed the display (or else the
random option in <code>recode</code>!).</p>
<p>If there are any inconsistencies in input/output one also has to be certain that
input was put in correctly (as I discussed earlier). The results of the script
are the same under Fedora, CentOS and macOS but I have put the main testing
platform as macOS because these days I mostly use my laptop (I tend to ssh into
the other two boxes more and as for the CentOS it’s only console anyway. Since
it’s just text I/O it an terminal emulator shouldn’t matter either.).</p>
<h2 id="command-that-might-be-used-to-decipher-the-enigma.html-file">Command that might be used to decipher the <code>enigma.html</code> file:</h2>
<p>The following command can be used to decipher the file except that you must
provide the key file (or the key as a string) with the correct key (see
<a href="recode.html">recode.html</a> for a list of keys to try) in order to get correct
output:</p>
<pre><code> ./recode -Renigma.dat -fenigma.html | ./prog - 2&gt;/dev/null &gt; enigma.deciphered.html</code></pre>
<p>Enjoy!
<!-- AFTER: last line of markdown file: 2020/ferguson2/testing-procedure.md --></p>
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- START: this line starts content from: inc/after-content.default.html -->
</div>
<!-- END: this line ends content from: inc/after-content.default.html -->
<!-- START: this line starts content from: inc/footer.default.html -->
<!--
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
You are free to share and adapt this file under the terms of this license:
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
For more information, see:
https://creativecommons.org/licenses/by-sa/4.0/
-->
<div class="footer">
<div id="copyright"><h3>Copyright &copy; 1984-2024 by Landon Curt Noll:
<a href="https://creativecommons.org/faq/#what-does-some-rights-reserved-mean"
target="_blank"
rel="license noopener noreferrer">Some Rights Reserved</a></h3>
<p>
This work is <b>licensed by Landon Curt Noll</b> under
<b><a href="https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1"
target="_blank"
rel="license noopener noreferrer"
style="display:inline-block;">CC BY-SA 4.0</a></b>.
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
src="../../png/cc.png"
alt="cc inside circle symbol">
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
src="../../png/by.png"
alt="person inside circle symbol">
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
src="../../png/sa.png"
alt="arrow looping back on itself inside circle symbol"><br>
You should <b>carefully review</b> the
<b><a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode.en"
target="_blank"
rel="license noopener noreferrer">CC BY-SA 4.0 LEGAL CODE</a></b>
before using the licensed material.<br>
You may wish to review the
<b><a href="../../license.html"
target="_blank"
rel="license noopener noreferrer">highlights of some of the key features and terms</a></b>
of <b>CC BY-SA 4.0</b>.<br>
</p>
</div>
<div id="coda"><h3>Coda</h3>
<p>
<a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2F2020%2Fferguson2%2Ftesting-procedure.html" rel="nofollow">Nu HTML check this web page</a><br>
<a href="#top">Jump to top</a> <a href="#content">Jump to Content</a>
</p>
</div>
</div>
<!-- END: this line ends content from: inc/footer.default.html -->
<!-- START: this line starts content from: inc/bottom.default.html -->
</body>
</html>
<!-- END: this line ends content from: inc/bottom.default.html -->
+126
View File
@@ -0,0 +1,126 @@
# Testing procedure
Because of the significant amount of possible combinations of settings and the
fact that based on each setting if the text does not have the same sequence -
even one letter off - then you cannot get the same output - I had to come up
with a way to test the entry. Here's the problem with just the default settings:
the same number of characters, the same starting, but the moment a letter
differs the rest of the message will change even if the rest of the message is
the same:
``` <!---sh-->
$ echo A man and his dog walked in the park...|./prog
G spy ige lqk eav ptccpu di clm erkh...
$ echo A dog and his man walked in the park...|./prog
G luq ige lqk jou ptccpu di clm erkh...
$ echo A man and his dog and its dog walked in the park...|./prog
G spy ige lqk eav mbt bwz iwb jsojus pe hnt imny...
```
As can be seen as soon as a letter is different in the sequence it changes the
result! So what could be done? First of all I had to make sure that the
invocations I gave could be properly duplicated. To do this I had key files that
I could use via `recode` and also I did input some manually. This includes the
cake recipe key file that originally was in this entry but is now only in
[2020/ferguson1](../ferguson1/index.html). Now, though, I have a simple
html file with a fun message for you to decipher, if you wish to find the right
key, to explore the entry. The script which I will include below can be modified
to try and find the right key.
## General script format
``` <!---sh-->
STR="$(echo ABC | ./prog|tail -n1)"
if [ "${STR}" != "GYM" ]; then
echo "Failed 'ABC' test"
exit 1
fi
STR="$(echo "${STR}" | ./prog|tail -n1)"
if [ "${STR}" != "ABC" ]; then
echo "Failed 'GYM' test"
exit 1
fi
# a simpler way to check that it works:
./recode -Renigma.dat -fenigma.deciphered.html | ./prog - 2>/dev/null > enigma.html
./recode -Renigma.dat -fenigma.html | ./prog - 2>/dev/null | diff -s - enigma.deciphered.html
./recode -Robfuscation.key -fobfuscation.txt | ./prog - 2>/dev/null > out
diff out obfuscation.md || echo "Obfuscation test 0.5 failed"
./recode -Robfuscation.key -fout | ./prog - 2>/dev/null > out2
diff out2 obfuscation.txt || echo "Obfuscation test 1.0 failed"
./prog < prog.c > out
./prog < out > out2
diff out2 prog.c || echo "Self obfuscation test 1.0 failed"
mkdir -p tests || exit 1
cd tests || exit 1
let n=0
while [ "${n}" -lt 100 ]; do
for f in ../input.txt ../prog.c ../README.md ../recode.md ../recode.1 ../enigma.1; do
../recode -r -oconfig -f"${f}" | ../prog - 2>/dev/null > out
../recode -Rconfig -fout | ../prog - 2>/dev/null > out2
diff out2 "${f}" || echo "Failed randomised test for file: ${f}"
done
let n=n+1
done
rm -f out out2
cd ..
rm -f out out2
```
Please don't expect the above script to work without a bit of modification as
it's not been tested recently and I did make some adjustments when putting this
document in the website. Still that should give you the idea.
### Historical note:
At the time of development the server was CentOS but as Red Hat decided to axe
it it is now Rocky Linux. The above script was only tested in macOS but it
should work fine in linux too. Also, the enigma.html part was added in June 2024
which expects output so below when I say if I got any output there was a problem
this is no longer true.
## Back to the testing:
Anyway, If I got any output I knew there was a problem. I did not get any output and since
this tested the default settings, two customised settings as well as 100
randomised runs for each of the files listed in the script I believed this
works well. Tests run under Fedora, CentOS and macOS with the same results.
I believe this entry can be used with EBCDIC as it appears that the characters
used are in contiguous sequence but I do not know for certain. Neither do I know
about big endian: I don't believe it matters but I have no way to test this
either.
If there are any discrepancies in the recode.html or any other thing I
pasted it's probably because of the way I changed the display (or else the
random option in `recode`!).
If there are any inconsistencies in input/output one also has to be certain that
input was put in correctly (as I discussed earlier). The results of the script
are the same under Fedora, CentOS and macOS but I have put the main testing
platform as macOS because these days I mostly use my laptop (I tend to ssh into
the other two boxes more and as for the CentOS it's only console anyway. Since
it's just text I/O it an terminal emulator shouldn't matter either.).
## Command that might be used to decipher the `enigma.html` file:
The following command can be used to decipher the file except that you must
provide the key file (or the key as a string) with the correct key (see
[recode.html](recode.html) for a list of keys to try) in order to get correct
output:
``` <!---sh-->
./recode -Renigma.dat -fenigma.html | ./prog - 2>/dev/null > enigma.deciphered.html
```
Enjoy!
+2
View File
@@ -4176,6 +4176,7 @@
2020,ferguson2,obfuscation.txt,100,true,text,false,about the obfuscation of this entry - encrypted with entry
2020,ferguson2,recode.c,100,true,c,true,Enigma machine configurator source code
2020,ferguson2,recode.html,100,true,html,false,Enigma configurator documentation
2020,ferguson2,testing-procedure.html,100,false,html,false,details about the author's testing procedure
2020,ferguson2,try.alt.sh,100,true,shellscript,true,script to try alternate code
2020,ferguson2,try.sh,100,true,shellscript,true,script to try entry
2020,ferguson2,try.this.txt,100,true,text,false,sample input
@@ -4190,6 +4191,7 @@
2020,ferguson2,obfuscation.md,4000000000,true,markdown,true,markdown source for obfuscation.html
2020,ferguson2,.path,4000000000,false,path,true,directory path from top level directory
2020,ferguson2,recode.md,4000000000,true,markdown,true,markdown source for recode.html
2020,ferguson2,testing-procedure.md,4000000000,true,markdown,true,markdown source for testing-procedure.html
2020,ferguson2,index.html,4294967295,false,html,false,this web page
2020,giles,prog.c,20,true,c,true,entry source code
2020,giles,Makefile,30,true,makefile,true,entry Makefile
1 # year dir file_path inventory_order OK_to_edit display_as display_via_github entry_text
4176 2020 ferguson2 obfuscation.txt 100 true text false about the obfuscation of this entry - encrypted with entry
4177 2020 ferguson2 recode.c 100 true c true Enigma machine configurator source code
4178 2020 ferguson2 recode.html 100 true html false Enigma configurator documentation
4179 2020 ferguson2 testing-procedure.html 100 false html false details about the author's testing procedure
4180 2020 ferguson2 try.alt.sh 100 true shellscript true script to try alternate code
4181 2020 ferguson2 try.sh 100 true shellscript true script to try entry
4182 2020 ferguson2 try.this.txt 100 true text false sample input
4191 2020 ferguson2 obfuscation.md 4000000000 true markdown true markdown source for obfuscation.html
4192 2020 ferguson2 .path 4000000000 false path true directory path from top level directory
4193 2020 ferguson2 recode.md 4000000000 true markdown true markdown source for recode.html
4194 2020 ferguson2 testing-procedure.md 4000000000 true markdown true markdown source for testing-procedure.html
4195 2020 ferguson2 index.html 4294967295 false html false this web page
4196 2020 giles prog.c 20 true c true entry source code
4197 2020 giles Makefile 30 true makefile true entry Makefile
Binary file not shown.
+1
View File
@@ -1205,6 +1205,7 @@
2020/ferguson2/2020_ferguson2.tar.bz2
2020/ferguson2/index.html
2020/ferguson2/prog.orig.c
2020/ferguson2/testing-procedure.html
2020/giles/.path
2020/giles/2020_giles.tar.bz2
2020/giles/index.html
+2
View File
@@ -4187,6 +4187,8 @@
2020/ferguson2/recode.c
2020/ferguson2/recode.html
2020/ferguson2/recode.md
2020/ferguson2/testing-procedure.html
2020/ferguson2/testing-procedure.md
2020/ferguson2/try.alt.sh
2020/ferguson2/try.sh
2020/ferguson2/try.this.txt
+2
View File
@@ -4187,6 +4187,8 @@
2020/ferguson2/recode.c
2020/ferguson2/recode.html
2020/ferguson2/recode.md
2020/ferguson2/testing-procedure.html
2020/ferguson2/testing-procedure.md
2020/ferguson2/try.alt.sh
2020/ferguson2/try.sh
2020/ferguson2/try.this.txt
+1
View File
@@ -2980,6 +2980,7 @@
2020/ferguson2/recode.c
2020/ferguson2/recode.html
2020/ferguson2/recode.md
2020/ferguson2/testing-procedure.md
2020/ferguson2/try.alt.sh
2020/ferguson2/try.sh
2020/ferguson2/try.this.txt