piccaso Posted February 24, 2007 Share Posted February 24, 2007 Who sayd "AutoIt doesent support Socks proxy's" ? expandcollapse popupTCPStartup() $hc = TCPConnect("192.168.0.100",9050) ; Socks4a Proxy Server $sReq = Chr(0x04) _ ; Protocol version 4 & Chr(0x01) _ ; Command Code 1 - establish a tcp/ip stream connection & Chr(0x00) & Chr(0x50) _ ; Port 80 & Chr(0x00) & Chr(0x00) & Chr(0x00) & Chr(0xFF) _ ; Ip Adress Invalid - 0.0.0.255 & "" & Chr(0x00) _ ; User Id Empty & "www.mamma.com" & Chr(0x00) ; Host Name www.mamma.com ; Send Request to Proxy ConsoleWrite("! Request: " & Hex(BinaryString($sReq)) & @CR) TCPSend($hc,$sReq) ; Wait for the Reply While 1 $sBuff = TCPRecv($hc,1) If @error Then Exit @ScriptLineNumber If StringLen($sBuff) > 0 Then ExitLoop Sleep(100) WEnd $sBuff &= TCPRecv($hc,8) ConsoleWrite("! Reply: " & Hex(BinaryString($sBuff)) & @CR) ; Check for errors Switch StringMid(Hex(BinaryString($sBuff)),3,2) Case "5A" ConsoleWrite("> request granted" & @CR) Case "5B" ConsoleWrite("> request rejected or failed" & @CR) Exit @ScriptLineNumber Case "5C" ConsoleWrite("> request failed because client is not running identd (or not reachable from the server)" & @CR) Exit @ScriptLineNumber Case "5D" ConsoleWrite("> request failed because client's identd could not confirm the user id string in the request" & @CR) Exit @ScriptLineNumber EndSwitch ; Send Http Request to mamma and Search for "AutoIt" $sReq = "GET /Mamma?query=AutoIt HTTP/1.0" & @CRLF & @CRLF ConsoleWrite("! Request:" & @CR & $sReq & "---------------------------------" & @CR) TCPSend($hc,$sReq) ; Wait for the Reply ConsoleWrite("Receiving Data ") $sRepy = "" While 1 $sBuff = TCPRecv($hc,1024*5) If @error Then ExitLoop If StringLen($sBuff) > 0 Then $sRepy &= $sBuff ConsoleWrite(".") EndIf Sleep(100) WEnd ; Parse Reply $iHeadEnd = StringInStr($sRepy,@CRLF & @CRLF) + 2 $sRepyHead = StringMid($sRepy,1,$iHeadEnd) $sRepyBody = StringMid($sRepy,$iHeadEnd) ConsoleWrite(@CR & "! Reply:" & @CR & $sRepyHead & "---------------------------------" & @CR) ; Save Result to disk $hFile = FileOpen("socks.htm",2) FileWrite($hFile,$sRepyBody) FileClose($hFile) ConsoleWrite("Reply Body stored in .\socks.htm (" & Round(StringLen($sRepyBody)/1024,2) & "Kb)" & @CR) CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
konan Posted September 27, 2007 Share Posted September 27, 2007 thank you for your example. But i want know how to use socks5 proxy! Can you have me a example? Link to comment Share on other sites More sharing options...
ptrex Posted September 27, 2007 Share Posted September 27, 2007 @piccasoGreat stuff man !!Keep on going.Btw. I am trying to get the Au3CGI running on an IIS. AuCGIDid you have a change activating this ?Regards,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 Link to comment Share on other sites More sharing options...
piccaso Posted September 27, 2007 Author Share Posted September 27, 2007 thanks Would you reformulate your question for me? I dont understand it... Good old language barrier CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
ptrex Posted September 28, 2007 Share Posted September 28, 2007 @piccasokein Problem !! In fact my question does not relate to the Proxy Socks scripts. So I can understand why I need to restart again.I was thinking since you were able to get a Proxy running through using AU3. That you my be able to help me get the AuCGI handler running on an IIS server. CGI handlerIt seems that it is running on APACHE and ABYSS, but no one got it running on an IIS ?Nevertheless IIS supports CGI extentions. I am breaking my head on this for a long time now, but no success yet.Maybe you have a different view on the problem and are willing to give it a try.Thanks in advanceptrex 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 Link to comment Share on other sites More sharing options...
piccaso Posted September 29, 2007 Author Share Posted September 29, 2007 Sorry ptrex, i never touched IIS. I have been using unixes as server os ever since... Wikipedia says IIS 6 is integrated in windows xp, but where? CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
ptrex Posted September 29, 2007 Share Posted September 29, 2007 @piccaso The IIS on XP Pro is located on c:\inetpub\wwwroot But only on the Pro edition not on the home edition. Thanks anyhow Regards 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 Link to comment Share on other sites More sharing options...
Armand Posted December 22, 2007 Share Posted December 22, 2007 out-dated? -> BinaryString(), not working... What is the difference between normal proxies and SOCK proxies ?! [u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?! Link to comment Share on other sites More sharing options...
RyGoTypE Posted May 6, 2008 Share Posted May 6, 2008 (edited) (13,52) : ERROR: BinaryString(): undefined function. ConsoleWrite("! Request: " & Hex(BinaryString($sReq) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 1 error(s), 0 warning(s) Edited May 6, 2008 by RyGoTypE http://www.shizzkabiz.com/ Link to comment Share on other sites More sharing options...
Armand Posted May 6, 2008 Share Posted May 6, 2008 This has the above script translated to latest beta, however i still can't get SOCK5...http://www.autoitscript.com/forum/index.ph...3&hl=armand [u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?! Link to comment Share on other sites More sharing options...
James Posted May 6, 2008 Share Posted May 6, 2008 Way to bring up an old topic. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
lionfaggot Posted August 14, 2013 Share Posted August 14, 2013 alright, so i get that P is char 80 which is how you specify the port. via chr values. but what i dont get is how on earth would i specify for instance port 6667 Link to comment Share on other sites More sharing options...
BrewManNH Posted August 14, 2013 Share Posted August 14, 2013 You do realize that this topic is over 6 years old right? BTW, the 0x0050 is the port number, not the char P, you'd need to convert 6667 to hex and set the port accordingly. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator Link to comment Share on other sites More sharing options...
lionfaggot Posted August 14, 2013 Share Posted August 14, 2013 well that makes a lot more sense, also your 6 year old topic here is the only thing anywhere ever that references this topic so of course people are going to bump it. also thanks for that. seems like kind of a coincidence the P converts to 80 though. confused me. alright thanks Link to comment Share on other sites More sharing options...
lionfaggot Posted August 14, 2013 Share Posted August 14, 2013 (edited) also im confused 0x50 = char P converted to string and thus chr(0x50) returns P so im still confuses where you get 0x0050 from i dont think you actually know whats going on here, that or this is fairy unicorn logic but dont take my word for it see for yourself, you arent specifying the value 0x0050 (null P) as the port value youre specifying the Chr value that the binary string converts to. see for yourself Edited August 14, 2013 by lionfaggot Link to comment Share on other sites More sharing options...
BrewManNH Posted August 14, 2013 Share Posted August 14, 2013 & Chr(0x00) & Chr(0x50) _ ; Port 80 It appears that it's taking the character 0x00 (Null), and appending the port number to that (in char form) 0x50 = 80 decimal = port 80 in the code that I'm reading. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator Link to comment Share on other sites More sharing options...
lionfaggot Posted August 14, 2013 Share Posted August 14, 2013 0x50 returns P not 80 Link to comment Share on other sites More sharing options...
BrewManNH Posted August 14, 2013 Share Posted August 14, 2013 Hex 50 is 80 decimal, I don't really care what character it returns as it's not relevant. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator Link to comment Share on other sites More sharing options...
lionfaggot Posted August 14, 2013 Share Posted August 14, 2013 (edited) so its just a coincidence that P happens to be char value 80? i somewhat follow here. maybe im just retarded also the max value is FF which is 255 which still i am still confused as to how i output 6667 if the max range is FF Edited August 14, 2013 by lionfaggot Link to comment Share on other sites More sharing options...
lionfaggot Posted August 14, 2013 Share Posted August 14, 2013 (edited) i figured it out i think, this is how you do values larger than 255, you just append each digit seperately so for 6667 you do Chr(0x00) & Chr(0x06) & Chr(0x06) & Chr(0x06) & Chr(0x07) - no i was incorrect that isnt working either Edited August 14, 2013 by lionfaggot Link to comment Share on other sites More sharing options...
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