Jump to content



Photo

Proxy setting


  • Please log in to reply
16 replies to this topic

#1 Wvb

Wvb

    Seeker

  • New Members
  • 8 posts

Posted 19 March 2007 - 02:50 PM

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







#2 jinxter

jinxter

    Prodigy

  • Active Members
  • PipPipPip
  • 157 posts

Posted 19 March 2007 - 03:31 PM

If a script is used, can't you just read the script for the info ?
> there are 10 types of people in the world, those who understand binary and those who don't.

#3 jaenster

jaenster

    There is no spoon.

  • Active Members
  • PipPipPipPipPipPip
  • 670 posts

Posted 19 March 2007 - 03:32 PM

ask bill gates for the encryption info of internet explorer?
-jaenster

#4 Wvb

Wvb

    Seeker

  • New Members
  • 8 posts

Posted 19 March 2007 - 04:02 PM

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.

#5 lod3n

lod3n

    Another day, another mind-boggling adventure!

  • Active Members
  • PipPipPipPipPipPip
  • 874 posts

Posted 19 March 2007 - 05:02 PM

Why are you trying to do this? Just curious. Are you trying to fix their proxies or something?

#6 jinxter

jinxter

    Prodigy

  • Active Members
  • PipPipPip
  • 157 posts

Posted 20 March 2007 - 07:23 AM

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.

#7 Wvb

Wvb

    Seeker

  • New Members
  • 8 posts

Posted 20 March 2007 - 07:58 AM

I am trying to get the proxy settings so i can use them in an external program to tunnel thru their proxy. Or does have autoit tunnel support?

#8 Wvb

Wvb

    Seeker

  • New Members
  • 8 posts

Posted 20 March 2007 - 09:05 AM

Like they do by Microsoft: http://support.microsoft.com/default.aspx?...kb;en-us;226473

#9 CrewXp

CrewXp

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 325 posts

Posted 20 March 2007 - 09:42 AM

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.


Easier route: Ask your local administrator what the settings are?

#10 Wvb

Wvb

    Seeker

  • New Members
  • 8 posts

Posted 20 March 2007 - 09:50 AM

Well tthe script must always work and i work at 4 different locations :whistle:

#11 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 20 March 2007 - 01:28 PM

@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

#12 Wvb

Wvb

    Seeker

  • New Members
  • 8 posts

Posted 21 March 2007 - 04:06 PM

Thank you very much ptrex, but if i use my PAC file to detect the proxy it does not give that back. A PAC is used when you set the AutoConfigURL and it is some sort of javascript to define a proxy.
Information: http://en.wikipedia.org/wiki/Proxy_auto-config

#13 lod3n

lod3n

    Another day, another mind-boggling adventure!

  • Active Members
  • PipPipPipPipPipPip
  • 874 posts

Posted 21 March 2007 - 04:19 PM

What do you mean by "tunnel through their proxy"? Are you establishing a SSH connection or something? Or just downloading a file from the Internet?

#14 SadBunny

SadBunny

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 743 posts

Posted 21 March 2007 - 05:43 PM

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, 21 March 2007 - 05:44 PM.

Roses are FF0000Violets are 0000FFAll my base are belong to you

#15 Wvb

Wvb

    Seeker

  • New Members
  • 8 posts

Posted 22 March 2007 - 07:42 AM

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

#16 CrewXp

CrewXp

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 325 posts

Posted 22 March 2007 - 09:09 AM

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?

#17 Wvb

Wvb

    Seeker

  • New Members
  • 8 posts

Posted 22 March 2007 - 09:38 AM

Sorry i did not see your reply, a pac file can be localy but here it is an URL (example: http://www.domain.com/proxy.pac)
I hoped you could read it from wininet.dll because you can read if you are online and which connections is used...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users