Getting an un-encrypted fortunes.dat

Leo de Wit leo at philmds.UUCP
Wed Jan 4 22:02:12 AEST 1989


In article <2673 at m2-net.UUCP> mju at m-net.UUCP (Marc Unangst) writes:
    [some lines deleted...]
|Anybody know how the fortunes.dat file is encrypted?  I'd look in the fortune
|source, but we don't have it here...

Some years ago I wanted to decrypt /usr/games/lib/fortunes.dat so that
I could run fortune in a non-Unix environment. This proved to be easy.
I did the following (on Ultrix):
Remove the header (this is probably an index for the data that comes after).
Use od -c to find out where the data starts. What is left are '\0'-terminated
fortune messages. No encryption whatsoever.

Alternatively, you can do something like

	od -s10 /usr/games/lib/fortunes.dat

and process the output through sed. The od command gives every message
on one line, and you'll have to replace \t and \n by tab and newline
respectively, and remove the leading octal offset number.

There is one problem: you are probably not allowed to do this (that is,
bringing the information thus acquired to your own system). Any lawyers
out there?

	 Leo.



More information about the Comp.unix.questions mailing list