Page 2 of 2
Posted: Wed Oct 07, 2009 3:10 am
by lordzerum
I use Crank as auxiliar tool, but the hard work I made by hand.
As zac, I search for 'answer' word, and so on.
Challenges like this is so hard for me. English isnĀ“t my maternal language. This affect the intuition to perceive the underlying text.
Posted: Thu Jan 07, 2010 5:00 am
by samuelandjw
i did it manually. it was so hard for me. i wonder why there are so solvers...
Posted: Mon Mar 22, 2010 4:29 pm
by laz0r
If you wanted to write a program to solve monoalphabetic substitution ciphers for you, then try using the churn algorith (
http://web.mac.com/mikejcowan/Ciphers/C ... rithm.html) and a tetragraph. As to which programming language to use, it is up to you.
P.S. Tetragraphs are very hard to find, but there are some out there.
just google it
Posted: Sun Aug 29, 2010 8:55 pm
by Aghamemnon
try to google it and you'll find the answer
Posted: Sat Oct 16, 2010 11:06 pm
by Grevas
Since i didn't have any idea of cryptography till today and im not an native english speaker, it wasn't an easy task. Took me good 2 hours to finish this one, but i had fun
I made a little page to help me keep track of my substitutions:
Right now it's also accessible at
http://web-werker.de/tmp/chifre.php
It's not realy good, just scramped something together, it still helped me on some ROT* chiffred ones
(**EDIT: added a input field to the online version **)
Code: Select all
<script src="jquery.min.1.4.3.js"></script>
<script>
$(document).ready( function() {
$('.up').click( function(event) {
var parent = $(this).parent();
var clss = $(parent).find("span").attr("class");
change_chars(clss, 1);
return false;
});
$('.down').click( function(event) {
var parent = $(this).parent();
var clss = $(parent).find("span").attr("class");
change_chars(clss, -1);
return false;
});
function change_chars(cls, number) {
var obj = $("." + cls);
// 65 = A
// 90 == Z
//console.log("obj " + obj);
var char = obj.html();
if(char > 90 || char < 65) return false;
//console.log("char " + char);
var char_code = char.charCodeAt(0) + number;
if(char_code > 90) char_code = 65;
else if(char_code < 65) char_code = 90;
obj.html(String.fromCharCode(char_code));
$('span').css("background", "#ccc");
obj.css("background", "#999");
}
function move_all(number) {
var cls_array = new Array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");
for( var i = 0 ; i < 26 ; i+= 1) {
change_chars(cls_array[i], number);
}
}
$('#all_u').append("<a href='#'>all up</a>");
$('#all_d').append("<a href='#'>all down</a>");
$('#all_u a').click(function() { move_all(1) });
$('#all_d a').click(function() { move_all(-1) });
$('span').click(function() {
var cls = $(this).attr("class");
$("." + cls).css("background", "#999");
});
});
</script>
<style>
* { outline: none; }
body { padding: 0; margin: 0; padding-top: 5px; background: #8181F7; background: #6B8E23; }
td { text-align: center; }
span { display: block; background: #ccc; width: 20px; font-size: 20px; }
.hl { background: border: 1px solid red; }
a { display: block; text-decoration: none; background: #000; color: #fff; }
a.up { font-weight: bold; }
table { margin: 10px 0 10px 120px;}
tr { vertical-align: middle;}
#all_u a, #all_d a { padding: 10px 0; text-align: center; }
</style>
<?php
$coded = "ISS NVVK DIPXYWA PIT AVSUY QIAOP PWZEHVNWIEDZ. CDYT ZVM LOTK HDY AVSMHOVT HV HDOA HYFH, ZVM COSS QY IQSY HV NYH HDY ITACYW, CDOPD OA IKMGQWIHY";
echo "<div id='all_u'></div>";
echo "<table><tr>";
for($i = 0; $i < strlen($coded); $i++) {
if($coded[$i] != " ") {
$up = ($coded[$i] != ',' && $coded[$i] != '.') ? "<a class='up' href='#'>^</a>" : "";
$down = ($coded[$i] != ',' && $coded[$i] != '.') ? "<a class='down' href='#'>v</a>" : "";
echo "
<td>
$up
<span class='$coded[$i]'>$coded[$i]</span>
$down
</td>";
}
else {
if($r_count > 3) {
echo "</tr></table><table><tr>";
$r_count = 1;
} else {
echo "<td> | </td>";
}
$r_count++;
}
}
echo "</tr></table>";
echo "<div id='all_d'></div>";
?>
Posted: Thu Nov 25, 2010 1:14 pm
by laz0r
Just write a script that uses the churn algorithm and tetragraphs for frequency analysis. That'll solve it in under a second.
Posted: Sun Aug 21, 2011 6:51 pm
by lifthrasiir
Another possible approach is to exploit very long word. The ciphertext PWZEHVNWIEDZ would suggest that this word has exactly three distinct duplicate characters at position 2 & 8, 3 & 12 and 4 & 10 and nothing else. The quick search on my laptop gave this:
Code: Select all
$ grep -E '^.(.)(.)(.)...\1.\3.\2$' /usr/share/dict/words
archimorphic
cryptography
fictionistic
interconnect
intervenient
manipulation
minimifidian
panification
sanification
semiquietism
tachygraphic
tangantangan
Among them only cryptography, manipulation, panification, sanification, tachygraphic are possible, and you know what is appropriate for this context.
Posted: Sat Sep 10, 2011 1:30 pm
by Mad Mike
Using a
website to assist me I scanned the text for a word with the length matching "solution".
That were enough known letters to find the rest.
And then guessing with the four remaining ones.
Posted: Thu Nov 24, 2011 6:31 pm
by Smee80
When your brain is very much used to the structure of your mother tongue, you can hardly get into this riddle. Furthermore this kind of riddles is rather uncommon in German speaking cultures. I found this challenge was hardly possible to solve without the help of a computer and online ressources.
I had Python (very rapid and simple, 60 script lines) analyze the distribution of letters and two- and three-letter combinations. Then I started programming a Java App (110 code lines by now) to perform the substitution and added more and more visual support (AWT) until I managed to solve the riddle easily. I started with the 2-letter and 3-letter combinations in accordance with lists from puzzle-solvers' web sites from English-speaking quiz aficionados.
tired now
Smee
Posted: Mon Aug 06, 2012 2:14 pm
by Injust
just another solution
Posted: Tue May 14, 2013 11:30 am
by yourMom
This was way harder than expected though my solution is a bit of an overkill. Yet a good question is why does it have more than 2,500 solvers.
I solved it by writing a C++ program which searches every possibility for the last word in an dictionary and submits the good ones on the site. Of course, I used some pruning while generating the words (to have at least 2 vowels, etc.). Here's the code:
Code: Select all
#include <set>
#include <vector>
#include <cstdio>
#include <string>
#include <fstream>
#include <cstring>
#include <algorithm>
using namespace std;
string str = "IKMGQWIHY";
int id[32];
set<string> dict;
int main() {
ifstream fin("part-of-speech.txt");
string str;
while (fin >> str) {
for (int i=0; i < (int) str.size(); ++i)
if (str[i] >= 'A' && str[i] <= 'Z')
str[i] += 32;
dict.insert(str);
}
printf("read total %d entries\n", (int)dict.size());
FILE *out = fopen("res", "w");
for (int mask=1220700; mask < (1 << 26); ++mask) {
if (__builtin_popcount(mask) != 8) continue;
if (mask % 100 == 0) printf("%d ", mask); // progress
vector<char> cur; cur.clear();
int am = 0;
for (int i=0; i < 26; ++i)
if (mask & (1 << i)) {
cur.push_back(i+'a');
if (i == 0 || i == 4 || i == 8 || i == 15 || i == 21) // vowels
am ++;
}
if (am < 2) continue;
do {
string now; now.clear();
for (int i=0; i < 6; ++i)
now += cur[i];
now += cur[0];
now += cur[6];
now += cur[7];
if (dict.find(now) != dict.end()) {
//printf("found %s\n", now.c_str());
//fprintf(out, "found %s\n", now.c_str());
string ans = "firefox http://www.hacker.org/challenge/chal.php?answer=" + now + "\\&id=21\\&go=Submit";
system(ans.c_str());
system("sleep 30");
}
} while (next_permutation(cur.begin(), cur.end()));
}
fin.close();
return 0;
}
Posted: Wed Jun 05, 2013 2:38 pm
by Limberneck
I just figured the word "answer" would be there, so I looked for words that were 6 letters long, and there was only one, and from then on it's pretty straight forward.
this was a hard one
Posted: Thu Apr 10, 2014 10:01 pm
by Grusewolf
After several tries I startetd guessing character for character and build up a dictionary.
To do this I wrote this little groovy script which showed me the ciphertext and under it the plaintext as far as conversion from dictonary was possible. All other characters where shown as '.'
I started filling my dictionary with o -> I and A->S, because I guessed, the word 'OA' near the end could be the english word 'IS'.
From that point on, it became easier and easier.
Code: Select all
def cipher = 'ISS NVVK DIPXYWA PIT AVSUY QIAOP PWZEHVNWIEDZ. CDYT ZVM LOTK HDY AVSMHOVT HV HDOA HYFH, ZVM COSS QY IQSY HV NYH HDY ITACYW, CDOPD OA IKMGQWIHY.'
def dic = [
' ': ' ',
'O': 'I',
'A': 'S',
'H': 'T',
'D': 'H',
'Y': 'E',
'I': 'A',
'T': 'N',
'C': 'W',
'W': 'R',
'P': 'C',
'N': 'G',
'V': 'O',
'X': 'K',
'K': 'D',
'Q': 'B',
'S': 'L',
'U': 'V',
'Z': 'Y',
'E': 'P',
'M': 'U',
'L': 'F',
'F': 'X',
]
println cipher
for(index in 0..<cipher.size()) {
print dic[cipher[index]]?:'.'
}
Re: Substitute Teacher
Posted: Wed Feb 04, 2015 4:22 am
by polocatfan
Andr3w wrote:how did you solve the challenge ?
I don't think that its solvable manually like I tried first time ...
did you wrote own scripts ?
if yes in which language ? and could you post it eventually ? i would be really interested in how to solve such a program
I just looked for the word "answer"