How to access a proxy without a username and password?

I want to automate time by supporting the web client using nokogiri and mechanize . I need to connect through a proxy server, however the trick, I do not know the username and password of the specified proxy server. I would like to capture the cached credentials for this proxy that are stored on the computer.

For example, in c# you can use:

 string proxyUri = proxy.GetProxy(requests.RequestUri).ToString(); requests.UseDefaultCredentials = true; requests.Proxy = new WebProxy(proxyUri, false); requests.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials; 

This will get the credentials that are already registered and use them to access the proxy server, does Ruby have anything like that? I know that you can use a proxy in ruby, and it is quite simple, however I can not get any information for the proxy (user password). This proxy does not allow me to connect to the network. Is there a way to get cached credentials (username, password) and access the proxy? Or, if this is not possible, is there a way around this?

+5
source share
1 answer

You can try and get them directly from the registry. Settings should be in

 HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings ProxyEnable REG_DWORD ProxyServer REG_SZ ProxyUser REG_SZ ProxyPass REG_SZ 

but depending on how your utility starts, it may have problems accessing the corresponding hive.

Or maybe ... where one utility is not enough ... use two .

+2
source

All Articles