копаясь с утра в сорцах

Sep 16, 2011 11:30

наткнулся на прекрасное :

netcat-1.10/debian/patches/quit.patch

/* If your shitbox doesn't have getopt, step into the nineties already. */

netcat-1.10/stupidh

## Find stupid system include dependencies and account for them. Squirts
## a sample .h file to stdout containing [too many of] the right things.
## If you hose the output into "stupid.h", you will get MORE information.
## This takes a while to run, because it checks so many things.
##
## IF YOU HAVE a system/arch/compiler/whatever that is NOT one of:
## msdos-msc6.x ultrix-vax ultrix-mips sunos4.1.x-sparc solaris2.x-sparc
## aix-rs6k linux1.[01].x-x86 freebsd-x86 netbsd-x86 hpux
## [... hopefully this list will grow very large]
## or even if you aren't sure, you would be doing me and the net in general
## a wonderful service by running this and MAILING me the "full" output, e.g.
##
## chmod +x stupidh
## ./stupidh > stupid.h
## mail hobbit@avian.org < stupid.h
##
## WARNING: You may have to change "cc" to "gcc" below if you don't have
## "cc" [e.g. solaris, thank you very fucking much, Sun].

и правда , соплярисовский netcat не имеет половины опций GNU-того дебиановского .

например:

-q secs quit after EOF on stdin and delay of secs\n\

в итоге утащил патч из дебиан сорса и собрал nc.

теперь можно пользоваться ...

while true ; do ./nc -q 1 -lp 1123

code

Previous post Next post
Up