diff --git a/ctf/flagd.py b/ctf/flagd.py index 6ae444b..f827972 100755 --- a/ctf/flagd.py +++ b/ctf/flagd.py @@ -142,6 +142,8 @@ class FlagServer(asynchat.async_chat): self.inbuf.append(data) def set_flag(self, team): + if not self.cat: + return self.flag = team self.submitter.set_flag(self.cat, team) f = open(os.path.join(flags_dir, self.cat), 'w') diff --git a/pwnables/Makefile b/pwnables/Makefile index 7eca8ef..5327560 100644 --- a/pwnables/Makefile +++ b/pwnables/Makefile @@ -18,4 +18,4 @@ target: $(MAKE) -C daemons TARGET=$(TARGET) install clean: - rm -rf target + rm -rf target pwnables.tce diff --git a/pwnables/skel/usr/lib/www/flag b/pwnables/skel/usr/lib/www/flag new file mode 120000 index 0000000..f4bdb9f --- /dev/null +++ b/pwnables/skel/usr/lib/www/flag @@ -0,0 +1 @@ +/var/lib/cat/flag \ No newline at end of file