mirror of https://github.com/dirtbags/moth.git
Potential new pwnables image
This commit is contained in:
parent
62006499e3
commit
06fd1a2c87
|
@ -5,9 +5,9 @@ TARGET = $(CURDIR)/target
|
|||
FAKE = fakeroot -s $(CURDIR)/fake -i $(CURDIR)/fake
|
||||
INSTALL = $(FAKE) install
|
||||
|
||||
all: 99-pwnables.tce
|
||||
all: pwnables.tce
|
||||
|
||||
99-pwnables.tce: target
|
||||
pwnables.tce: target
|
||||
$(FAKE) sh -c 'cd target && tar -czf - --exclude=placeholder --exclude=*~ .' > $@
|
||||
|
||||
target:
|
||||
|
@ -17,13 +17,5 @@ target:
|
|||
|
||||
$(MAKE) -C daemons TARGET=$(TARGET) install
|
||||
|
||||
$(INSTALL) -d $(TARGET)/usr/lib/www
|
||||
$(INSTALL) $(CGI) $(TARGET)/usr/lib/www
|
||||
|
||||
$(INSTALL) -D flag $(TARGET)/var/lib/tftp/flag
|
||||
$(INSTALL) -D flag $(TARGET)/var/lib/notes/flag
|
||||
$(INSTALL) -D flag $(TARGET)/home/flag/.plan
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf target
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
all: in.fingerd
|
|
@ -1,38 +0,0 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main(int argc, char *argv)
|
||||
{
|
||||
char user[256];
|
||||
char path[512];
|
||||
char *data;
|
||||
FILE *f;
|
||||
size_t count;
|
||||
int i;
|
||||
|
||||
if (NULL == gets(user)) {
|
||||
return 0;
|
||||
}
|
||||
for (data = user; *data; data += 1) {
|
||||
if ('\r' == *data) {
|
||||
*data = 0;
|
||||
}
|
||||
}
|
||||
if (0 == user[0]) {
|
||||
printf("Nobody's home.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
sprintf(path, "/home/%s/.plan", user);
|
||||
f = fopen(path, "r");
|
||||
if (NULL == f) {
|
||||
printf("No such user.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
data = path;
|
||||
while (count = fread(data, sizeof(*data), 1, f)) {
|
||||
fwrite(data, count, 1, stdout);
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
exec tcpsvd 0 79 /usr/sbin/in.fingerd
|
|
@ -0,0 +1 @@
|
|||
dirtbags
|
|
@ -0,0 +1 @@
|
|||
dirtbags
|
|
@ -0,0 +1 @@
|
|||
dirtbags
|
|
@ -0,0 +1 @@
|
|||
dirtbags
|
|
@ -1,3 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
exec udpsvd 0 69 tftpd /var/lib/tftp
|
Loading…
Reference in New Issue