Nmap Development mailing list archives

Re: Nsock proxychain creation code


From: Henri Doreau <henri.doreau () gmail com>
Date: Fri, 26 Jun 2015 18:48:09 +0200

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

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


Current thread: