The OpenNET Project / Index page

[ новости /+++ | форум | wiki | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 [Cписок руководств | Печать]

netcat ()
  • >> netcat (1) ( Linux man: Команды и прикладные программы пользовательского уровня )
  • Ключ netcat обнаружен в базе ключевых слов.

  • BSD mandoc


     - arbitrary TCP and UDP connections and listens


    netcat [-46hklnrtuvzU ] [-i interval ] [-p source port ] [-s source ip address ] [-x proxy address [:port] ] [-w timeout ] [-X socks version ] [hostname ] [port[s] ]  


    The netcat (or netcat utility is used for just about anything under the sun involving TCP or UDP. It can open TCP connections, send UDP packets, listen on arbitrary TCP and UDP ports, do port scanning, and deal with both IPv4 and IPv6. Unlike telnet(1), netcat scripts nicely, and separates error messages onto standard error instead of sending them to standard output, as telnet(1), does with some.

    Destination ports can be single integers or ranges. Ranges are in the form nn-mm.

    Common uses include:

    The options are as follows:

    Forces netcat to use IPv4 addresses only.
    Forces netcat to use IPv6 addresses only.
    Prints out netcat help.
    -i interval
    Specifies a delay time interval between lines of text sent and received. Also causes a delay time between connections to multiple ports.
    Forces netcat to stay listening for another connection after its current connection is completed.
    Used to specify that netcat should listen for an incoming connection rather than initiate a connection to a remote host.
    Do not do any DNS or service lookups on any specified addresses, hostnames or ports.
    -p port
    Specifies the source port netcat should use, subject to privilege restrictions and availability.
    Specifies that source and/or destination ports should be chosen randomly instead of sequentially within a range or in the order that the system assigns them.
    -s hostname/ip address
    Specifies the IP of the interface which is used to send the packets.
    Causes netcat to send RFC854 DON'T and WON'T responses to RFC854 DO and WILL requests. This makes it possible to use netcat to script telnet sessions.
    Use UDP instead of the default option of TCP.
    Have netcat give more verbose output.
    -x proxy address [:port]
    Requests that netcat should connect to hostname using a SOCKS proxy at address and port. If port is not specified, port 1080 is used.
    Specifies that netcat should just scan for listening daemons, without sending any data to them.
    Specifies to use Unix Domain Sockets.
    -X version
    Requests that netcat should use the specified version of the SOCKS protocol when talking to a SOCKS proxy. If version is not specified, SOCKS version 5 is used.



    $ netcat hostname 42
    Open a TCP connection to port 42 of hostname.
    $ netcat -p 31337 hostname 42
    Open a TCP connection to port 42 of hostname, and use port 31337 as the source port.
    $ netcat -w 5 hostname 42
    Open a TCP connection to port 42 of hostname, and timeout after five seconds while attempting to connect.
    $ netcat -u hostname 53
    Open a UDP connection to port 53 of hostname.
    $ netcat -s 42
    Open a TCP connection to port 42 of using as the IP for the local end of the connection.
    $ netcat -v hostname 42
    Open a TCP connection to port 42 of hostname, displaying some diagnostic messages on stderr.
    $ netcat -v -z hostname 20-30
    Attempt to open TCP connections to ports 20 through 30 of hostname, and report which ones netcat was able to connect to.
    $ netcat -v -u -z -w 3 hostname 20-30
    Send UDP packets to ports 20-30 of, and report which ones did not respond with an ICMP packet after three seconds.
    $ netcat -l 3000
    Listen on TCP port 3000, and once there is a connection, send stdin to the remote host, and send data from the remote host to stdout.
    $ echo foobar | netcat hostname 1000
    Connect to port 1000 of hostname, send the string "foobar" followed by a newline, and move data from port 1000 of hostname to stdout until hostname closes the connection.
    $ netcat -U /var/tmp/dsocket
    Connect to a Unix Domain Socket.
    $ netcat -lU /var/tmp/dsocket
    Create and listen on a Unix Domain Socket.



    cat(1), telnet(1)  


    Original implementation by *Hobbit* Aq .

    Rewritten with IPv6 support by Eric Jackson Aq .




    Поиск по тексту MAN-ов: 

    Inferno Solutions
    Hosting by Ihor

    Закладки на сайте
    Проследить за страницей
    Created 1996-2019 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру