Re: Nsock proxychain creation code

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Nsock proxychain creation code

Henri Doreau
2015-06-26 14:56 GMT+02:00 Jacek Wielemborek <[hidden email]>:

> 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/
Reply | Threaded
Open this post in threaded view
|

Re: Nsock proxychain creation code

Jacek Wielemborek-2
W dniu 26.06.2015 o 18:48, Henri Doreau pisze:

> 2015-06-26 14:56 GMT+02:00 Jacek Wielemborek <[hidden email]>:
>> 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?


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

signature.asc (836 bytes) Download Attachment