You can subscribe to this list here.
| 2007 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
|
Feb
|
Mar
(17) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
|
From: Juan C. S. T. <jct...@gm...> - 2013-09-30 20:49:24
|
good afternoon I installed the tool several times with the option Netcat -e enabled, however when attempting to version 10.7.5 OF MacOsX, not find a way to enable it. $ make next DFLAGS="-DTELNET -DGAPING_SECURITY_HOLE" make -e nc XFLAGS='-DNEXT' STATIC=-Bstatic make[1]: `nc' is up to date. $ ./nc -h [v1.10] connect to somewhere: nc [-options] hostname port[s] [ports] ... listen for inbound: nc -l -p port [-options] [hostname] [port] options: -g gateway source-routing hop point[s], up to 8 -G num source-routing pointer: 4, 8, 12, ... -h this cruft -i secs delay interval for lines sent, ports scanned -l listen mode, for inbound connects -n numeric-only IP addresses, no DNS -o file hex dump of traffic -p port local port number -r randomize local and remote ports -s addr local source address -u UDP mode -v verbose [use twice to be more verbose] -w secs timeout for connects and final net reads -z zero-I/O mode [used for scanning] port numbers can be individual or ranges: lo-hi [inclusive] $ como puedo activar la opción -e? Thanks Juan Carlos Sarmiento Tovilla |
|
From: Khaled El M. <nc...@fu...> - 2011-11-02 19:08:09
|
Correction: I DO get a "connection refused" when trying to connect to the self compiled nc. This doesn't happen when I reverse the order (the system nc has -l, and the self compiled nc without -l)...so I know it's not a firewall problem or anything like that. Also I had to include <resolv.h> to get it compile on linux (complains about res_init() otherwise) So...I still have no idea why it's doing this. -Khaled On Wed, Nov 02, 2011 at 02:50:12PM -0400, Khaled El Mously wrote: > Hello > > I've compiled nc110 on linux. It seems to work fine when NOT in listen > mode, but has weird behavior when run with -l. The default nc, which is > part of the system, runs find in either mode. > > The self-compiled nc however, "listens" on the port indefinitely. When > connecting to it from another location, my connection is accepted and > immediately closed (i.e. I don't get a 'connection refused'). The > listening nc remains "listening" however, until I ctrl-c it. > > This is also the behavior I see when compiling and running nc on a QNX > machine (both arm and x86). > > I compiled with STATIC=-static on linux, and STATIC= on qnx. > > Does anyone have any insight as to why this might be happening? > > Thanks > -Khaled > > ------------------------------------------------------------------------------ > RSA® Conference 2012 > Save $700 by Nov 18 > Register now! > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > Nc110-commits mailing list > Nc1...@li... > https://lists.sourceforge.net/lists/listinfo/nc110-commits |
|
From: Khaled El M. <nc...@fu...> - 2011-11-02 18:50:20
|
Hello I've compiled nc110 on linux. It seems to work fine when NOT in listen mode, but has weird behavior when run with -l. The default nc, which is part of the system, runs find in either mode. The self-compiled nc however, "listens" on the port indefinitely. When connecting to it from another location, my connection is accepted and immediately closed (i.e. I don't get a 'connection refused'). The listening nc remains "listening" however, until I ctrl-c it. This is also the behavior I see when compiling and running nc on a QNX machine (both arm and x86). I compiled with STATIC=-static on linux, and STATIC= on qnx. Does anyone have any insight as to why this might be happening? Thanks -Khaled |
|
From: <va...@us...> - 2011-07-04 20:22:33
|
Revision: 24
http://nc110.svn.sourceforge.net/nc110/?rev=24&view=rev
Author: vapier
Date: 2011-07-04 20:22:27 +0000 (Mon, 04 Jul 2011)
Log Message:
-----------
update svn:ignores
Property Changed:
----------------
nc110-community-edition/
Property changes on: nc110-community-edition
___________________________________________________________________
Added: svn:ignore
+ netcat
nc
*.o
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2011-06-12 01:42:17
|
Revision: 23
http://nc110.svn.sourceforge.net/nc110/?rev=23&view=rev
Author: vapier
Date: 2011-06-12 01:42:11 +0000 (Sun, 12 Jun 2011)
Log Message:
-----------
fix crashes with large port numbers
the anum field isn't used anywhere, so punt it
http://bugs.gentoo.org/370827
Modified Paths:
--------------
nc110-community-edition/netcat.c
Modified: nc110-community-edition/netcat.c
===================================================================
--- nc110-community-edition/netcat.c 2011-06-12 01:40:46 UTC (rev 22)
+++ nc110-community-edition/netcat.c 2011-06-12 01:42:11 UTC (rev 23)
@@ -119,7 +119,6 @@
struct port_poop {
char name [64]; /* name in /etc/services */
- char anum [8]; /* ascii-format number */
USHORT num; /* real host-order number */
};
#define PINF struct port_poop
@@ -517,7 +516,6 @@
gp_finish:
/* Fall here whether or not we have a valid servent at this point, with
x containing our [host-order and therefore useful, dammit] port number */
- sprintf (portpoop->anum, "%d", x); /* always load any numeric specs! */
portpoop->num = (x & 0xffff); /* ushort, remember... */
return (portpoop->num);
} /* getportpoop */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2011-06-12 01:40:52
|
Revision: 22
http://nc110.svn.sourceforge.net/nc110/?rev=22&view=rev
Author: vapier
Date: 2011-06-12 01:40:46 +0000 (Sun, 12 Jun 2011)
Log Message:
-----------
ignore generated files
Property Changed:
----------------
nc110/
Property changes on: nc110
___________________________________________________________________
Added: svn:ignore
+ core
.gdb_history
netcat
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2011-06-12 01:39:39
|
Revision: 21
http://nc110.svn.sourceforge.net/nc110/?rev=21&view=rev
Author: vapier
Date: 2011-06-12 01:39:33 +0000 (Sun, 12 Jun 2011)
Log Message:
-----------
fix crashes with large port numbers
the anum field isn't used anywhere, so punt it
http://bugs.gentoo.org/370827
Modified Paths:
--------------
nc110/netcat.c
Modified: nc110/netcat.c
===================================================================
--- nc110/netcat.c 2009-03-06 02:51:18 UTC (rev 20)
+++ nc110/netcat.c 2011-06-12 01:39:33 UTC (rev 21)
@@ -100,7 +100,6 @@
struct port_poop {
char name [64]; /* name in /etc/services */
- char anum [8]; /* ascii-format number */
USHORT num; /* real host-order number */
};
#define PINF struct port_poop
@@ -493,7 +492,6 @@
gp_finish:
/* Fall here whether or not we have a valid servent at this point, with
x containing our [host-order and therefore useful, dammit] port number */
- sprintf (portpoop->anum, "%d", x); /* always load any numeric specs! */
portpoop->num = (x & 0xffff); /* ushort, remember... */
return (portpoop->num);
} /* getportpoop */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: techtonik <tec...@us...> - 2009-03-07 00:50:24
|
Hi, I do not think it will be easier now to uncomment these lines. In any case it is nice to see the progress. =) C'ya. On Fri, Mar 6, 2009 at 3:21 AM, <va...@us...> wrote: > Revision: 5 > http://nc110.svn.sourceforge.net/nc110/?rev=5&view=rev > Author: vapier > Date: 2009-03-06 01:21:49 +0000 (Fri, 06 Mar 2009) > > Log Message: > ----------- > remove embedded /* in comments > > Modified Paths: > -------------- > nc110-community-edition/netcat.c > > Modified: nc110-community-edition/netcat.c > =================================================================== > --- nc110-community-edition/netcat.c 2007-01-18 04:08:08 UTC (rev 4) > +++ nc110-community-edition/netcat.c 2009-03-06 01:21:49 UTC (rev 5) > @@ -30,10 +30,10 @@ > > /* conditional includes -- a very messy section which you may have to dink > for your own architecture [and please send diffs...]: */ > -/* #undef _POSIX_SOURCE /* might need this for something? */ > +/* #undef _POSIX_SOURCE */ /* might need this for something? */ > #define HAVE_BIND /* ASSUMPTION -- seems to work everywhere! */ > #define HAVE_HELP /* undefine if you dont want the help text */ > -/* #define ANAL /* if you want case-sensitive DNS matching */ > +/* #define ANAL */ /* if you want case-sensitive DNS matching */ > > #ifdef HAVE_STDLIB_H > #include <stdlib.h> > > > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Nc110-commits mailing list > Nc1...@li... > https://lists.sourceforge.net/lists/listinfo/nc110-commits > -- --anatoly t. |
|
From: <va...@us...> - 2009-03-06 02:51:20
|
Revision: 20
http://nc110.svn.sourceforge.net/nc110/?rev=20&view=rev
Author: vapier
Date: 2009-03-06 02:51:18 +0000 (Fri, 06 Mar 2009)
Log Message:
-----------
add an -c option which is like -e but executes through a shell
Modified Paths:
--------------
nc110-community-edition/netcat.c
Modified: nc110-community-edition/netcat.c
===================================================================
--- nc110-community-edition/netcat.c 2009-03-06 02:45:46 UTC (rev 19)
+++ nc110-community-edition/netcat.c 2009-03-06 02:51:18 UTC (rev 20)
@@ -585,7 +585,28 @@
#ifdef GAPING_SECURITY_HOLE
char * pr00gie = NULL; /* global ptr to -e arg */
+int doexec_use_sh = 0; /* `-c' or `-e' option? */
+/* doexec_new :
+ fiddle all the file descriptors around, and hand off to another prog. Sort
+ of like a one-off "poor man's inetd". This is the only section of code
+ that would be security-critical, which is why it's ifdefed out by default.
+ Use at your own hairy risk; if you leave shells lying around behind open
+ listening ports you deserve to lose!! */
+doexec_new (fd)
+ int fd;
+{
+ dup2 (fd, 0); /* the precise order of fiddlage */
+ close (fd); /* is apparently crucial; this is */
+ dup2 (0, 1); /* swiped directly out of "inetd". */
+ dup2 (0, 2);
+
+ /* A POSIX-conformant system must have `/bin/sh'. */
+Debug (("gonna exec \"%s\" using /bin/sh...", pr00gie))
+ execl ("/bin/sh", "sh", "-c", pr00gie, NULL);
+ bail ("exec %s failed", pr00gie); /* this gets sent out. Hmm... */
+} /* doexec_new */
+
/* doexec :
fiddle all the file descriptors around, and hand off to another prog. Sort
of like a one-off "poor man's inetd". This is the only section of code
@@ -1332,7 +1353,9 @@
newlines as they bloody please. u-fix... */
#ifdef GAPING_SECURITY_HOLE /* needs to be separate holler() */
holler ("\
- -e prog program to exec after connect [dangerous!!]");
+ -c shell commands as `-e'; use /bin/sh to exec [dangerous!!]");
+ holler ("\
+ -e filename program to exec after connect [dangerous!!]");
#endif
holler ("\
-g gateway source-routing hop point[s], up to 8\n\
@@ -1459,16 +1482,21 @@
/* If your shitbox doesn't have getopt, step into the nineties already. */
/* optarg, optind = next-argv-component [i.e. flag arg]; optopt = last-char */
- while ((x = getopt (argc, argv, "ae:g:G:hi:lno:p:rs:tuvw:z")) != EOF) {
+ while ((x = getopt (argc, argv, "ac:e:g:G:hi:lno:p:rs:tuvw:z")) != EOF) {
/* Debug (("in go: x now %c, optarg %x optind %d", x, optarg, optind)) */
switch (x) {
case 'a':
bail ("all-A-records NIY");
o_alla++; break;
#ifdef GAPING_SECURITY_HOLE
- case 'e': /* prog to exec */
+ case 'c': /* shell commands to exec */
pr00gie = optarg;
+ doexec_use_sh = 1;
break;
+ case 'e': /* filename to exec */
+ pr00gie = optarg;
+ doexec_use_sh = 0;
+ break;
#endif
case 'G': /* srcrt gateways pointer val */
x = atoi (optarg);
@@ -1596,8 +1624,11 @@
/* dolisten does its own connect reporting, so we don't holler anything here */
if (netfd > 0) {
#ifdef GAPING_SECURITY_HOLE
- if (pr00gie) /* -e given? */
- doexec (netfd);
+ if (pr00gie) /* -c or -e given? */
+ if (doexec_use_sh) /* -c */
+ doexec_new (netfd);
+ else /* -e */
+ doexec (netfd);
#endif /* GAPING_SECURITY_HOLE */
x = readwrite (netfd); /* it even works with UDP! */
if (o_verbose > 1) /* normally we don't care */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2009-03-06 02:45:53
|
Revision: 19
http://nc110.svn.sourceforge.net/nc110/?rev=19&view=rev
Author: vapier
Date: 2009-03-06 02:45:46 +0000 (Fri, 06 Mar 2009)
Log Message:
-----------
do not make the -n flag affect service name lookups
Modified Paths:
--------------
nc110-community-edition/netcat.c
Modified: nc110-community-edition/netcat.c
===================================================================
--- nc110-community-edition/netcat.c 2009-03-06 02:41:40 UTC (rev 18)
+++ nc110-community-edition/netcat.c 2009-03-06 02:45:46 UTC (rev 19)
@@ -464,8 +464,12 @@
if (pstring) /* one or the other, pleeze */
return (0);
x = pnum;
+#if 0
+ /* the -n flag is to disable dns lookup only, and getservby*
+ functions are not a speed issue at all, so ... */
if (o_nflag) /* go faster, skip getservbyblah */
goto gp_finish;
+#endif
y = htons (x); /* gotta do this -- see Fig.1 below */
servent = getservbyport (y, whichp);
if (servent) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2009-03-06 02:41:42
|
Revision: 18
http://nc110.svn.sourceforge.net/nc110/?rev=18&view=rev
Author: vapier
Date: 2009-03-06 02:41:40 +0000 (Fri, 06 Mar 2009)
Log Message:
-----------
add an option to use sig{set,long}jmp and default it to on for linux systems
Modified Paths:
--------------
nc110-community-edition/generic.h
nc110-community-edition/netcat.c
Modified: nc110-community-edition/generic.h
===================================================================
--- nc110-community-edition/generic.h 2009-03-06 02:35:22 UTC (rev 17)
+++ nc110-community-edition/generic.h 2009-03-06 02:41:40 UTC (rev 18)
@@ -284,6 +284,7 @@
#undef HAVE_SYSINFO
#undef HAVE_SELECT_H
#undef HAVE_TTYENT_H
+#define HAVE_SIGSETJMP
#define HAVE_SOCKLEN_T
#endif /* linux */
Modified: nc110-community-edition/netcat.c
===================================================================
--- nc110-community-edition/netcat.c 2009-03-06 02:35:22 UTC (rev 17)
+++ nc110-community-edition/netcat.c 2009-03-06 02:41:40 UTC (rev 18)
@@ -102,6 +102,14 @@
#define socklen_t int
#endif
+#ifdef HAVE_SIGSETJMP
+#define jmp_buf sigjmp_buf
+#undef setjmp
+#define setjmp(buf) sigsetjmp(buf,1)
+#undef longjmp
+#define longjmp siglongjmp
+#endif
+
struct host_poop {
char name[MAXHOSTNAMELEN]; /* dns name */
char addrs[8][24]; /* ascii-format IP addresses */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2009-03-06 02:35:24
|
Revision: 17
http://nc110.svn.sourceforge.net/nc110/?rev=17&view=rev
Author: vapier
Date: 2009-03-06 02:35:22 +0000 (Fri, 06 Mar 2009)
Log Message:
-----------
rename the arm() func to arm_timer() as gcc arm compilers define "arm" by default
Modified Paths:
--------------
nc110-community-edition/netcat.c
Modified: nc110-community-edition/netcat.c
===================================================================
--- nc110-community-edition/netcat.c 2009-03-06 02:32:41 UTC (rev 16)
+++ nc110-community-edition/netcat.c 2009-03-06 02:35:22 UTC (rev 17)
@@ -247,9 +247,9 @@
longjmp (jbuf, jval);
}
-/* arm :
+/* arm_timer :
set the timer. Zero secs arg means unarm */
-void arm (num, secs)
+void arm_timer (num, secs)
unsigned int num;
unsigned int secs;
{
@@ -262,7 +262,7 @@
alarm (secs);
jval = num;
} /* if secs */
-} /* arm */
+} /* arm_timer */
/* Hmalloc :
malloc up what I want, rounded up to *4, and pre-zeroed. Either succeeds
@@ -755,14 +755,14 @@
} /* if gatesidx */
/* wrap connect inside a timer, and hit it */
- arm (1, o_wait);
+ arm_timer (1, o_wait);
if (setjmp (jbuf) == 0) {
rr = connect (nnetfd, (SA *)remend, sizeof (SA));
} else { /* setjmp: connect failed... */
rr = -1;
errno = ETIMEDOUT; /* fake it */
}
- arm (0, 0);
+ arm_timer (0, 0);
if (rr == 0)
return (nnetfd);
close (nnetfd); /* clean up junked socket FD!! */
@@ -832,14 +832,14 @@
actually does work after all. Yow. YMMV on strange platforms! */
if (o_udpmode) {
x = sizeof (SA); /* retval for recvfrom */
- arm (2, o_wait); /* might as well timeout this, too */
+ arm_timer (2, o_wait); /* might as well timeout this, too */
if (setjmp (jbuf) == 0) { /* do timeout for initial connect */
rr = recvfrom /* and here we block... */
(nnetfd, bigbuf_net, BIGSIZ, MSG_PEEK, (SA *) remend, &x);
Debug (("dolisten/recvfrom ding, rr = %d, netbuf %s ", rr, bigbuf_net))
} else
goto dol_tmo; /* timeout */
- arm (0, 0);
+ arm_timer (0, 0);
/* I'm not completely clear on how this works -- BSD seems to make UDP
just magically work in a connect()ed context, but we'll undoubtedly run
into systems this deal doesn't work on. For now, we apparently have to
@@ -857,12 +857,12 @@
/* fall here for TCP */
x = sizeof (SA); /* retval for accept */
- arm (2, o_wait); /* wrap this in a timer, too; 0 = forever */
+ arm_timer (2, o_wait); /* wrap this in a timer, too; 0 = forever */
if (setjmp (jbuf) == 0) {
rr = accept (nnetfd, (SA *)remend, &x);
} else
goto dol_tmo; /* timeout */
- arm (0, 0);
+ arm_timer (0, 0);
close (nnetfd); /* dump the old socket */
nnetfd = rr; /* here's our new one */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2009-03-06 02:32:51
|
Revision: 16
http://nc110.svn.sourceforge.net/nc110/?rev=16&view=rev
Author: vapier
Date: 2009-03-06 02:32:41 +0000 (Fri, 06 Mar 2009)
Log Message:
-----------
define HAVE_SOCKLEN_T for linux systems
Modified Paths:
--------------
nc110-community-edition/generic.h
Modified: nc110-community-edition/generic.h
===================================================================
--- nc110-community-edition/generic.h 2009-03-06 02:13:34 UTC (rev 15)
+++ nc110-community-edition/generic.h 2009-03-06 02:32:41 UTC (rev 16)
@@ -284,6 +284,7 @@
#undef HAVE_SYSINFO
#undef HAVE_SELECT_H
#undef HAVE_TTYENT_H
+#define HAVE_SOCKLEN_T
#endif /* linux */
/* irix 5.x; may not be correct for earlier ones */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2009-03-06 02:13:35
|
Revision: 15
http://nc110.svn.sourceforge.net/nc110/?rev=15&view=rev
Author: vapier
Date: 2009-03-06 02:13:34 +0000 (Fri, 06 Mar 2009)
Log Message:
-----------
use __linux__ rather than LINUX as toolchains set that up automatically
Modified Paths:
--------------
nc110-community-edition/generic.h
nc110-community-edition/netcat.c
Modified: nc110-community-edition/generic.h
===================================================================
--- nc110-community-edition/generic.h 2009-03-06 02:11:45 UTC (rev 14)
+++ nc110-community-edition/generic.h 2009-03-06 02:13:34 UTC (rev 15)
@@ -279,7 +279,7 @@
/* linux, which is trying as desperately as the gnu folks can to be
POSIXLY_CORRECT. I think I'm gonna hurl... */
-#ifdef LINUX
+#ifdef __linux__
#undef UTMPX
#undef HAVE_SYSINFO
#undef HAVE_SELECT_H
Modified: nc110-community-edition/netcat.c
===================================================================
--- nc110-community-edition/netcat.c 2009-03-06 02:11:45 UTC (rev 14)
+++ nc110-community-edition/netcat.c 2009-03-06 02:13:34 UTC (rev 15)
@@ -46,7 +46,7 @@
#ifdef HAVE_TIME_H
#include <time.h>
#endif
-#ifdef LINUX
+#ifdef __linux__
#include <resolv.h>
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2009-03-06 02:11:49
|
Revision: 14
http://nc110.svn.sourceforge.net/nc110/?rev=14&view=rev
Author: vapier
Date: 2009-03-06 02:11:45 +0000 (Fri, 06 Mar 2009)
Log Message:
-----------
dump usage() info to stdout when asking for help
Modified Paths:
--------------
nc110-community-edition/netcat.c
Modified: nc110-community-edition/netcat.c
===================================================================
--- nc110-community-edition/netcat.c 2009-03-06 02:10:10 UTC (rev 13)
+++ nc110-community-edition/netcat.c 2009-03-06 02:11:45 UTC (rev 14)
@@ -169,6 +169,7 @@
USHORT o_random = 0;
USHORT o_udpmode = 0;
USHORT o_verbose = 0;
+USHORT o_holler_stderr = 1;
unsigned int o_wait = 0;
USHORT o_zero = 0;
/* o_tn in optional section */
@@ -194,22 +195,23 @@
char * str;
char * p1, * p2, * p3, * p4, * p5, * p6;
{
+ FILE *o_holler_out = (o_holler_stderr ? stderr : stdout);
if (o_verbose) {
- fprintf (stderr, str, p1, p2, p3, p4, p5, p6);
+ fprintf (o_holler_out, str, p1, p2, p3, p4, p5, p6);
#ifdef HAVE_BIND
if (h_errno) { /* if host-lookup variety of error ... */
if (h_errno > 4) /* oh no you don't, either */
- fprintf (stderr, "preposterous h_errno: %d", h_errno);
+ fprintf (o_holler_out, "preposterous h_errno: %d", h_errno);
else
- fprintf (stderr, h_errs[h_errno]); /* handle it here */
+ fprintf (o_holler_out, h_errs[h_errno]); /* handle it here */
h_errno = 0; /* and reset for next call */
}
#endif
if (errno) { /* this gives funny-looking messages, but */
perror (" "); /* it's more portable than sys_errlist[]... */
} else /* xxx: do something better? */
- fprintf (stderr, "\n");
- fflush (stderr);
+ fprintf (o_holler_out, "\n");
+ fflush (o_holler_out);
}
} /* holler */
@@ -1308,6 +1310,7 @@
helpme()
{
o_verbose = 1;
+ o_holler_stderr = 0;
holler ("[v1.10]\n\
connect to somewhere: nc [-options] hostname port[s] [ports] ... \n\
listen for inbound: nc -l -p port [-options] [hostname] [port]\n\
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2009-03-06 02:10:11
|
Revision: 13
http://nc110.svn.sourceforge.net/nc110/?rev=13&view=rev
Author: vapier
Date: 2009-03-06 02:10:10 +0000 (Fri, 06 Mar 2009)
Log Message:
-----------
make sure the buffer holding the command line is always NUL terminated
Modified Paths:
--------------
nc110-community-edition/netcat.c
Modified: nc110-community-edition/netcat.c
===================================================================
--- nc110-community-edition/netcat.c 2009-03-06 01:55:09 UTC (rev 12)
+++ nc110-community-edition/netcat.c 2009-03-06 02:10:10 UTC (rev 13)
@@ -1408,7 +1408,8 @@
argv[1] = cp; /* head of new arg block */
fprintf (stderr, "Cmd line: ");
fflush (stderr); /* I dont care if it's unbuffered or not! */
- insaved = read (0, cp, BIGSIZ); /* we're gonna fake fgets() here */
+ insaved = read (0, cp, BIGSIZ-1); /* we're gonna fake fgets() here */
+ cp[BIGSIZ-1] = '\0';
if (insaved <= 0)
bail ("wrong");
x = findline (cp, insaved);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2009-03-06 01:55:14
|
Revision: 7
http://nc110.svn.sourceforge.net/nc110/?rev=7&view=rev
Author: vapier
Date: 2009-03-06 01:32:40 +0000 (Fri, 06 Mar 2009)
Log Message:
-----------
include time.h by default for time() prototype
Modified Paths:
--------------
nc110-community-edition/generic.h
nc110-community-edition/netcat.c
Modified: nc110-community-edition/generic.h
===================================================================
--- nc110-community-edition/generic.h 2009-03-06 01:28:37 UTC (rev 6)
+++ nc110-community-edition/generic.h 2009-03-06 01:32:40 UTC (rev 7)
@@ -101,6 +101,9 @@
/* some SV-flavors break select stuff out separately */
#define HAVE_SELECT_H
+/* some put time() in here rather than sys/time.h */
+#define HAVE_TIME_H
+
/* assorted others */
#define HAVE_PARAM_H /* in sys/ */
#define HAVE_SYSMACROS_H /* in sys/ */
Modified: nc110-community-edition/netcat.c
===================================================================
--- nc110-community-edition/netcat.c 2009-03-06 01:28:37 UTC (rev 6)
+++ nc110-community-edition/netcat.c 2009-03-06 01:32:40 UTC (rev 7)
@@ -43,6 +43,9 @@
#ifdef HAVE_SELECT_H /* random SV variants need this */
#include <sys/select.h>
#endif
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
/* have to do this *before* including types.h. xxx: Linux still has it wrong */
#ifdef FD_SETSIZE /* should be in types.h, butcha never know. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2009-03-06 01:55:13
|
Revision: 10
http://nc110.svn.sourceforge.net/nc110/?rev=10&view=rev
Author: vapier
Date: 2009-03-06 01:46:51 +0000 (Fri, 06 Mar 2009)
Log Message:
-----------
declare proper return types for funcs and move helpme() up before its first usage
Modified Paths:
--------------
nc110-community-edition/netcat.c
Modified: nc110-community-edition/netcat.c
===================================================================
--- nc110-community-edition/netcat.c 2009-03-06 01:42:41 UTC (rev 9)
+++ nc110-community-edition/netcat.c 2009-03-06 01:46:51 UTC (rev 10)
@@ -952,6 +952,7 @@
Use the time delay between writes if given, otherwise use the "tcp ping"
trick for getting the RTT. [I got that idea from pluvius, and warped it.]
Return either the original fd, or clean up and return -1. */
+int
udptest (fd, where)
int fd;
IA * where;
@@ -1298,8 +1299,51 @@
return (0);
} /* readwrite */
+#ifdef HAVE_HELP /* unless we wanna be *really* cryptic */
+/* helpme :
+ the obvious */
+void
+helpme()
+{
+ o_verbose = 1;
+ holler ("[v1.10]\n\
+connect to somewhere: nc [-options] hostname port[s] [ports] ... \n\
+listen for inbound: nc -l -p port [-options] [hostname] [port]\n\
+options:");
+/* sigh, this necessarily gets messy. And the trailing \ characters may be
+ interpreted oddly by some compilers, generating or not generating extra
+ newlines as they bloody please. u-fix... */
+#ifdef GAPING_SECURITY_HOLE /* needs to be separate holler() */
+ holler ("\
+ -e prog program to exec after connect [dangerous!!]");
+#endif
+ holler ("\
+ -g gateway source-routing hop point[s], up to 8\n\
+ -G num source-routing pointer: 4, 8, 12, ...\n\
+ -h this cruft\n\
+ -i secs delay interval for lines sent, ports scanned\n\
+ -l listen mode, for inbound connects\n\
+ -n numeric-only IP addresses, no DNS\n\
+ -o file hex dump of traffic\n\
+ -p port local port number\n\
+ -r randomize local and remote ports\n\
+ -s addr local source address");
+#ifdef TELNET
+ holler ("\
+ -t answer TELNET negotiation");
+#endif
+ holler ("\
+ -u UDP mode\n\
+ -v verbose [use twice to be more verbose]\n\
+ -w secs timeout for connects and final net reads\n\
+ -z zero-I/O mode [used for scanning]");
+ bail ("port numbers can be individual or ranges: lo-hi [inclusive]");
+} /* helpme */
+#endif /* HAVE_HELP */
+
/* main :
now we pull it all together... */
+int
main (argc, argv)
int argc;
char ** argv;
@@ -1632,45 +1676,4 @@
exit (0); /* otherwise, we're just done */
} /* main */
-#ifdef HAVE_HELP /* unless we wanna be *really* cryptic */
-/* helpme :
- the obvious */
-helpme()
-{
- o_verbose = 1;
- holler ("[v1.10]\n\
-connect to somewhere: nc [-options] hostname port[s] [ports] ... \n\
-listen for inbound: nc -l -p port [-options] [hostname] [port]\n\
-options:");
-/* sigh, this necessarily gets messy. And the trailing \ characters may be
- interpreted oddly by some compilers, generating or not generating extra
- newlines as they bloody please. u-fix... */
-#ifdef GAPING_SECURITY_HOLE /* needs to be separate holler() */
- holler ("\
- -e prog program to exec after connect [dangerous!!]");
-#endif
- holler ("\
- -g gateway source-routing hop point[s], up to 8\n\
- -G num source-routing pointer: 4, 8, 12, ...\n\
- -h this cruft\n\
- -i secs delay interval for lines sent, ports scanned\n\
- -l listen mode, for inbound connects\n\
- -n numeric-only IP addresses, no DNS\n\
- -o file hex dump of traffic\n\
- -p port local port number\n\
- -r randomize local and remote ports\n\
- -s addr local source address");
-#ifdef TELNET
- holler ("\
- -t answer TELNET negotiation");
-#endif
- holler ("\
- -u UDP mode\n\
- -v verbose [use twice to be more verbose]\n\
- -w secs timeout for connects and final net reads\n\
- -z zero-I/O mode [used for scanning]");
- bail ("port numbers can be individual or ranges: lo-hi [inclusive]");
-} /* helpme */
-#endif /* HAVE_HELP */
-
/* None genuine without this seal! _H*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2009-03-06 01:55:10
|
Revision: 12
http://nc110.svn.sourceforge.net/nc110/?rev=12&view=rev
Author: vapier
Date: 2009-03-06 01:55:09 +0000 (Fri, 06 Mar 2009)
Log Message:
-----------
dont delay with sleep() before calling exit()
Modified Paths:
--------------
nc110-community-edition/netcat.c
Modified: nc110-community-edition/netcat.c
===================================================================
--- nc110-community-edition/netcat.c 2009-03-06 01:51:34 UTC (rev 11)
+++ nc110-community-edition/netcat.c 2009-03-06 01:55:09 UTC (rev 12)
@@ -222,7 +222,6 @@
o_verbose = 1;
holler (str, p1, p2, p3, p4, p5, p6);
close (netfd);
- sleep (1);
exit (1);
} /* bail */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2009-03-06 01:55:09
|
Revision: 8
http://nc110.svn.sourceforge.net/nc110/?rev=8&view=rev
Author: vapier
Date: 2009-03-06 01:35:04 +0000 (Fri, 06 Mar 2009)
Log Message:
-----------
include unistd.h for some standard file related prototypes
Modified Paths:
--------------
nc110-community-edition/netcat.c
Modified: nc110-community-edition/netcat.c
===================================================================
--- nc110-community-edition/netcat.c 2009-03-06 01:32:40 UTC (rev 7)
+++ nc110-community-edition/netcat.c 2009-03-06 01:35:04 UTC (rev 8)
@@ -76,6 +76,7 @@
#include <errno.h>
#include <signal.h>
#include <fcntl.h> /* O_WRONLY et al */
+#include <unistd.h>
/* handy stuff: */
#define SA struct sockaddr /* socket overgeneralization braindeath */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2009-03-06 01:55:08
|
Revision: 11
http://nc110.svn.sourceforge.net/nc110/?rev=11&view=rev
Author: vapier
Date: 2009-03-06 01:51:34 +0000 (Fri, 06 Mar 2009)
Log Message:
-----------
mmm, actually allow HAVE_BIND on all systems and use resolv.h on linux systems
Modified Paths:
--------------
nc110-community-edition/netcat.c
Modified: nc110-community-edition/netcat.c
===================================================================
--- nc110-community-edition/netcat.c 2009-03-06 01:46:51 UTC (rev 10)
+++ nc110-community-edition/netcat.c 2009-03-06 01:51:34 UTC (rev 11)
@@ -31,7 +31,7 @@
/* conditional includes -- a very messy section which you may have to dink
for your own architecture [and please send diffs...]: */
/* #undef _POSIX_SOURCE */ /* might need this for something? */
-/* #define HAVE_BIND */ /* ASSUMPTION -- seems to work everywhere! */
+#define HAVE_BIND /* ASSUMPTION -- seems to work everywhere! */
#define HAVE_HELP /* undefine if you dont want the help text */
/* #define ANAL */ /* if you want case-sensitive DNS matching */
@@ -46,6 +46,9 @@
#ifdef HAVE_TIME_H
#include <time.h>
#endif
+#ifdef LINUX
+#include <resolv.h>
+#endif
/* have to do this *before* including types.h. xxx: Linux still has it wrong */
#ifdef FD_SETSIZE /* should be in types.h, butcha never know. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2009-03-06 01:55:08
|
Revision: 9
http://nc110.svn.sourceforge.net/nc110/?rev=9&view=rev
Author: vapier
Date: 2009-03-06 01:42:41 +0000 (Fri, 06 Mar 2009)
Log Message:
-----------
use socklen_t with network functions
Modified Paths:
--------------
nc110-community-edition/netcat.c
Modified: nc110-community-edition/netcat.c
===================================================================
--- nc110-community-edition/netcat.c 2009-03-06 01:35:04 UTC (rev 8)
+++ nc110-community-edition/netcat.c 2009-03-06 01:42:41 UTC (rev 9)
@@ -95,6 +95,10 @@
#endif
#define MAXHOSTNAMELEN 256
+#ifndef HAVE_SOCKLEN_T
+#define socklen_t int
+#endif
+
struct host_poop {
char name[MAXHOSTNAMELEN]; /* dns name */
char addrs[8][24]; /* ascii-format IP addresses */
@@ -775,7 +779,7 @@
register int nnetfd;
register int rr;
HINF * whozis = NULL;
- int x;
+ socklen_t x;
char * cp;
USHORT z;
errno = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2009-03-06 01:28:49
|
Revision: 6
http://nc110.svn.sourceforge.net/nc110/?rev=6&view=rev
Author: vapier
Date: 2009-03-06 01:28:37 +0000 (Fri, 06 Mar 2009)
Log Message:
-----------
do not define HAVE_BIND by default -- let builders do it
Modified Paths:
--------------
nc110-community-edition/netcat.c
Modified: nc110-community-edition/netcat.c
===================================================================
--- nc110-community-edition/netcat.c 2009-03-06 01:21:49 UTC (rev 5)
+++ nc110-community-edition/netcat.c 2009-03-06 01:28:37 UTC (rev 6)
@@ -31,7 +31,7 @@
/* conditional includes -- a very messy section which you may have to dink
for your own architecture [and please send diffs...]: */
/* #undef _POSIX_SOURCE */ /* might need this for something? */
-#define HAVE_BIND /* ASSUMPTION -- seems to work everywhere! */
+/* #define HAVE_BIND */ /* ASSUMPTION -- seems to work everywhere! */
#define HAVE_HELP /* undefine if you dont want the help text */
/* #define ANAL */ /* if you want case-sensitive DNS matching */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2009-03-06 01:21:51
|
Revision: 5
http://nc110.svn.sourceforge.net/nc110/?rev=5&view=rev
Author: vapier
Date: 2009-03-06 01:21:49 +0000 (Fri, 06 Mar 2009)
Log Message:
-----------
remove embedded /* in comments
Modified Paths:
--------------
nc110-community-edition/netcat.c
Modified: nc110-community-edition/netcat.c
===================================================================
--- nc110-community-edition/netcat.c 2007-01-18 04:08:08 UTC (rev 4)
+++ nc110-community-edition/netcat.c 2009-03-06 01:21:49 UTC (rev 5)
@@ -30,10 +30,10 @@
/* conditional includes -- a very messy section which you may have to dink
for your own architecture [and please send diffs...]: */
-/* #undef _POSIX_SOURCE /* might need this for something? */
+/* #undef _POSIX_SOURCE */ /* might need this for something? */
#define HAVE_BIND /* ASSUMPTION -- seems to work everywhere! */
#define HAVE_HELP /* undefine if you dont want the help text */
-/* #define ANAL /* if you want case-sensitive DNS matching */
+/* #define ANAL */ /* if you want case-sensitive DNS matching */
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2007-01-18 04:08:07
|
Revision: 4
http://nc110.svn.sourceforge.net/nc110/?rev=4&view=rev
Author: vapier
Date: 2007-01-17 20:08:08 -0800 (Wed, 17 Jan 2007)
Log Message:
-----------
set svn executable property
Property Changed:
----------------
nc110/scripts/alta
nc110/scripts/bsh
nc110/scripts/dist.sh
nc110/scripts/irc
nc110/scripts/iscan
nc110/scripts/ncp
nc110/scripts/probe
nc110/scripts/web
nc110/scripts/webproxy
nc110/scripts/webrelay
nc110/scripts/websearch
nc110/stupidh
nc110-community-edition/scripts/alta
nc110-community-edition/scripts/bsh
nc110-community-edition/scripts/dist.sh
nc110-community-edition/scripts/irc
nc110-community-edition/scripts/iscan
nc110-community-edition/scripts/ncp
nc110-community-edition/scripts/probe
nc110-community-edition/scripts/web
nc110-community-edition/scripts/webproxy
nc110-community-edition/scripts/webrelay
nc110-community-edition/scripts/websearch
nc110-community-edition/stupidh
Property changes on: nc110/scripts/alta
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110/scripts/bsh
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110/scripts/dist.sh
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110/scripts/irc
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110/scripts/iscan
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110/scripts/ncp
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110/scripts/probe
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110/scripts/web
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110/scripts/webproxy
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110/scripts/webrelay
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110/scripts/websearch
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110/stupidh
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110-community-edition/scripts/alta
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110-community-edition/scripts/bsh
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110-community-edition/scripts/dist.sh
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110-community-edition/scripts/irc
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110-community-edition/scripts/iscan
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110-community-edition/scripts/ncp
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110-community-edition/scripts/probe
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110-community-edition/scripts/web
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110-community-edition/scripts/webproxy
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110-community-edition/scripts/webrelay
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110-community-edition/scripts/websearch
___________________________________________________________________
Name: svn:executable
+ *
Property changes on: nc110-community-edition/stupidh
___________________________________________________________________
Name: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|