summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-10-21 07:00:00 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2008-10-21 07:00:00 -0700
commit446d5a68930e2dbab2a9b2ab7d9f4fd5a7bd7419 (patch)
tree2982beee2845ae8d310a5a3eef481e09efc813db
parentd102598c3989239d749b86b0f49fa54554f54402 (diff)
downloadnetcat-446d5a68930e2dbab2a9b2ab7d9f4fd5a7bd7419.tar.gz
-rw-r--r--Android.mk20
-rw-r--r--MODULE_LICENSE_PUBLIC_DOMAIN0
-rw-r--r--Makefile.dist (renamed from Makefile)0
-rwxr-xr-xncbin0 -> 28216 bytes
-rw-r--r--netcat.c4
-rwxr-xr-xscripts/webproxy3
6 files changed, 26 insertions, 1 deletions
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..5756432
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,20 @@
+ifneq ($(TARGET_SIMULATOR),true)
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:=\
+ netcat.c
+
+LOCAL_CFLAGS:=-O2 -g
+#LOCAL_CFLAGS+=-DLINUX
+
+LOCAL_MODULE_TAGS:=tests eng
+
+LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
+
+LOCAL_MODULE:=nc
+
+include $(BUILD_EXECUTABLE)
+
+endif # TARGET_SIMULATOR != true
diff --git a/MODULE_LICENSE_PUBLIC_DOMAIN b/MODULE_LICENSE_PUBLIC_DOMAIN
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/MODULE_LICENSE_PUBLIC_DOMAIN
diff --git a/Makefile b/Makefile.dist
index 99f2795..99f2795 100644
--- a/Makefile
+++ b/Makefile.dist
diff --git a/nc b/nc
new file mode 100755
index 0000000..c46fac9
--- /dev/null
+++ b/nc
Binary files differ
diff --git a/netcat.c b/netcat.c
index 5ceb4f1..6c67718 100644
--- a/netcat.c
+++ b/netcat.c
@@ -63,8 +63,12 @@
#include <sys/time.h> /* timeval, time_t */
#include <setjmp.h> /* jmp_buf et al */
#include <sys/socket.h> /* basics, SO_ and AF_ defs, sockaddr, ... */
+
#include <netinet/in.h> /* sockaddr_in, htons, in_addr */
+
+#if 0
#include <netinet/in_systm.h> /* misc crud that netinet/ip.h references */
+#endif
#include <netinet/ip.h> /* IPOPT_LSRR, header stuff */
#include <netdb.h> /* hostent, gethostby*, getservby* */
#include <arpa/inet.h> /* inet_ntoa */
diff --git a/scripts/webproxy b/scripts/webproxy
index cee2d29..59e6a49 100755
--- a/scripts/webproxy
+++ b/scripts/webproxy
@@ -120,7 +120,8 @@ if test "$x3" ; then
echo "${xx}" >> $LFILE
test "${xx}" || break
# eew, buried returns, gross but necessary for DOS stupidity:
- test "${xx}" = " " && break
+ test "${xx}" = "
+" && break
done
fi
# check for non-GET *after* we log the query...