mirror of https://github.com/dirtbags/moth.git
IPv6 for ircd, mcp
This commit is contained in:
parent
7a4c78e24e
commit
607034b2e3
|
@ -0,0 +1,6 @@
|
|||
00ADMIN_PKGDIR = $(TARGET)/00admin
|
||||
|
||||
00admin-install:
|
||||
$(call COPYTREE, packages/00admin/service, $(00ADMIN_PKGDIR)/service)
|
||||
|
||||
PACKAGES += 00admin
|
|
@ -0,0 +1,14 @@
|
|||
#! /bin/sh
|
||||
|
||||
exec 2>&1
|
||||
|
||||
[ -r /etc/passwd ] || echo 'root:x:0:0:root:/tmp:/bin/sh' > /etc/passwd
|
||||
|
||||
# Always do this, in case something else set a root password
|
||||
echo 'root:$1$bEGCYemG$pAo9KXWQKgQNijRGKSb7e1' | chpasswd --encrypted
|
||||
|
||||
# Bring up the NIC; this will get us at least a link-local address, and
|
||||
# hopefully a global address with stateless autoconfiguration.
|
||||
ip link set eth0 up
|
||||
|
||||
exec dropbear -r ./rsa.key -E -F
|
|
@ -1,16 +0,0 @@
|
|||
CTFBASE_PKGDIR = $(TARGET)/ctfbase
|
||||
|
||||
ctfbase-install: ctfbase-build
|
||||
mkdir -p $(CTFBASE_PKGDIR)/bin/
|
||||
cp packages/ctfbase/src/arc4 $(CTFBASE_PKGDIR)/bin/
|
||||
|
||||
$(call COPYTREE, packages/ctfbase/service, $(CTFBASE_PKGDIR)/service)
|
||||
|
||||
ctfbase-clean:
|
||||
rm -rf $(CTFBASE_PKGDIR)
|
||||
$(MAKE) -C packages/ctfbase/src clean
|
||||
|
||||
ctfbase-build:
|
||||
$(MAKE) -C packages/ctfbase/src build
|
||||
|
||||
PACKAGES += ctfbase
|
|
@ -1,13 +0,0 @@
|
|||
#! /bin/sh -e
|
||||
|
||||
PATH=/bin:/opt/ctfbase/bin; export PATH
|
||||
|
||||
while true; do
|
||||
# Fetch list of teams
|
||||
teams=/var/lib/ctf/teams.txt
|
||||
rm -f $teams.tmp
|
||||
wget -q -O $teams.tmp http://10.0.0.2/teams.txt && \
|
||||
mv $teams.tmp $teams
|
||||
|
||||
sleep 60
|
||||
done
|
|
@ -1,4 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
exec svlogd -tt $PWD
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
#! /bin/sh -e
|
||||
|
||||
exec 2>&1
|
||||
|
||||
# Make user accounts
|
||||
adduser -D -u 0 -h /var root || true
|
||||
adduser -D -u 100 -h /tmp -g 'CTF Services' ctf || true
|
||||
adduser -D -u 65534 -h / nobody || true
|
||||
echo 'root:$1$bEGCYemG$pAo9KXWQKgQNijRGKSb7e1' | chpasswd --encrypted
|
||||
|
||||
# Set up networking for all CTF ips
|
||||
ip link set eth0 up
|
||||
|
||||
install -o root -m 0755 -d /var/lib/ctf/tokens
|
||||
exec ./ctfd
|
|
@ -1,4 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
iptables -D INPUT -s 10.0.0.0/16 --proto tcp --dport 55 -j ACCEPT
|
||||
iptables -D INPUT --proto tcp --dport 55 -j REJECT
|
|
@ -1,6 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
exec 2>&1
|
||||
iptables -A INPUT -s 10.0.0.0/16 --proto tcp --dport 22 -j ACCEPT
|
||||
iptables -A INPUT --proto tcp --dport 22 -j REJECT
|
||||
exec dropbear -r ./rsa.key -E -F
|
|
@ -1,7 +0,0 @@
|
|||
build: arc4
|
||||
|
||||
arc4: arc4.c
|
||||
arc4: CFLAGS += -DARC4_MAIN
|
||||
|
||||
clean:
|
||||
rm -f *.o arc4
|
|
@ -1 +0,0 @@
|
|||
../../../src/arc4.c
|
|
@ -1 +0,0 @@
|
|||
../../../src/arc4.h
|
|
@ -1,8 +0,0 @@
|
|||
fireeye-source:
|
||||
fireeye-build:
|
||||
|
||||
fireeye-install: packages/fireeye/tokens.txt
|
||||
mkdir -p $(TARGET)/fireeye/
|
||||
cp $< $(TARGET)/fireeye/
|
||||
|
||||
PACKAGES += fireeye
|
File diff suppressed because it is too large
Load Diff
|
@ -25,4 +25,4 @@ inferno-install: $(INFERNO_BUILDDIR)/build
|
|||
inferno-clean:
|
||||
rm -rf $(INFERNO_PKGDIR) $(INFERNO_BUILDDIR)
|
||||
|
||||
PACKAGES += inferno
|
||||
PACKAGES += inferno
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
IRCD_PKGDIR = $(TARGET)/ircd
|
||||
IRCD_BUILDDIR = $(BUILD)/ircd
|
||||
IRCD_VERSION = 17.1
|
||||
IRCD_VERSION = 18
|
||||
IRCD_TAR = $(CACHE)/ngircd-$(IRCD_VERSION).tar.gz
|
||||
IRCD_URL = ftp://ftp.berlios.de/pub/ngircd/ngircd-$(IRCD_VERSION).tar.gz
|
||||
IRCD_SRCDIR = $(IRCD_BUILDDIR)/ngircd-$(IRCD_VERSION)
|
||||
|
||||
# Prevents automake from mangling cross-compiled binary names
|
||||
IRCD_CC_HOST := $(shell $(CC) -v 2>&1 | awk '/Target:/{print $$2}')
|
||||
IRCD_CONF_OPT := --host=i686-unknown-linux-uclibc --program-transform-name=
|
||||
|
||||
ircd-install: ircd-build
|
||||
|
||||
|
@ -23,7 +22,7 @@ $(IRCD_BUILDDIR)/source: $(IRCD_TAR)
|
|||
|
||||
ircd-build: $(IRCD_BUILDDIR)/built
|
||||
$(IRCD_BUILDDIR)/built: $(IRCD_BUILDDIR)/source
|
||||
cd $(IRCD_SRCDIR) && ./configure $(IRCD_CONF_OPT)
|
||||
cd $(IRCD_SRCDIR) && ./configure $(CONFIG_XCOMPILE_FLAGS)
|
||||
$(MAKE) -C $(IRCD_SRCDIR)
|
||||
touch $@
|
||||
|
||||
|
@ -36,4 +35,4 @@ ircd-install: ircd-build
|
|||
ircd-clean:
|
||||
rm -rf $(IRCD_BUILDDIR)
|
||||
|
||||
PACKAGES += ircd
|
||||
PACKAGES += ircd
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[Global]
|
||||
Name = irc.ctf
|
||||
Info = CTF IRC
|
||||
OperCanUseMode = yes
|
||||
MotdPhrase = "welcome datacomp"
|
||||
|
||||
[Operator]
|
||||
Name = oper
|
||||
Password = opsplz
|
||||
Password = operpass
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#! /bin/sh
|
||||
|
||||
exec 2>&1
|
||||
|
||||
ip addr add fd84:b410:3441::6 label eth0:ircd dev eth0
|
||||
|
||||
exec /opt/ircd/bin/ngircd --config ./ngircd.conf --nodaemon
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
#! /bin/sh
|
||||
|
||||
IP=$(cat ip.txt)
|
||||
ip addr del $IP dev eth0
|
|
@ -0,0 +1 @@
|
|||
fd84:b410:3441::2/64
|
|
@ -2,11 +2,13 @@
|
|||
|
||||
exec 2>&1
|
||||
|
||||
ip addr add 10.0.0.2/16 label eth0:mcp dev eth0
|
||||
|
||||
install -d /var/www
|
||||
# Bring up address
|
||||
IP=$(cat ip.txt)
|
||||
ip addr add $IP dev eth0
|
||||
ip monitor | grep -q $IP
|
||||
|
||||
# Link in puzzles and web pages
|
||||
install -d /var/www
|
||||
for d in /opt/*; do
|
||||
if [ -d $d/puzzles ]; then
|
||||
ln -sf $d/puzzles /var/www/$(basename $d)
|
||||
|
@ -20,4 +22,4 @@ done
|
|||
mkdir -p sites
|
||||
cd sites
|
||||
ln -sf /var/www default
|
||||
exec tcpsvd -u ctf 10.0.0.2 80 /opt/mcp/bin/fnord-cgi
|
||||
exec tcpsvd -u ctf $IP 80 /opt/mcp/bin/fnord-cgi
|
||||
|
|
|
@ -4,7 +4,9 @@ exec 2>&1
|
|||
|
||||
DB=/var/lib/ctf/puzzles.db
|
||||
|
||||
mkdir -p /var/www
|
||||
adduser -D -S -h /var/lib/ctf -H ctf || true
|
||||
|
||||
mkdir -p /var/lib/ctf /var/www
|
||||
touch $DB
|
||||
chown ctf $DB
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
exec svlogd -tt $PWD
|
|
@ -1,20 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
exec 2>&1
|
||||
|
||||
ip addr add 10.0.0.2/16 label eth0:mcp dev eth0
|
||||
|
||||
DB=/var/lib/ctf/tokens.db
|
||||
|
||||
if [ ! -f $DB ]; then
|
||||
# Append any package-provided tokens
|
||||
cat /opt/*/tokens.txt >$DB 2>/dev/null
|
||||
chown ctf $DB
|
||||
fi
|
||||
|
||||
for fn in /var/lib/ctf/tokens.db /var/lib/ctf/claim.db; do
|
||||
touch $fn
|
||||
chown ctf $fn
|
||||
done
|
||||
|
||||
exec tcpsvd -u ctf 0 1 /opt/mcp/bin/in.tokend
|
|
@ -1 +1 @@
|
|||
fd84:b410:3441:1663::8888/48
|
||||
fd84:b410:3441::8888/64
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#! /bin/sh -e
|
||||
|
||||
exec 2>&1
|
||||
|
||||
IP=$(cat ip.txt)
|
||||
ip addr add $IP label eth0:octopus dev eth0
|
||||
ip addr add $IP dev eth0
|
||||
ip monitor | grep -q $IP
|
||||
exec /opt/octopus/bin/octopus ${IP%/*}
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
exec 2>&1
|
||||
|
||||
hostname router
|
||||
|
||||
PFX=fd84:b410:3441
|
||||
|
||||
hostname router
|
||||
|
||||
# We're a router
|
||||
echo 1 > /proc/sys/net/ipv6/conf/default/forwarding
|
||||
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
|
||||
|
||||
# Bring up main ethernet interface
|
||||
ip addr add $PFX:0::1/64 dev eth0
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
exec 2>&1
|
||||
|
||||
if adduser -D -u 0 -h / -s /bin/sh root; then
|
||||
echo 'root:$1$xAJ7KwiU$BeKJjYGs9r/hY9Ag4qv4I1' | chpasswd --encrypted
|
||||
done
|
||||
[ -r /etc/passwd ] || echo 'root:$1$xAJ7KwiU$BeKJjYGs9r/hY9Ag4qv4I1:0:0:root:/tmp:/bin/sh' > /etc/passwd
|
||||
|
||||
exec dropbear -r ./rsa.key -E -F
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
sandia-source:
|
||||
sandia-build:
|
||||
|
||||
sandia-install: packages/sandia/tokens.txt
|
||||
mkdir -p $(TARGET)/sandia/
|
||||
cp $< $(TARGET)/sandia/
|
||||
|
||||
PACKAGES += sandia
|
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +0,0 @@
|
|||
solera-source:
|
||||
solera-build:
|
||||
|
||||
solera-install: packages/solera/tokens.txt
|
||||
mkdir -p $(TARGET)/solera/
|
||||
cp $< $(TARGET)/solera/
|
||||
|
||||
PACKAGES += solera
|
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +0,0 @@
|
|||
splunk-source:
|
||||
splunk-build:
|
||||
|
||||
splunk-install: packages/splunk/tokens.txt
|
||||
mkdir -p $(TARGET)/splunk/
|
||||
cp $< $(TARGET)/splunk/
|
||||
|
||||
PACKAGES += splunk
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue