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

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

问题描述

我企业Windows网络(我登录到)与HTTP代理服务器上运行。当我使用Internet Explorer它神奇地使用,而不需要我在输入我的密码的代理。某些其他程序似乎过于管理这个,像JavaWebStart具有使用浏览器设置选项。

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.

然而,当我使用脚本/像卷曲或wget的程序从http取东西,或者我的Java code我似乎需要有地方存储我的密码,这显然不是最好的安全范围内做到这一点。

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.

我怎样才能得到Internet Explorer已经以编程的方式在无密码的访问?

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

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设置,但仍需要NTLM用户名和密码。

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

推荐答案

在没有从别人这里的答案是我已经发现了,我希望这是对别人有用的。

In the absence of an answer from someone else here is what I have discovered, I hope it is useful for someone else.


    使卷曲
  1. 下载SSPI从<一个href=\"http://curl.haxx.se/latest.cgi?curl=win32-ssl\">http://curl.haxx.se/latest.cgi?curl=win32-ssl更改为,启用SSL,SSPI启用的窗,拉链(7.19.5)

  2. 安装Windows开放式SSL从<一个href=\"http://www.slproweb.com/products/Win32OpenSSL.html\">http://www.slproweb.com/products/Win32OpenSSL.html并进行捐赠,以支持他的带宽成本。

  3. 安装<一href=\"http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en\">Visual C ++ 2008可再发行的,如果你需要他们。

  4. 使用卷曲抓取的页面: 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 。这给出了一个很好的谷歌搜索短语。我至今还没有找到使用SSPI在java或wget的,虽然HTTP代理身份验证的一种好方法。

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.

不过,卷曲(下载工具) 确实支持SSPI但只在一定的基础之上。不幸的是,默认的cygwin的版本是不是其中之一。你可以看看你的卷曲构建支持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版本我不得不去<一个href=\"http://curl.haxx.se/latest.cgi?curl=win32-ssl\">http://curl.haxx.se/latest.cgi?curl=win32-ssl然后更改下载选择的,邮编,启用SSL,SSPI-启用了Windows(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资源管理器跑我得到一个关于失踪的libeay32.dll消息。获取Windows的方法之一就是从 openssl.org 到的 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.

和所有的卷曲后下面的命令行工作:

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的卷曲版本支持的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天全站免登陆