Jump to content

Proxy setting


Wvb
 Share

Recommended Posts

How can i get the proxy settings (server, user, password) which are defined on a system?

Do not give the registry solution because that does not work when users have a script which defines the proxy.

I wanted to get it thru wininet.dll but i cannot get out any information out it with dllcall.

Suggestions are welcome

Link to comment
Share on other sites

The script can be different for every user and the script file is like a javascript with alot of if/else so it would be nicer if you can read it out.

You can read some value options out of wininit.dll, for example if a proxy is used but not what server.

Link to comment
Share on other sites

my guess (though I'm usually wrong, so don't take my word for it 8) ) is that the proxy enable setting is locally set on the computer. If it is set, internet explorer reads the script and uses it accordingly without setting anything locally.

> there are 10 types of people in the world, those who understand binary and those who don't.

Link to comment
Share on other sites

@Wvb

this give you some basic Proxy settings info.

It' s a start

$strComputer = "."
 $objWMIService = ObjGet("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & $strComputer & _
        "\root\cimv2\Applications\MicrosoftIE")

 $colIESettings = $objWMIService.ExecQuery _
    ("Select * from MicrosoftIE_LANSettings")

For $strIESetting in $colIESettings
    ConsoleWrite ("Autoconfiguration proxy: " & $strIESetting.AutoConfigProxy &@CR)
    ConsoleWrite ("Autoconfiguration URL: " & $strIESetting.AutoConfigURL &@CR)
    ConsoleWrite ("Autoconfiguration Proxy detection mode: " & _
        $strIESetting.AutoProxyDetectMode()&@CR)
    ConsoleWrite ("Proxy: " & $strIESetting.Proxy &@CR)
    ConsoleWrite ("Proxy override: " & $strIESetting.ProxyOverride &@CR)
    ConsoleWrite ("Proxy server: " & $strIESetting.ProxyServer &@CR)
Next

Enjoy !!

ptrex

Link to comment
Share on other sites

I guess I'm missing something here as usual... But isn't this information you need just stored in:

HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\AutoConfigURL (for auto proxy config script)

... and:

HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer (for fixed proxy settings)

?

/edit: stupid copypaste error :whistle:

Edited by SadBunny

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Link to comment
Share on other sites

I want to HTTP tunnel information outside the network but we use a proxy.

The uto proxy config script is a PAC file which is a javascript like file which decidese what proxy to use (evey location has is own proxy and at home i do not have one). So i know the URL and can download the file but then i need to do the same check as Internet Explorer does.

So i need the proxy which is used by the running Internet Explorer...

THanx for all the info so far

Link to comment
Share on other sites

So yeah, like I said... he needs to tinker with the program that sets the proxy. "If I'm understanding you correctly, you'ld have to mess with the script that's defining the proxy for it. Depends on how it handles proxies."

.. everyone just completely ignored me.. :whistle:

Is the Pac file located directly on the computer itself?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...