mirror of https://github.com/dirtbags/moth.git
/service/* stays up
This commit is contained in:
parent
c4e6a49291
commit
d967189d99
|
@ -22,7 +22,7 @@ $(IRCD_BUILDDIR)/source: $(IRCD_TAR)
|
||||||
|
|
||||||
ircd-build: $(IRCD_BUILDDIR)/built
|
ircd-build: $(IRCD_BUILDDIR)/built
|
||||||
$(IRCD_BUILDDIR)/built: $(IRCD_BUILDDIR)/source
|
$(IRCD_BUILDDIR)/built: $(IRCD_BUILDDIR)/source
|
||||||
cd $(IRCD_SRCDIR) && ./configure $(CONFIG_XCOMPILE_FLAGS)
|
cd $(IRCD_SRCDIR) && ./configure $(CONFIG_XCOMPILE_FLAGS) --enable-ipv6
|
||||||
$(MAKE) -C $(IRCD_SRCDIR)
|
$(MAKE) -C $(IRCD_SRCDIR)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
IP=$(cat ip.txt)
|
||||||
|
ip addr del $IP dev eth0
|
|
@ -0,0 +1 @@
|
||||||
|
fd84:b410:3441::6/64
|
|
@ -1,7 +1,11 @@
|
||||||
[Global]
|
[Global]
|
||||||
Name = irc.ctf
|
Name = irc.ctf
|
||||||
Info = CTF IRC
|
Info = CTF IRC
|
||||||
|
AdminInfo1 = CTF IRC Server
|
||||||
|
AdminInfo2 = The table at the front of the room
|
||||||
|
AdminEmail = zephyr@dirtbags.net
|
||||||
MotdPhrase = "welcome datacomp"
|
MotdPhrase = "welcome datacomp"
|
||||||
|
Listen = fd84:b410:3441::6
|
||||||
|
|
||||||
[Operator]
|
[Operator]
|
||||||
Name = oper
|
Name = oper
|
||||||
|
|
|
@ -2,6 +2,11 @@
|
||||||
|
|
||||||
exec 2>&1
|
exec 2>&1
|
||||||
|
|
||||||
ip addr add fd84:b410:3441::6 label eth0:ircd dev eth0
|
IP=$(cat ip.txt)
|
||||||
|
ip addr add $IP label eth0:ircd dev eth0
|
||||||
|
ip monitor | grep -q $IP
|
||||||
|
|
||||||
exec /opt/ircd/bin/ngircd --config ./ngircd.conf --nodaemon
|
adduser -S -H -u 65534 nobody
|
||||||
|
adduser -S -H irc
|
||||||
|
|
||||||
|
exec setuidgid irc /opt/ircd/bin/ngircd --config ./ngircd.conf --nodaemon
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
10.0.0.14/24
|
fd84:b410:3441::07a6/64
|
||||||
|
|
|
@ -22,4 +22,4 @@ done
|
||||||
mkdir -p sites
|
mkdir -p sites
|
||||||
cd sites
|
cd sites
|
||||||
ln -sf /var/www default
|
ln -sf /var/www default
|
||||||
exec tcpsvd -u ctf $IP 80 /opt/mcp/bin/fnord-cgi
|
exec tcpsvd -u ctf ${IP%/*} 80 /opt/mcp/bin/fnord-cgi
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
<a href="scoring.html">About scoring</a>
|
<a href="scoring.html">About scoring</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="irc://10.0.0.2/ctf"
|
<a href="irc://[fd84:b410:3441::6]/ctf"
|
||||||
title="IRC on 10.0.0.2, channel #ctf">Contest chat</a>
|
title="IRC on fd84:b410:3441::6, channel #ctf">Contest chat</a>
|
||||||
carries important announcements, and sometimes clues and
|
carries important announcements, and sometimes clues and
|
||||||
puzzles.
|
puzzles.
|
||||||
</li>
|
</li>
|
||||||
|
@ -42,16 +42,13 @@
|
||||||
|
|
||||||
<h2>Rules</h2>
|
<h2>Rules</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
|
||||||
No ARP-level attacks: this includes IP spoofing.
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
No DoS attacks.
|
No DoS attacks.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
Do not attack machines outside the contest network
|
Do not attack machines outside <samp>fd84:b410:3441::/48</samp>.
|
||||||
(10.<i>x</i>.<i>x</i>.<i>x</i>). Low ports (under 1024) do not
|
Low ports (under 1024) do not run contest categories, don't
|
||||||
run contest categories.
|
waste your time.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
Consider the contest network hostile. It is up to you to
|
Consider the contest network hostile. It is up to you to
|
||||||
|
|
|
@ -6,8 +6,6 @@ printf-install: printf-build
|
||||||
mkdir -p $(PRINTF_PKGDIR)/bin/
|
mkdir -p $(PRINTF_PKGDIR)/bin/
|
||||||
$(MAKE) -C packages/printf/src install DESTDIR=$(CURDIR)/$(PRINTF_PKGDIR)
|
$(MAKE) -C packages/printf/src install DESTDIR=$(CURDIR)/$(PRINTF_PKGDIR)
|
||||||
|
|
||||||
$(call COPYTREE, packages/printf/tokens, $(PRINTF_PKGDIR)/tokens)
|
|
||||||
|
|
||||||
$(call COPYTREE, packages/printf/service, $(PRINTF_PKGDIR)/service)
|
$(call COPYTREE, packages/printf/service, $(PRINTF_PKGDIR)/service)
|
||||||
|
|
||||||
printf-clean:
|
printf-clean:
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
10.0.0.91
|
fd84:b410:3441::2329/64
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
exec 2>&1
|
exec 2>&1
|
||||||
|
|
||||||
IP=$(cat ip.txt)
|
IP=$(cat ip.txt)
|
||||||
ip addr add $IP label eth0:printf dev eth0
|
ip addr add $IP dev eth0
|
||||||
|
ip monitor | grep -q $IP
|
||||||
|
|
||||||
# So I say to him, "Alex, what's a good high port number for a CTF category?"
|
# So I say to him, "Alex, what's a good high port number for a CTF category?"
|
||||||
# And he says, "6"
|
# And he says, "6"
|
||||||
|
|
|
@ -1,8 +1,3 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
chpst -u 9001 -/ /opt/printf/bin ./printf \
|
exec chpst -u 9001 -/ /opt/printf/bin ./printf
|
||||||
3< /var/lib/ctf/tokens/printf0 \
|
|
||||||
4< /var/lib/ctf/tokens/printf1 \
|
|
||||||
5< /var/lib/ctf/tokens/printf2 \
|
|
||||||
6< /var/lib/ctf/tokens/printf3 \
|
|
||||||
7< /var/lib/ctf/tokens/printf4
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ TARGETS = printf
|
||||||
all: build
|
all: build
|
||||||
build: $(TARGETS)
|
build: $(TARGETS)
|
||||||
|
|
||||||
printf: printf.o token.o
|
printf: printf.o
|
||||||
|
|
||||||
install: $(TARGETS)
|
install: $(TARGETS)
|
||||||
install -m 0755 $(TARGETS) $(DESTDIR)/bin
|
install -m 0755 $(TARGETS) $(DESTDIR)/bin
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "token.h"
|
|
||||||
|
|
||||||
void
|
void
|
||||||
record(char *buf) {
|
record(char *buf) {
|
||||||
|
@ -19,40 +18,24 @@ record(char *buf) {
|
||||||
fputc('\n', stderr);
|
fputc('\n', stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t const key[] = {0x98, 0x37, 0x92, 0x7d,
|
|
||||||
0xa5, 0x6d, 0xc9, 0x61,
|
|
||||||
0xca, 0x97, 0xf8, 0xa5,
|
|
||||||
0xfe, 0x0f, 0xf6, 0xfc};
|
|
||||||
|
|
||||||
/* Storage space for tokens */
|
/* Storage space for tokens */
|
||||||
char token[5][TOKEN_MAX];
|
char *token[5] = {
|
||||||
|
"printf:xylep-radar-nanox",
|
||||||
|
"printf:xylep-radar-nanox",
|
||||||
|
"printf:xylep-radar-nanox",
|
||||||
|
"printf:xylep-radar-nanox",
|
||||||
|
"printf:xylep-radar-nanox"
|
||||||
|
};
|
||||||
|
|
||||||
/* Make this global so the stack isn't gigantic */
|
/* Make this global so the stack isn't gigantic */
|
||||||
char global_fmt[8000] = {0};
|
char global_fmt[8000] = {0};
|
||||||
|
|
||||||
|
|
||||||
/* Since this runs in a chroot jail, and setting up all the symlinks is
|
|
||||||
* a pain in the butt, we just read from file discriptors passed in.
|
|
||||||
* Pipes are the best thing. :D
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
read_tokens()
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
ssize_t len;
|
|
||||||
|
|
||||||
for (i = 0; i < sizeof(token)/sizeof(*token); i += 1) {
|
|
||||||
len = read_token_fd(i + 3, key, sizeof(key), token[i], sizeof(token[i]));
|
|
||||||
if (len >= sizeof(token[i])) abort();
|
|
||||||
token[i][len] = '\0';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[], char *env[])
|
main(int argc, char *argv[], char *env[])
|
||||||
{
|
{
|
||||||
char *t0 = token[0];
|
char *t0 = token[0];
|
||||||
int t1[TOKEN_MAX];
|
int t1[100];
|
||||||
char *fmt = global_fmt;
|
char *fmt = global_fmt;
|
||||||
char *datacomp = "welcome datacomp";
|
char *datacomp = "welcome datacomp";
|
||||||
int token4_flag = 0;
|
int token4_flag = 0;
|
||||||
|
@ -64,8 +47,6 @@ main(int argc, char *argv[], char *env[])
|
||||||
/* So the compiler won't complain about unused variables */
|
/* So the compiler won't complain about unused variables */
|
||||||
i = datacomp[0] ^ t0[0];
|
i = datacomp[0] ^ t0[0];
|
||||||
|
|
||||||
read_tokens();
|
|
||||||
|
|
||||||
/* Token 0 just hangs out on the stack */
|
/* Token 0 just hangs out on the stack */
|
||||||
|
|
||||||
/* Set up token 1 (%c%c%c%c...) */
|
/* Set up token 1 (%c%c%c%c...) */
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
printf
|
|
|
@ -1 +0,0 @@
|
||||||
偦轎奫^,5嗥贠教
|
|
|
@ -1 +0,0 @@
|
||||||
<EFBFBD>7<EFBFBD>}<7D>m<EFBFBD>aʗ<61><CA97><EFBFBD><0F><>
|
|
|
@ -1 +0,0 @@
|
||||||
printf
|
|
|
@ -1 +0,0 @@
|
||||||
偦轎奫^,5嗥贠教
|
|
|
@ -1 +0,0 @@
|
||||||
<EFBFBD>7<EFBFBD>}<7D>m<EFBFBD>aʗ<61><CA97><EFBFBD><0F><>
|
|
|
@ -1 +0,0 @@
|
||||||
printf
|
|
|
@ -1 +0,0 @@
|
||||||
偦轎奫^,5嗥贠教
|
|
|
@ -1 +0,0 @@
|
||||||
<EFBFBD>7<EFBFBD>}<7D>m<EFBFBD>aʗ<61><CA97><EFBFBD><0F><>
|
|
|
@ -1 +0,0 @@
|
||||||
printf
|
|
|
@ -1 +0,0 @@
|
||||||
偦轎奫^,5嗥贠教
|
|
|
@ -1 +0,0 @@
|
||||||
<EFBFBD>7<EFBFBD>}<7D>m<EFBFBD>aʗ<61><CA97><EFBFBD><0F><>
|
|
|
@ -1 +0,0 @@
|
||||||
printf
|
|
|
@ -1 +0,0 @@
|
||||||
偦轎奫^,5嗥贠教
|
|
|
@ -1 +0,0 @@
|
||||||
<EFBFBD>7<EFBFBD>}<7D>m<EFBFBD>aʗ<61><CA97><EFBFBD><0F><>
|
|
|
@ -1,7 +1,7 @@
|
||||||
TANKS_PKGDIR = $(TARGET)/tanks
|
TANKS_PKGDIR = $(TARGET)/tanks
|
||||||
TANKS_CACHE = $(CACHE)/tanks.git
|
TANKS_CACHE = $(CACHE)/tanks.git
|
||||||
TANKS_BUILDDIR = $(BUILD)/tanks
|
TANKS_BUILDDIR = $(BUILD)/tanks
|
||||||
TANKS_URL = "http://woozle.org/~neale/projects/ctanks"
|
TANKS_URL = "http://dirtbags.net/projects/tanks"
|
||||||
|
|
||||||
$(TANKS_CACHE):
|
$(TANKS_CACHE):
|
||||||
git clone --bare $(TANKS_URL) $@
|
git clone --bare $(TANKS_URL) $@
|
||||||
|
@ -23,7 +23,6 @@ tanks-install: tanks-build
|
||||||
|
|
||||||
$(call COPYTREE, packages/tanks/html, $(TANKS_PKGDIR)/html)
|
$(call COPYTREE, packages/tanks/html, $(TANKS_PKGDIR)/html)
|
||||||
cp packages/mcp/www/ctf.css $(TANKS_PKGDIR)/html/style.css
|
cp packages/mcp/www/ctf.css $(TANKS_PKGDIR)/html/style.css
|
||||||
cp packages/mcp/www/grunge.png $(TANKS_PKGDIR)/html
|
|
||||||
cp $(TANKS_BUILDDIR)/nav.html.inc $(TANKS_PKGDIR)/html
|
cp $(TANKS_BUILDDIR)/nav.html.inc $(TANKS_PKGDIR)/html
|
||||||
cp $(TANKS_BUILDDIR)/tanks.js $(TANKS_PKGDIR)/html
|
cp $(TANKS_BUILDDIR)/tanks.js $(TANKS_PKGDIR)/html
|
||||||
cp $(TANKS_BUILDDIR)/forf.html $(TANKS_PKGDIR)/html
|
cp $(TANKS_BUILDDIR)/forf.html $(TANKS_PKGDIR)/html
|
||||||
|
|
Loading…
Reference in New Issue