mirror of https://github.com/dirtbags/moth.git
lots of little fixups, caught up with todo after trail run in ACS
This commit is contained in:
parent
97f08e76d2
commit
9df8ae9ca5
2
go
2
go
|
@ -10,7 +10,7 @@ case ${1:-$TYPE} in
|
||||||
packages='router'
|
packages='router'
|
||||||
;;
|
;;
|
||||||
p2)
|
p2)
|
||||||
packages='p2 gs p2steg archaeology '
|
packages='p2 gs archaeology nocode steg js proto'
|
||||||
;;
|
;;
|
||||||
p2cli)
|
p2cli)
|
||||||
packages='p2client'
|
packages='p2client'
|
||||||
|
|
|
@ -148,6 +148,8 @@ main(int argc, char *argv[])
|
||||||
closedir(opt);
|
closedir(opt);
|
||||||
|
|
||||||
printf("</dl>\n");
|
printf("</dl>\n");
|
||||||
|
|
||||||
|
printf("<p>New puzzles are unlocked when any team answers the highest-scoring puzzle in a category.</p>");
|
||||||
cgi_foot();
|
cgi_foot();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -19,7 +19,7 @@ p2-install: packages/p2/src/modem eris ctfbase
|
||||||
$(call COPYTREE, packages/p2/www, $(P2_PKGDIR)/www)
|
$(call COPYTREE, packages/p2/www, $(P2_PKGDIR)/www)
|
||||||
|
|
||||||
p2-clean:
|
p2-clean:
|
||||||
$(MAKE) -C packages/p2/src
|
$(MAKE) -C packages/p2/src clean
|
||||||
|
|
||||||
PACKAGES += p2
|
PACKAGES += p2
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,14 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Project 2 is a puzzle-based game for individuals or teams.
|
||||||
|
Get started by creating a new team at the console, then start
|
||||||
|
working on the <a href="puzzles.html">puzzles</a>.
|
||||||
|
When you have solved a puzzle, enter the answer at the console
|
||||||
|
to change your ranking on the <a href="scoreboard.html">scoreboard</a>.
|
||||||
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
This event would not be possible without the help of many people.
|
This event would not be possible without the help of many people.
|
||||||
<a href="credits.html">Thank you, people</a>.
|
<a href="credits.html">Thank you, people</a>.
|
||||||
|
|
|
@ -7,6 +7,7 @@ p2client-install:
|
||||||
|
|
||||||
$(call COPYTREE, packages/p2client/service, $(P2CLIENT_PKGDIR)/service)
|
$(call COPYTREE, packages/p2client/service, $(P2CLIENT_PKGDIR)/service)
|
||||||
loadkeys -b packages/p2client/dumbterm.map > $(P2CLIENT_PKGDIR)/dumbterm.kmap
|
loadkeys -b packages/p2client/dumbterm.map > $(P2CLIENT_PKGDIR)/dumbterm.kmap
|
||||||
|
cp packages/p2client/lite-16.fnt $(P2CLIENT_PKGDIR)
|
||||||
|
|
||||||
p2client-clean:
|
p2client-clean:
|
||||||
rm -rf $(P2CLIENT_PKGDIR)
|
rm -rf $(P2CLIENT_PKGDIR)
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
|
|
||||||
exec 2>&1
|
exec 2>&1
|
||||||
|
|
||||||
if grep 'debug' /proc/cmdline; then
|
|
||||||
ip link set dev eth0 up
|
ip link set dev eth0 up
|
||||||
|
|
||||||
|
if grep 'debug' /proc/cmdline; then
|
||||||
ip addr add dev eth0 10.0.0.110/24
|
ip addr add dev eth0 10.0.0.110/24
|
||||||
exec sleep 8d
|
exec sleep 8d
|
||||||
else
|
else
|
||||||
|
|
|
@ -3,16 +3,24 @@
|
||||||
# Try hard to look like a serial terminal
|
# Try hard to look like a serial terminal
|
||||||
reset
|
reset
|
||||||
|
|
||||||
# Maybe this is some startup code
|
# Simulate a green-phosphor CRT
|
||||||
sleep 0.4
|
printf '\033]P0111122\033]P788ff00\033]Pfff8800'
|
||||||
|
|
||||||
# Print some bullshit to confuse people
|
# Print some bullshit to confuse people
|
||||||
printf 'S0:1200N81 '
|
printf 'S0:1200N81 '
|
||||||
|
|
||||||
# Simulate a green-phosphor CRT
|
# Some diagnostic codes
|
||||||
printf '\033]P0111122\033]P788ff00\033]Pfff8800'
|
printf '['
|
||||||
|
|
||||||
# More bullshit
|
ip addr list dev eth0 | awk '
|
||||||
printf '[68]\n'
|
(/inet /) { printf("A"); }
|
||||||
|
(/NO-CARRIER/) { printf("l"); }
|
||||||
|
(/state UP/) { printf("C"); }
|
||||||
|
'
|
||||||
|
|
||||||
|
printf ']\n'
|
||||||
|
|
||||||
|
# Pretend to run initialization routines
|
||||||
|
sleep 3
|
||||||
|
|
||||||
exec nc 10.0.0.2 5555 2>/dev/null
|
exec nc 10.0.0.2 5555 2>/dev/null
|
||||||
|
|
|
@ -2,13 +2,20 @@
|
||||||
|
|
||||||
exec 2>&1
|
exec 2>&1
|
||||||
|
|
||||||
# Turn off default gettys
|
# Turn off conflicting getty
|
||||||
sv d tty1 tty2 tty3 tty4
|
sv d tty1
|
||||||
|
|
||||||
if ! sv s tty1 | grep down; then
|
if ! sv s tty1 | grep down; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Cool font
|
||||||
|
setfont -C /dev/tty1 /opt/p2client/lite-16.fnt
|
||||||
|
|
||||||
|
|
||||||
|
if ! grep -q debug /proc/cmdline; then
|
||||||
# Don't let C-A-F2 switch away
|
# Don't let C-A-F2 switch away
|
||||||
|
sv d tty2 tty3 tty4
|
||||||
deallocvt
|
deallocvt
|
||||||
|
|
||||||
# Disable magic sysrq key
|
# Disable magic sysrq key
|
||||||
|
@ -20,6 +27,10 @@ setterm -blank 0 -powersave off -powerdown 0
|
||||||
# Make this like a VT52; including disabling ctrl-alt-del
|
# Make this like a VT52; including disabling ctrl-alt-del
|
||||||
loadkmap < /opt/p2client/dumbterm.kmap
|
loadkmap < /opt/p2client/dumbterm.kmap
|
||||||
|
|
||||||
|
# Disable console logging
|
||||||
|
echo 1 4 1 4 > /proc/sys/kernel/printk
|
||||||
|
fi
|
||||||
|
|
||||||
# Run the console!
|
# Run the console!
|
||||||
exec getty -n -l ./p2connect 38400 tty1
|
exec getty -n -l ./p2connect 38400 tty1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue