public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Problem with NC.1.107
@ 2018-03-28  7:09 Jay Cotton
  2018-03-28 14:05 ` Marco Atzeri
  2018-03-28 14:20 ` Andrey Repin
  0 siblings, 2 replies; 8+ messages in thread
From: Jay Cotton @ 2018-03-28  7:09 UTC (permalink / raw)
  To: cygwin

 Just installed nc 1.107-4  expecting to use it to debug some code.

This is what I get when I try to run it.
$ nc 192.168.1.135 23
bash: /usr/bin/nc: Permission denied


The file permissions are messed up.

$ file /usr/bin/nc
/usr/bin/nc: writable, executable, regular file, no read permission

I don't see the PE32+ executable (console) x86-64, for MS Windows
string.


here is the file in /usr/bin
$ ls -l nc*
-rwxr-xr-x 1 lbmgm lbmgm 24576 Mar 19  2013 nc.exe

I looked at the make file, it seems to be o.k. for generating a
runable program.  (uses gcc) but I don't have enough stuff installed
to allow a build.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem with NC.1.107
  2018-03-28  7:09 Problem with NC.1.107 Jay Cotton
@ 2018-03-28 14:05 ` Marco Atzeri
  2018-03-28 14:20 ` Andrey Repin
  1 sibling, 0 replies; 8+ messages in thread
From: Marco Atzeri @ 2018-03-28 14:05 UTC (permalink / raw)
  To: cygwin

On 27/03/2018 20:13, Jay Cotton wrote:
>   Just installed nc 1.107-4  expecting to use it to debug some code.
> 
> This is what I get when I try to run it.
> $ nc 192.168.1.135 23
> bash: /usr/bin/nc: Permission denied
> 
most Antivirus block the nc program

Reards
Marco



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem with NC.1.107
  2018-03-28  7:09 Problem with NC.1.107 Jay Cotton
  2018-03-28 14:05 ` Marco Atzeri
@ 2018-03-28 14:20 ` Andrey Repin
  2018-04-10  1:52   ` L A Walsh
  1 sibling, 1 reply; 8+ messages in thread
From: Andrey Repin @ 2018-03-28 14:20 UTC (permalink / raw)
  To: Jay Cotton, cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 1271 bytes --]

Greetings, Jay Cotton!

>  Just installed nc 1.107-4  expecting to use it to debug some code.

> This is what I get when I try to run it.
> $ nc 192.168.1.135 23
> bash: /usr/bin/nc: Permission denied

[C:\Programs\Cygwin_64\bin]$ nc.exe 192.168.1.1 23
▒▒▒▒▒▒▒▒♥
Dlink-Router login:
[C:\Programs\Cygwin_64\bin]$

Since nc does not reply to --version, I have no way to tell if it's the same
you are running with.

> The file permissions are messed up.

> $ file /usr/bin/nc
> /usr/bin/nc: writable, executable, regular file, no read permission

> I don't see the PE32+ executable (console) x86-64, for MS Windows
> string.


> here is the file in /usr/bin
> $ ls -l nc*
> -rwxr-xr-x 1 lbmgm lbmgm 24576 Mar 19  2013 nc.exe

> I looked at the make file, it seems to be o.k. for generating a
> runable program.  (uses gcc) but I don't have enough stuff installed
> to allow a build.


-- 
With best regards,
Andrey Repin
Wednesday, March 28, 2018 17:07:26

Sorry for my terrible english...\x03B‹KCB”\x1c›Ø›\x19[H\x1c™\^[ܝ\x1cΈ\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÜ\x1c›Ø›\x19[\Ëš\x1d^[[\x03B‘TNˆ\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÙ˜\KÃB‘^[ØÝ[Y[\x18]\x1a[ÛŽˆ\b\b\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÙ^[ØÜËš\x1d^[[\x03B•[œÝXœØÜšX™H\x1a[™›Îˆ\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÛ[\vÈÝ[œÝXœØÜšX™K\Ú[\^[\x19CBƒB

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem with NC.1.107
  2018-03-28 14:20 ` Andrey Repin
@ 2018-04-10  1:52   ` L A Walsh
  2018-04-10  4:12     ` Jay Cotton
  0 siblings, 1 reply; 8+ messages in thread
From: L A Walsh @ 2018-04-10  1:52 UTC (permalink / raw)
  To: cygwin

Andrey Repin wrote:
> Greetings, Jay Cotton!
> 
> Since nc does not reply to --version, I have no way to tell if it's the same
> you are running with.
---
	That's odd.  But has to do with what version of ncat is run.
I notice my linux machine says:

> nc --version
Ncat: Version 6.47 ( http://nmap.org/ncat )

But the version in cygwin:

> cygcheck -f /usr/bin/nc
nc-1.107-4

is very different.  Not sure which is newer or better, but
the version at nmap.org supports SCTP, though the BSD version
supports QOS.  Not sufficiently versed in either to know
all the differences.  Seems like the nmap.org version has more
options: 44 vs. BSD's 28 (didn't double count switches from nmap
that have a short+long form).  

Where do the sources from the BSD version come from?   It
doesn't seem to list a website. 


> 
>> The file permissions are messed up.
---
	I didn't notice this.  
> 
>> $ file /usr/bin/nc
>> /usr/bin/nc: writable, executable, regular file, no read permission
> 
>> I don't see the PE32+ executable (console) x86-64, for MS Windows
>> string.
---
weird -- when I tried that, got:

> file /usr/bin/nc
/usr/bin/nc: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows


>> here is the file in /usr/bin
>> $ ls -l nc*
>> -rwxr-xr-x 1 lbmgm lbmgm 24576 Mar 19  2013 nc.exe
----
Looks like the same file I have:
> ll /usr/bin/nc
-rwxr-xr-x+ 1 24576 Mar 19  2013 /usr/bin/nc*

I'm not sure your file command is referencing the same file,
since my ls shows the same size and date as yours, and clearly
both show read+execute for U,G and other and write only for owner.

>> I looked at the make file, it seems to be o.k. for generating a
>> runable program.  (uses gcc) but I don't have enough stuff installed
>> to allow a build.
---
    I think something is wrong with your 'file' command.  My nc-binary
didn't come with a makefile (only binary & manpage):
> cygcheck -l nc
/usr/bin/nc.exe
/usr/share/man/man1/nc.1.gz

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem with NC.1.107
  2018-04-10  1:52   ` L A Walsh
@ 2018-04-10  4:12     ` Jay Cotton
  2018-04-10  5:54       ` Marco Atzeri
  2018-04-13  8:45       ` L A Walsh
  0 siblings, 2 replies; 8+ messages in thread
From: Jay Cotton @ 2018-04-10  4:12 UTC (permalink / raw)
  To: cygwin

Here is the package listing at cygwin

nc: A simple but powerful network tool (installed binaries and support
files)

    2013-03-19 15:35           0 usr/
    2013-03-19 15:35           0 usr/bin/
    2013-03-19 15:35       24576 usr/bin/nc.exe
    2013-03-19 15:35           0 usr/share/
    2013-03-19 15:35           0 usr/share/man/
    2013-03-19 15:35           0 usr/share/man/man1/
    2013-03-19 15:30        5052 usr/share/man/man1/nc.1.gz



On Mon, Apr 9, 2018 at 6:51 PM, L A Walsh <cygwin@tlinx.org> wrote:

> Andrey Repin wrote:
>
>> Greetings, Jay Cotton!
>>
>> Since nc does not reply to --version, I have no way to tell if it's the
>> same
>> you are running with.
>>
> ---
>         That's odd.  But has to do with what version of ncat is run.
> I notice my linux machine says:
>
> nc --version
>>
> Ncat: Version 6.47 ( http://nmap.org/ncat )
>
> But the version in cygwin:
>
> cygcheck -f /usr/bin/nc
>>
> nc-1.107-4
>
> is very different.  Not sure which is newer or better, but
> the version at nmap.org supports SCTP, though the BSD version
> supports QOS.  Not sufficiently versed in either to know
> all the differences.  Seems like the nmap.org version has more
> options: 44 vs. BSD's 28 (didn't double count switches from nmap
> that have a short+long form).
> Where do the sources from the BSD version come from?   It
> doesn't seem to list a website.
>
>
>> The file permissions are messed up.
>>>
>> ---
>         I didn't notice this.
>
>>
>> $ file /usr/bin/nc
>>> /usr/bin/nc: writable, executable, regular file, no read permission
>>>
>>
>> I don't see the PE32+ executable (console) x86-64, for MS Windows
>>> string.
>>>
>> ---
> weird -- when I tried that, got:
>
> file /usr/bin/nc
>>
> /usr/bin/nc: PE32+ executable (console) x86-64 (stripped to external PDB),
> for MS Windows
>
>
> here is the file in /usr/bin
>>> $ ls -l nc*
>>> -rwxr-xr-x 1 lbmgm lbmgm 24576 Mar 19  2013 nc.exe
>>>
>> ----
> Looks like the same file I have:
>
>> ll /usr/bin/nc
>>
> -rwxr-xr-x+ 1 24576 Mar 19  2013 /usr/bin/nc*
>
> I'm not sure your file command is referencing the same file,
> since my ls shows the same size and date as yours, and clearly
> both show read+execute for U,G and other and write only for owner.
>
> I looked at the make file, it seems to be o.k. for generating a
>>> runable program.  (uses gcc) but I don't have enough stuff installed
>>> to allow a build.
>>>
>> ---
>    I think something is wrong with your 'file' command.  My nc-binary
> didn't come with a makefile (only binary & manpage):
>
>> cygcheck -l nc
>>
> /usr/bin/nc.exe
> /usr/share/man/man1/nc.1.gz
>
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem with NC.1.107
  2018-04-10  4:12     ` Jay Cotton
@ 2018-04-10  5:54       ` Marco Atzeri
  2018-04-13  8:45       ` L A Walsh
  1 sibling, 0 replies; 8+ messages in thread
From: Marco Atzeri @ 2018-04-10  5:54 UTC (permalink / raw)
  To: cygwin

On 10/04/2018 06:12, Jay Cotton wrote:
> Here is the package listing at cygwin
> 
> nc: A simple but powerful network tool (installed binaries and support
> files)
> 
>      2013-03-19 15:35           0 usr/
>      2013-03-19 15:35           0 usr/bin/
>      2013-03-19 15:35       24576 usr/bin/nc.exe
>      2013-03-19 15:35           0 usr/share/
>      2013-03-19 15:35           0 usr/share/man/
>      2013-03-19 15:35           0 usr/share/man/man1/
>      2013-03-19 15:30        5052 usr/share/man/man1/nc.1.gz
> 
> 

post bottom here, and also trim the reply please.

As I highlighted before, you wrote:

   $ nc 192.168.1.135 23
   bash: /usr/bin/nc: Permission denied

the message is from bash and it reports that bash can not execute
nc. This happens when a Antivirus denies access to the program.
For example Symantec always blocks any nc.

Please note that nc replies to

$ nc --version
nc: unknown option -- -
usage: nc [-46CDdhklnrtUuvz] [-I length] [-i interval] [-O length]
           [-P proxy_username] [-p source_port] [-s source] [-T ToS]
           [-V rtable] [-w timeout] [-X proxy_protocol]
           [-x proxy_address[:port]] [destination] [port]


Regards
Marco








--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem with NC.1.107
  2018-04-10  4:12     ` Jay Cotton
  2018-04-10  5:54       ` Marco Atzeri
@ 2018-04-13  8:45       ` L A Walsh
  2018-04-13 12:29         ` Brian Inglis
  1 sibling, 1 reply; 8+ messages in thread
From: L A Walsh @ 2018-04-13  8:45 UTC (permalink / raw)
  To: lbmgmusic; +Cc: cygwin

Jay Cotton wrote:
> Here is the package listing at cygwin
> 
> nc: A simple but powerful network tool (installed binaries and support
> files)
> 
>     2013-03-19 15:35           0 usr/
>     2013-03-19 15:35           0 usr/bin/
>     2013-03-19 15:35       24576 usr/bin/nc.exe
>     2013-03-19 15:35           0 usr/share/
>     2013-03-19 15:35           0 usr/share/man/
>     2013-03-19 15:35           0 usr/share/man/man1/
>     2013-03-19 15:30        5052 usr/share/man/man1/nc.1.gz
> 
> 
---
	Right.  It has the two files I mentioned below, and
nc.exe isn't a text file or makefile -- but is shown by the
cygwin "file" command as an executable.


You said:
> I don't see the PE32+ executable (console) x86-64, for MS Windows
>> >>> string.

Whereas, when I used the file command, it printed out exactly
what you were searching for.  Thus my assertion that your file
command is the likely culprit.

> file /usr/bin/nc
> >>
> /usr/bin/nc: PE32+ executable (console) x86-64 (stripped to external PDB),
> for MS Windows


As for the not-executable error message, have you checked,
as suggested elsewhere, whether or not you have some cheap
anti-virus installed that blocks programs that are not viruses
like 'nc'?


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem with NC.1.107
  2018-04-13  8:45       ` L A Walsh
@ 2018-04-13 12:29         ` Brian Inglis
  0 siblings, 0 replies; 8+ messages in thread
From: Brian Inglis @ 2018-04-13 12:29 UTC (permalink / raw)
  To: cygwin

On 2018-04-13 02:44, L A Walsh wrote:
> Jay Cotton wrote:
> You said:
>> I don't see the PE32+ executable (console) x86-64, for MS Windows
>>> >>> string.
> Whereas, when I used the file command, it printed out exactly
> what you were searching for.  Thus my assertion that your file
> command is the likely culprit.
>> file /usr/bin/nc
>> /usr/bin/nc: PE32+ executable (console) x86-64 (stripped to external PDB),
>> for MS Windows
> As for the not-executable error message, have you checked,
> as suggested elsewhere, whether or not you have some cheap
> anti-virus installed that blocks programs that are not viruses
> like 'nc'?

Try:
$ which file nc | xargs ls -glo
-rwxr-xr-x 1 22035 Mar 18 08:18 /usr/bin/file
-rwxr-xr-x 1 24576 Mar 19  2013 /usr/bin/nc
$ which file nc | xargs file
/usr/bin/file: PE32+ executable (console) x86-64, for MS Windows
/usr/bin/nc:   PE32+ executable (console) x86-64 (stripped to external PDB), for
MS Windows
$ printf "HEAD / HTTP/1.0\r\n\r\n" | nc cygwin.com 80
HTTP/1.1 200 OK
Date: Fri, 13 Apr 2018 11:45:41 GMT
Server: Apache
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Security-Policy: default-src 'self' http: https:
Connection: close
Content-Type: text/html; charset=UTF-8

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-04-13 12:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-28  7:09 Problem with NC.1.107 Jay Cotton
2018-03-28 14:05 ` Marco Atzeri
2018-03-28 14:20 ` Andrey Repin
2018-04-10  1:52   ` L A Walsh
2018-04-10  4:12     ` Jay Cotton
2018-04-10  5:54       ` Marco Atzeri
2018-04-13  8:45       ` L A Walsh
2018-04-13 12:29         ` Brian Inglis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).