1 diff -urN busybox.old/include/applets.h busybox.dev/include/applets.h
2 --- busybox.old/include/applets.h 2006-01-11 01:32:47.302791000 +0100
3 +++ busybox.dev/include/applets.h 2006-01-11 01:33:18.744756250 +0100
6 APPLET(nc, nc_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
9 + APPLET_NOUSAGE("netmsg", netmsg_main, _BB_DIR_BIN, _BB_SUID_ALWAYS)
12 APPLET(netstat, netstat_main, _BB_DIR_BIN, _BB_SUID_NEVER)
14 diff -urN busybox.old/networking/Config.in busybox.dev/networking/Config.in
15 --- busybox.old/networking/Config.in 2005-11-01 00:55:15.000000000 +0100
16 +++ busybox.dev/networking/Config.in 2006-01-11 01:33:18.744756250 +0100
19 A simple Unix utility which reads and writes data across network
26 + simple program for sending udp broadcast messages
28 config CONFIG_NC_GAPING_SECURITY_HOLE
29 bool "gaping security hole"
30 diff -urN busybox.old/networking/Makefile.in busybox.dev/networking/Makefile.in
31 --- busybox.old/networking/Makefile.in 2005-11-01 00:55:15.000000000 +0100
32 +++ busybox.dev/networking/Makefile.in 2006-01-11 01:34:02.939518250 +0100
34 NETWORKING-$(CONFIG_IPTUNNEL) += iptunnel.o
35 NETWORKING-$(CONFIG_NAMEIF) += nameif.o
36 NETWORKING-$(CONFIG_NC) += nc.o
37 +NETWORKING-$(CONFIG_NETMSG) += netmsg.o
38 NETWORKING-$(CONFIG_NETSTAT) += netstat.o
39 NETWORKING-$(CONFIG_NSLOOKUP) += nslookup.o
40 NETWORKING-$(CONFIG_PING) += ping.o
41 diff -urN busybox.old/networking/netmsg.c busybox.dev/networking/netmsg.c
42 --- busybox.old/networking/netmsg.c 1970-01-01 01:00:00.000000000 +0100
43 +++ busybox.dev/networking/netmsg.c 2006-01-11 01:33:18.748756500 +0100
45 +#include <sys/types.h>
46 +#include <sys/socket.h>
47 +#include <netinet/in.h>
55 +#ifndef CONFIG_NETMSG
56 +int main(int argc, char **argv)
58 +int netmsg_main(int argc, char **argv)
62 + struct sockaddr_in addr;
64 + unsigned char buf[1001];
67 + fprintf(stderr, "usage: %s \"message\"\n", argv[0]);
71 + if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
72 + perror("Opening socket");
76 + memset(&addr, 0, sizeof(addr));
77 + addr.sin_family = AF_INET;
78 + addr.sin_addr.s_addr = htonl(0xffffffff);
79 + addr.sin_port = htons(0x1337);
81 + memset(buf, 0, 1001);
85 + strncpy(buf + 2, argv[1], 998);
87 + if (setsockopt (s, SOL_SOCKET, SO_BROADCAST, (caddr_t) &optval, sizeof (optval)) < 0) {
88 + perror("setsockopt()");
92 + if (sendto(s, buf, 1001, 0, (struct sockaddr *) &addr, sizeof(addr)) < 0) {