1 # Copyright (C) 2006 OpenWrt.org
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
6 diff -ruN busybox-1.2.0-old/include/applets.h busybox-1.2.0-new/include/applets.h
7 --- busybox-1.2.0-old/include/applets.h 2006-07-31 10:47:56.000000000 +0200
8 +++ busybox-1.2.0-new/include/applets.h 2006-07-31 11:21:00.000000000 +0200
10 USE_MV(APPLET(mv, _BB_DIR_BIN, _BB_SUID_NEVER))
11 USE_NAMEIF(APPLET(nameif, _BB_DIR_SBIN, _BB_SUID_NEVER))
12 USE_NC(APPLET(nc, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
13 +USE_NETMSG(APPLET_NOUSAGE(netmsg, netmsg, _BB_DIR_BIN, _BB_SUID_ALWAYS))
14 USE_NETSTAT(APPLET(netstat, _BB_DIR_BIN, _BB_SUID_NEVER))
15 USE_NICE(APPLET(nice, _BB_DIR_BIN, _BB_SUID_NEVER))
16 USE_NOHUP(APPLET(nohup, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
17 diff -ruN busybox-1.2.0-old/networking/Config.in busybox-1.2.0-new/networking/Config.in
18 --- busybox-1.2.0-old/networking/Config.in 2006-07-01 00:42:02.000000000 +0200
19 +++ busybox-1.2.0-new/networking/Config.in 2006-07-31 11:18:01.000000000 +0200
22 A simple Unix utility which reads and writes data across network
29 + simple program for sending udp broadcast messages
31 config CONFIG_NC_GAPING_SECURITY_HOLE
32 bool "gaping security hole"
33 diff -ruN busybox-1.2.0-old/networking/Makefile.in busybox-1.2.0-new/networking/Makefile.in
34 --- busybox-1.2.0-old/networking/Makefile.in 2006-07-01 00:42:02.000000000 +0200
35 +++ busybox-1.2.0-new/networking/Makefile.in 2006-07-31 11:18:01.000000000 +0200
37 NETWORKING-$(CONFIG_IPTUNNEL) += iptunnel.o
38 NETWORKING-$(CONFIG_NAMEIF) += nameif.o
39 NETWORKING-$(CONFIG_NC) += nc.o
40 +NETWORKING-$(CONFIG_NETMSG) += netmsg.o
41 NETWORKING-$(CONFIG_NETSTAT) += netstat.o
42 NETWORKING-$(CONFIG_NSLOOKUP) += nslookup.o
43 NETWORKING-$(CONFIG_PING) += ping.o
44 diff -ruN busybox-1.2.0-old/networking/netmsg.c busybox-1.2.0-new/networking/netmsg.c
45 --- busybox-1.2.0-old/networking/netmsg.c 1970-01-01 01:00:00.000000000 +0100
46 +++ busybox-1.2.0-new/networking/netmsg.c 2006-07-31 11:18:01.000000000 +0200
49 + * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
51 + * This is free software, licensed under the GNU General Public License v2.
53 +#include <sys/types.h>
54 +#include <sys/socket.h>
55 +#include <netinet/in.h>
63 +#ifndef CONFIG_NETMSG
64 +int main(int argc, char **argv)
66 +int netmsg_main(int argc, char **argv)
70 + struct sockaddr_in addr;
72 + unsigned char buf[1001];
75 + fprintf(stderr, "usage: %s <ip> \"<message>\"\n", argv[0]);
79 + if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
80 + perror("Opening socket");
84 + memset(&addr, 0, sizeof(addr));
85 + addr.sin_family = AF_INET;
86 + addr.sin_addr.s_addr = inet_addr(argv[1]);
87 + addr.sin_port = htons(0x1337);
89 + memset(buf, 0, 1001);
93 + strncpy(buf + 2, argv[2], 998);
95 + if (setsockopt (s, SOL_SOCKET, SO_BROADCAST, (caddr_t) &optval, sizeof (optval)) < 0) {
96 + perror("setsockopt()");
100 + if (sendto(s, buf, 1001, 0, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
101 + perror("sendto()");