Nmap Development mailing list archives

Re: Ncat proxy authentication


From: Duarte Silva <duartejcsilva () gmail com>
Date: Thu, 9 Apr 2009 20:12:42 +0100

Hi,

Maybe it doesn't do that (automatically promote void pointers) because
the files (http.c, ncat.c, *.c) have in their Properties defined to
compile as C++ code (switch /TP). To change that, select a file, right
click, Properties, then in the tree select C/C++, then Advanced, and
in Code Generation set it to compile as C code (switch /TC).
I do that when mixing code units in C with code unit in C++.

Otherwise, a (char*) explicit conversion should suffice as well as
being portable.

Best regards,
Duarte Silva

PS: I didn't check the code neither the solution options.

On Thu, Apr 9, 2009 at 7:45 PM, David Fifield <david () bamsoftware com> wrote:
On Thu, Apr 09, 2009 at 12:20:28PM -0500, Thomas Buchanan wrote:
David Fifield wrote:
Ncat now works as an authenticated HTTP CONNECT proxy:

I've played around with this a little, and it seems to work as expected.
 I've done some straight-forward SSL proxying through it, using Firefox
as a client, as well as connection proxying using ncat as the client.
However, it doesn't build on my Windows system.  First, I had to add
base64.h and http.h to the Header files for ncat in the project solution
file, as well as base64.c and http.c to the Source files.  But even
after doing that, I still get the following build errors (with apologies
for any line wrap):

------ Build started: Project: ncat, Configuration: Release Win32 ------
1>Compiling...
1>http.c
1>.\http.c(52) : error C2440: '=' : cannot convert from 'void *' to 'char *'
1>        Conversion from 'void*' to pointer to non-'void' requires an
explicit cast
1>.\http.c(245) : error C2440: '=' : cannot convert from 'void *' to
'char *'
1>        Conversion from 'void*' to pointer to non-'void' requires an
explicit cast
1>base64.c
1>.\base64.c(50) : error C3861: 'Malloc': identifier not found

Any ideas on these errors?

Thanks. I am always forgetting that the Microsoft compiler doesn't
automatically promote void pointers, probably because it compiles the
code as C++ as opposed to C. It should be fixed now.

David Fifield

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: