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]:
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.

dr. Sybren A. Stüvel
dr. Sybren A. Stüvel
Open Source software developer, photographer, drummer, and electronics tinkerer