DOS fortune is intended to be a port of the UNIX fortune(6) program to DOS/Windows, released under the GNU GPL. It is available as a DOS executable or as QuickBASIC 4.5 code. The main SourceForge page can be found here.
You can download the latest copy of the source code here and the latest copy of the binary here. The full download page can be seen here.