Wvb Posted March 19, 2007 Posted March 19, 2007 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
jinxter Posted March 19, 2007 Posted March 19, 2007 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.
jaenster Posted March 19, 2007 Posted March 19, 2007 ask bill gates for the encryption info of internet explorer? -jaenster
Wvb Posted March 19, 2007 Author Posted March 19, 2007 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.
lod3n Posted March 19, 2007 Posted March 19, 2007 Why are you trying to do this? Just curious. Are you trying to fix their proxies or something? [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]
jinxter Posted March 20, 2007 Posted March 20, 2007 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.
Wvb Posted March 20, 2007 Author Posted March 20, 2007 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?
Wvb Posted March 20, 2007 Author Posted March 20, 2007 Like they do by Microsoft: http://support.microsoft.com/default.aspx?...kb;en-us;226473
CrewXp Posted March 20, 2007 Posted March 20, 2007 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?
Wvb Posted March 20, 2007 Author Posted March 20, 2007 Well tthe script must always work and i work at 4 different locations
ptrex Posted March 20, 2007 Posted March 20, 2007 @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 Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
Wvb Posted March 21, 2007 Author Posted March 21, 2007 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
lod3n Posted March 21, 2007 Posted March 21, 2007 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? [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]
SadBunny Posted March 21, 2007 Posted March 21, 2007 (edited) 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 Edited March 21, 2007 by SadBunny Roses are FF0000, violets are 0000FF... All my base are belong to you.
Wvb Posted March 22, 2007 Author Posted March 22, 2007 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
CrewXp Posted March 22, 2007 Posted March 22, 2007 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.. Is the Pac file located directly on the computer itself?
Wvb Posted March 22, 2007 Author Posted March 22, 2007 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...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now