--- /dev/null
+CC=gcc
+CF=-g -Wall
+
+MV = mv
+CP = cp
+RM = rm
+MKDIR = mkdir
+
+BIN_DIR = /botm/bin/trap
+CONF_DIR = /botm/etc/www/conf
+
+
+CONF=1190 baltixy botm rnk
+
+
+# LF=-lIL
+#LF2=-lcgi
+
+all: trap
+
+
+trap: trap.c
+ $(CC) $(CF) -o trap trap.c
+
+bin_dir:
+ $(MKDIR) -p $(BIN_DIR)
+
+cp_bin: trap | bin_dir
+ $(CP) trap $(BIN_DIR)
+
+conf_dir:
+ $(MKDIR) -p $(CONF_DIR)
+
+cp_conf: $(CONF)
+
+
+$(CONF): trap.conf | conf_dir
+ $(MKDIR) -p $(CONF_DIR)/$@
+ $(CP) trap.conf $(CONF_DIR)/$@
+
+install: cp_bin cp_conf
+
+
+rm_bin:
+ $(RM) -f $(BIN_DIR)/trap
+
+rm_conf:
+ $(RM) -f $(foreach conf, $(CONF), $(CONF_DIR)/$(conf)/trap.conf)
+
+uninstall: rm_bin rm_conf
+
+
+clean:
+ $(RM) -r trap
+
+.PHONY: all bin_dir cp_bin conf_dir cp_conf install rm_bin rm_conf uninstall clean $(CONF)
--- /dev/null
+// TRAAAP ! ! !
+//#include <cgi.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+
+int main (int argc, char *argv[])
+{
+ //s_cgi *cgi;
+
+ unsigned long randomhex;
+ //cgi=cgiInit();
+
+ sscanf(((getenv("PATH_INFO")!=NULL)?(getenv("PATH_INFO")+1):""),"%lx",&randomhex);
+ srand(randomhex);
+
+ printf("Content-type: text/html\n\n");
+ fputs("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"\"><html lang=\"en\"><head>\n",stdout);
+ printf("<title>Oh no, the trap! • 0x%08lx • Bicycles on the Moon</title>\n",randomhex);
+ fputs("<link rel=\"home\" title=\"1190\" href=\"/\"><link rel=\"stylesheet\" href=\"/css/botm.css\"><link rel=\"icon\" type=\"image/png\" href=\"/img/favicon.png\">\n",stdout);
+ fputs("<meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\"></head><body>\n",stdout);
+ //fputs("<img src=\"/img/botmlogo2.png\" alt=\"1190.bicyclesonthemoon.info\" border=\"0\">\n",stdout);
+ fputs("<H1>Oh no, the trap!</H1>\n",stdout);
+ printf("Your number is: 0x%08lx<br>\n",randomhex);
+ fputs("Please see these too:<ul><li>\n",stdout);
+ randomhex=rand();
+ printf("<a href=\"/trap/%08lx\">0x%08lx</a>\n",randomhex,randomhex);
+ fputs("</li><li>\n",stdout);
+ randomhex=rand();
+ printf("<a href=\"/trap/%08lx\">0x%08lx</a>\n",randomhex,randomhex);
+ fputs("</li><li>\n",stdout);
+ randomhex=rand();
+ printf("<a href=\"/trap/%08lx\">0x%08lx</a>\n",randomhex,randomhex);
+ fputs("</li><li>\n",stdout);
+ randomhex=rand();
+ printf("<a href=\"/trap/%08lx\">0x%08lx</a>\n",randomhex,randomhex);
+ fputs("</li><li>\n",stdout);
+ randomhex=rand();
+ printf("<a href=\"/trap/%08lx\">0x%08lx</a>\n",randomhex,randomhex);
+ fputs("</li></ul>\n",stdout);
+ fputs("But don't look at these:<ul><li>\n",stdout);
+ randomhex=rand();
+ printf("<a href=\"/trap/%08lx\">0x%08lx</a>\n",randomhex,randomhex);
+ fputs("</li><li>\n",stdout);
+ randomhex=rand();
+ printf("<a href=\"/trap/%08lx\">0x%08lx</a>\n",randomhex,randomhex);
+ fputs("</li><li>\n",stdout);
+ randomhex=rand();
+ printf("<a href=\"/trap/%08lx\">0x%08lx</a>\n",randomhex,randomhex);
+ fputs("</li><li>\n",stdout);
+ randomhex=rand();
+ printf("<a href=\"/trap/%08lx\">0x%08lx</a>\n",randomhex,randomhex);
+ fputs("</li><li>\n",stdout);
+ randomhex=rand();
+ printf("<a href=\"/trap/%08lx\">0x%08lx</a>\n",randomhex,randomhex);
+ fputs("</li></ul></body></html>\n",stdout);
+
+
+ return 0;
+}