shunf4 / proxychains-windows

Windows and Cygwin port of proxychains, based on MinHook and DLL Injection
GNU General Public License v2.0
967 stars 117 forks source link

Proxychains + long command with args = Error when parsing args: Insufficient Buffer #45

Open barkoder opened 1 year ago

barkoder commented 1 year ago

C:/proxychains_0.6.8_win32_x64/proxychains_win32_x64.exe -q -f C:/proxychains_0.6.8_win32_x64/proxychains.conf wget -c --progress=bar:force:noscroll --secure-protocol=TLSv1_2 -e robots=off --user-agent="Mozilla/5.0" --no-cookies --retry-connrefused --waitretry=10 --tries=100 'https://example.com' -O /dev/null --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue --arbitraryflag=arbitraryvalue

Yes I am aware that the above command is not valid in wget.

I often have to use much longer curl commands(including several header fields) which is where I originally encountered this problem. But I can't paste that here for privacy reasons. Hence the above command.

Thanks for your work. It works great, for shorter commands.

shunf4 commented 1 year ago

I think it's because of this, should have set it bigger: https://github.com/shunf4/proxychains-windows/blob/ff54115885b0fc268cee6f22f386bbc2df5ad589/include/defines_generic.h#L109

If you are unwilling to modify this constant and rebuild, I am afraid you have to use an external config file (--config) for wget, or use a wrapper batch/executable file to launch the process.

JulianGR commented 10 months ago

Couldn't it be set to a larger value by default? I see no shortcomings in doing so and could fix the issue for everybody