Welcome to the news archive. Here you'll find all the news items, ordered by date. You can use the links below to read other news items, or go back to the archive overview.
2008-11-06 21:26 - Hacking in Fallout 3
Fallout 3 is my latest addiction. It's a great game by the makers of Oblivion. Part of the game is the hacking of computer terminals. It is basically a Master Mind game, but then with letters. You click on a word that shows up in a memory dump of the terminal you are trying to hack, and the terminal tells you how many letters are correct and in the correct place. Of course, a real hacker would write a program to solve the puzzle. So, here it is:
#!/usr/bin/env python
known = {
'detector': 1,
}
words = '''
detector carpeted declared detailed dramatic devoured demanded
sinister disposal revealed messages released remained defended
peaceful designed prisoner
'''
words = set(words.split())
def dist(a, b):
return sum(la == lb for (la, lb) in zip(a, b))
for k in known:
for w in set(words):
if dist(k, w) != known[k]:
words.discard(w)
print "Try any of:", ', '.join(words)
The variable words should be filled with all the words you see on the terminal screen. The known variable should contain a dictionary with the known information you got from the terminal. For example, if you pick those:
-
detector: 1/8 correct
-
demanded: 2/8 correct
then the known variable should be:
known = {
'detector': 1,
'demanded': 2,
}
If you then run the program (using python fallout.py if you saved the script as fallout.py) it will tell you to try "carpeted" or "messages" as your next guess.
The script requires Python, which is installed by default on most Linux and MacOS systems and should be manually installed on Windows.
update: I have automated the hacking so you can easily use this website to make the sometimes difficult hacking a lot easier.
Comments
Post a comment
All fields are required, except when otherwise noted. You can use a limited subset of Restructured Text to markup the comment.
It might take up to five minutes for your comment to show up, due to caching of the pages.
Ha! I started writing a script to do this exact same thing, and figured I'd Google for it first. Yours is the first that I found. There are more at the end of the article here: http://planetfallout.gamespy.com/wiki/Fallout_3_Hacking
Your dist() function is the key, but it hurts my mind. I will have to play with it to better understand what's going on there. (My solution is way more verbose.) Thank you very much for the insight!
by steve - 1 year, 7 months ago.