Ok starting with my shellinabox post, I’ve expanded to include SIMH’s Altair emulator!
Executing this is really simple! Â A small shell script will take care of the whole thing.
#!/bin/sh
set -m
PID=$$
mkdir /tmp/$PID
cd /tmp/$PID
cp /usr/local/altair/1.ini .
cp /usr/local/altair/cpm22.dsk .
/usr/local/altair/altair 1.ini
cd /tmp
rm -rf /tmp/$PID
Of course I’m assuming dead processes get reaped. Â But check it out!
I’ve put BASIC-80 rev 5.21 and ZORK I in there!
Some advice on SIMH thought, you can execute a shell with the ! command (hitting Control-E will interrupt SIMH) so to prevent that alter the line in scp.c to make sure it’s a noop_cmd instead of spawn_cmd. Â Not that anyone was doing anything sneaky as the nobody user, but to prevent it.
{ “!”, &noop_cmd, 0, HLP_SPAWN },
Also an ini file of:
attach dsk0 cpm22.dsk
set throttle 2%
go 177400
exit
Keeps SIMH pretty tame.
Additionally I guess I should do a 12 hour cronjob to kill displaced altairs.