Hallo Mathias, On Thu, Oct 12, 2006 at 08:33:33PM +0200, Mathias Peters wrote: > Ich möchte mittels netcat eine Verbindung an einen localen Port absetzen > und das Ergebnis nach nem Wort durchsuchen. > Mein Versuch geht so: > > echo somestring | netcat -w -c 10 localhost 8585 | grep running
Das funktioniert doch nicht wirklich bei dir? $ echo wasweissich | nc -w -c 10 localhost 8585 invalid wait-time -c $ echo $? 1 > Das Problem ist, dass netcat blockiert und nicht mehr zurückkommt. Gibt > es ne Möglichkeit, das zu umgehen, oder eine Option mit der ich > "zurückkomme". $ nc -h [v1.10] connect to somewhere: nc [-options] hostname port[s] [ports] ... listen for inbound: nc -l -p port [-options] [hostname] [port] options: -c shell commands as `-e'; use /bin/sh to exec [dangerous!!] -e filename program to exec after connect [dangerous!!] -b allow broadcasts -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 -q secs quit after EOF on stdin and delay of secs -s addr local source address -t answer TELNET negotiation -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]; hyphens in port names must be backslash escaped (e.g. 'ftp\-data'). Such dir eine aus ;-) Gruß, f -- Gravity is a myth, the Earth sucks. -- Haeufig gestellte Fragen und Antworten (FAQ): http://www.de.debian.org/debian-user-german-FAQ/ Zum AUSTRAGEN schicken Sie eine Mail an [EMAIL PROTECTED] mit dem Subject "unsubscribe". Probleme? Mail an [EMAIL PROTECTED] (engl)