Nmap Development mailing list archives

Re: Nsock proxychain creation code


From: Jacek Wielemborek <d33tah () gmail com>
Date: Sat, 27 Jun 2015 13:00:18 +0200

W dniu 26.06.2015 o 18:48, Henri Doreau pisze:
2015-06-26 14:56 GMT+02:00 Jacek Wielemborek <d33tah () gmail com>:
List,

I was playing with a quick-and-dirty patch for Ncat support for Nsock
proxychains and I hit two silly problems that were exacerbated by Nsock API.

The first issue was that even though I called nsock_proxychain_new and
nsp_set_proxychain, Nsock wouldn't connect via proxy. After a bit of
debugging I found that this was because I called those after nsi_new and
didn't know that this couldn't work. This probably should be documented.

The other thing was that when I finally set the proxychain, I got a
segmentation fault in nsock_connect_internal because "current" was not
set. This was because the proxychains node list was empty because by
mistake related to copying code I passed an empty string (optarg) there.
I suppose that Nsock should fail proxy creation in this case somehow.

Should I create a GitHub issue for that?

Cheers,
d33tah


Hi Jacek,

the two fixes that you propose sound good to me: fix the first "issue"
by documentation and add a defensive check into nsock.

Can you propose a patch? Otherwise open github tickets and I'll do it soon.

Regards


I created two tickets:

https://github.com/nmap/nmap/issues/176
https://github.com/nmap/nmap/issues/177

I'm a bit pressed for time for now, so if you manage to write patches
before I do, it would be great. Those don't sound like big changes, so
you'd be able to review them at the same time.

BTW, I'm CCing Fyodor and Daniel because I can't see my original message
in the seclists.org archives. What could be wrong?

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

Current thread: