Running NANA on Linux
Neil Corlett’s NANA is still the best tool around for finding graphical data in a binary. Unfortunately, it’s DOS only.
If you’ve been around my site, you’ll see I’ve written a loader for using NANA on Windows via DOSBox. That code, however, relied on Windows “DIR” for detecting the DOS8.3 name of the file to ‘nana’.
I tweaked the code to work on Linux with Linux DOSBox.
Assuming you’ve compiled DOSBox and have installed PHP, do the following.
First off, download NANA and unzip it so you have NANA.EXE. Then,
sudo mkdir /usr/local/win32
sudo mkdir /usr/local/win32/programs
sudo mv nana.exe /usr/local/win32/programs
sudo vi /usr/local/win32/nana
Now paste in the following code block:
#!/bin/sh
TEMP="/tmp"
WIN32="/usr/local/win32"
echo
echo NANA Loader for Linux
echo By Derrick Sobodash
echo
if [ "$#" -gt "0" ]; then
echo Viewing $1 via DOSBox …
echo
#if [ ${1:0:1} eq "/" ]
if [ ${1%"${1#?}"} = "/" ]; then
ln -s $1 $TEMP/nana
else
ln -s $PWD/$1 $TEMP/nana
fi
dosbox -noconsole -c “mount D $WIN32/programs/nana” -c “mount C $TEMP” -
c “D:\\nana.exe C:\\nana”
rm $TEMP/nana
echo Program terminated.
echo
else
echo You must specify a file to view!
echo
fi
Save the file, then chmod it 755. You can create a globally accessible link to it with:
sudo ln -s /usr/local/win32/nana /usr/local/bin/nana
Now whenever you type “nana filename” at the command prompt, NANA will open via DOSBox and let you view your file. It’s quite fast too, assuming you use the DOSBox dynamic recompilation engine.
When you exit NANA, the temporary symlink is destroyed.
Related Posts
- Safe way to start DOSBox with config...
- How To undervolt with PHC 0.3.0...
- How To: Improved Chinese fonts on Ubuntu...
- DOSBox Linker...
Related posts brought to you by Yet Another Related Posts Plugin.
About this entry
You’re currently reading “Running NANA on Linux,” an entry on CinnamonPirate.com
- Published:
- Monday, February 5th, 2007 at 2:32 pm
- Author:
- Derrick Sobodash
- Previous:
- Fixing static IP connection in feisty












No comments
Jump to comment form | comments rss