NTLM代理没有密码? [英] NTLM proxy without password?

查看:292
本文介绍了NTLM代理没有密码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用HTTP代理在公司的Windows网络(我登录到)上工作。当我使用Internet Explorer它神奇地使用代理,而不需要输入我的密码。

I work on a corporate windows network (which I log in to) with a HTTP proxy. When I use Internet Explorer it magically uses the proxy without me needing to type in my password. Certain other programs seem to manage this too, like JavaWebStart has a "use browser settings" option.

但是,当我使用curl或wget等脚本/程序来获取内容时, http或者在我的Java代码里面做我似乎需要将密码存储在某个地方,这显然不是最好的安全。

However when I use scripts/programs like curl or wget to fetch stuff from http, or do it within my Java code I seem to need to have my password stored somewhere, which obviously isn't best for security.

我如何

我认为这是一个堆栈溢出问题,因为我是一个程序员我需要我的程序/脚本工作,而不输入密码,虽然我可以看到其他人可能认为它属于服务器故障/超级用户。

I'm arguing this is a stack overflow question because I'm a programmer and I need my programs/scripts to work without typing in the password, though I can see that others might think it belongs on Server Fault/Superuser.

我知道设置像--proxy-ntlm in curl,但这仍然需要一个ntlm用户名和密码。

I know about settings like --proxy-ntlm in curl, but this still requires an ntlm username and password.

推荐答案


  1. http:// curl下载SSPI enabled curl .haxx.se / latest.cgi?curl = win32-ssl 更改为 Windows,zip,启用SSL,启用SSPI(7.19.5)

  2. http://www.slproweb.com/products/安装Windows Open-SSL Win32OpenSSL.html ,并捐款以支持其带宽费用。

  3. 安装 Visual C ++ 2008可再发行组件

  4. 使用curl抓取网页: curl.exe -U:--proxy-ntlm --proxy myproxy.com:8080 http://www.google.com

  1. Download SSPI enabled curl from http://curl.haxx.se/latest.cgi?curl=win32-ssl changing to Windows, zip, SSL-enabled, SSPI-enabled (7.19.5).
  2. Install Windows Open-SSL from http://www.slproweb.com/products/Win32OpenSSL.html and make a donation to support his bandwidth cost.
  3. Install the Visual C++ 2008 redistributables if you need them.
  4. Use curl to fetch the page: curl.exe -U : --proxy-ntlm --proxy myproxy.com:8080 http://www.google.com



更详细的解释



使用Windows登录机制进行身份验证的神奇短语是 SSPI 。这给了一个很好的google搜索短语。我仍然没有找到一个好的方法使用SSPI的HTTP代理认证在java或wget虽然。

More detailed explanation

The magic phrase for authentication using the Windows login mechanism is SSPI. This gives a good google search phrase. I still haven't found a good way of using SSPI for HTTP proxy authentication in java or wget though.

但是, curl(下载工具) 确实支持SSPI,但仅在某些版本中。不幸的是,默认的cygwin build不是其中之一。您可以通过获取详细的版本信息来了解您的构建的curl是否支持SSPI:

However, curl (the download tool) does support SSPI but only in certain builds. Unfortunately the default cygwin build is not one of them. You can find out if your build of curl supports SSPI by getting the verbose version information:

curl -v -V

如果支持SSPI,将在功能行中提及。

If SSPI is supported it will be mentioned in the features line.

要获得支持SSPI的Windows版本,我必须访问 http: //curl.haxx.se/latest.cgi?curl=win32-ssl ,然后将下载选项更改为 Windows,zip,启用SSL,启用SSPI(7.19.5)。当您读取此版本号可能已更改。

To get a windows version that supported SSPI I had to go to http://curl.haxx.se/latest.cgi?curl=win32-ssl and then change the download choice to Windows, zip, SSL-enabled, SSPI-enabled (7.19.5). By the time you read this the version number may have changed.

然后这会从命令行静默失败。当我从Windows explorer运行时,我得到一个关于缺少libeay32.dll的消息。从Windows获取此方法的一种方法是从 openssl.org 到< a href =http://www.slproweb.com/products/Win32OpenSSL.html =noreferrer> Windows版本。这个生产者要求捐赠以支付带宽成本。另一种方法是从源代码构建您自己的。

This then silently failed from the command line. When I ran from windows explorer I got a message about a missing libeay32.dll. One way of getting this from windows is from the only link at openssl.org to a windows version. The producer of this requests a donation to cover bandwidth costs. Another way would be to build your own from source.

然后curl使用下面的命令行:

And after all that curl worked with the following command line:

curl.exe -U : --proxy-ntlm --proxy myproxy.com:8080 http://www.google.com

-U:不配置密码,其他命令行选项设置代理。您可能需要更改您的代理和端口设置。

The -U : configures no password, the other commandline options set up the proxy. You'll probably have to change your proxy and port settings.

如果只有cygwin的curl版本支持SSPI,这将更容易。我现在要去请求。

This would all be much easier if only cygwin's curl release supported SSPI. I'm going to go put in a request for that now.

这篇关于NTLM代理没有密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆