dinodod Posted July 2, 2007 Share Posted July 2, 2007 (edited) Is there any way to develop a local internet filter to remove ads in web sites BEFORE they are seen / access by the client? I was thinking of setting the proxy settings in the IE client and have it redirected to a local proxy server app running on the client. The app itself would be where the filtering would be done PRIOR to the client so that the client can avoid ads in the HTML ??? Edited July 2, 2007 by dinodod Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007 Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 2, 2007 Share Posted July 2, 2007 Yes, this is very much possible. All you have to do is figure out the proxy protocols and set up a proxy server in AutoIt which will then connect to the internet. I hope you know enough about TCP to do this. It was actually something I was wanting to write for one of the labs in my school, but I had too much homework to do it. Good luck on this if you ever get started. Link to comment Share on other sites More sharing options...
dinodod Posted July 2, 2007 Author Share Posted July 2, 2007 (edited) Almost looks like I have it. I can see that I am able to send the data but then I don't see any data being returned [$RemoteReceive].Thoughts ???expandcollapse popupTCPStartup () Global $myip = "127.0.0.1" Global $myport = 81 Global $remoteip = TCPNameToIP("www.google.com") Global $remoteport = 80 Global $rm ; received message Global $sm ; sent message Global $iBytes Global $passkey = "#32342345#32f" Global $markstart = "~!2!" Global $markend = "@#$SEEE3112" Dim $Send2Remote, $RemoteReceive, $Remotelisteningsocket, $RemoteConnectedlisteningSocket $listeningsocket = TCPListen ($myip, $myport, 100); define socket If $listeningsocket = -1 Then Exit ;Msgbox ( 0, "listen","s") While 1 $ConnectedlisteningSocket = TCPAccept($listeningsocket);permit incoming Msgbox ( 0, "listen",$ConnectedlisteningSocket) ;$rm = _TCPRecieveText ($ConnectedlisteningSocket) $rm = TCPRecv ($ConnectedlisteningSocket, 1024) ;Msgbox ( 0, "", $rm & " !!!") If $rm <> "" Then ;ConsoleWrite ( $rm & " <" & @LF ) ;Msgbox ( 0, "rm not null", $rm & " <>") $RemoteSite=TCPConnect($remoteip, $remoteport) msgbox(0,"remote connection", $RemoteSite) if $RemoteSite=0 OR @ERROR then msgbox(0,'Error','could not connect to remote sever') exit else $Send2Remote = TCPSend($RemoteSite,$rm) ;msgbox(0,"Sent Data", $Send2Remote & " bytes") $Remotelisteningsocket = TCPListen ($remoteIP, $remoteport, 100); define socket $RemoteConnectedlisteningSocket = TCPAccept($Remotelisteningsocket);permit incoming while 2 ;while $RemoteReceive = "" $RemoteReceive = TCPRecv ($RemoteConnectedlisteningSocket, 1024) msgbox(0,"received",$RemoteReceive) wend endif EndIf ;Sleep ("500") Wend Edited July 2, 2007 by dinodod Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007 Link to comment Share on other sites More sharing options...
Dale2507 Posted September 30, 2007 Share Posted September 30, 2007 (edited) Hey, Just wonderin if ur still interested in this cos i've just started working on 1 which partially works just having some trouble getting pages to load. Once i get proxy sorted then i can easily implement a whitelist an blacklist. Could also try other services as well as http. Post back if ur still interested. EDIT: btw i'm lookin at ur script EDIT: I've had look at ur script an i've worked on it but it gets to the same point as mine This is my script \/ expandcollapse popup#include <GUIConstants.au3> #include <Array.au3> TCPStartup() $MainSocket = TCPListen("127.0.0.1", 8080) If $MainSocket = -1 Then Exit While 1 Local $ConnectedSocket = -1 Do $ConnectedSocket = TCPAccept($MainSocket) Until $ConnectedSocket <> -1 ConsoleWrite("Browser Connected" & @CRLF) Local $msg, $recv While 1 $recv = TCPRecv($ConnectedSocket, 2048) If @error Then ExitLoop If $recv <> "" Then ConsoleWrite("Recived data from browser:-" & @CRLF & $recv & @CRLF & @CRLF) MsgBox(0, "TEST", $recv) $split1 = StringSplit($recv, "Host: ", 1) $split2 = StringSplit($split1[2], @CRLF) $ip = TCPNameToIP($split2[1]) ConsoleWrite("Host IP: " & $ip & @CRLF) $socket = TCPConnect($ip, 80) TCPSend($socket, $recv) $recv = "" Do $recv2 = TCPRecv($socket, 1000000) If $recv2 <> "" Then $recv &= $recv2 Until $recv <> "" And $recv2 = "" ConsoleWrite("Web server data:-" & @CRLF & $recv & @CRLF & @CRLF) TCPCloseSocket($socket) ConsoleWrite("Disconnected from web server" & @CRLF) TCPSend($ConnectedSocket, $recv) ConsoleWrite("Sent Data to browser" & @CRLF) EndIf WEnd TCPCloseSocket($ConnectedSocket) ConsoleWrite("Disconnected from web browser" & @CRLF) WEnd TCPShutdown() Edited September 30, 2007 by Gmail Deal or No Deal? Link to comment Share on other sites More sharing options...
dinodod Posted November 20, 2007 Author Share Posted November 20, 2007 Thanks for the comment. I haven't been working on it as my RL has been crazy. I got to look into it more as I am hellbent on wanting to get a proxy app working badly. If anyone has any further info on this, please advise! Hey, Just wonderin if ur still interested in this cos i've just started working on 1 which partially works just having some trouble getting pages to load. Once i get proxy sorted then i can easily implement a whitelist an blacklist. Could also try other services as well as http. Post back if ur still interested. EDIT: btw i'm lookin at ur script EDIT: I've had look at ur script an i've worked on it but it gets to the same point as mine This is my script \/ expandcollapse popup#include <GUIConstants.au3> #include <Array.au3> TCPStartup() $MainSocket = TCPListen("127.0.0.1", 8080) If $MainSocket = -1 Then Exit While 1 Local $ConnectedSocket = -1 Do $ConnectedSocket = TCPAccept($MainSocket) Until $ConnectedSocket <> -1 ConsoleWrite("Browser Connected" & @CRLF) Local $msg, $recv While 1 $recv = TCPRecv($ConnectedSocket, 2048) If @error Then ExitLoop If $recv <> "" Then ConsoleWrite("Recived data from browser:-" & @CRLF & $recv & @CRLF & @CRLF) MsgBox(0, "TEST", $recv) $split1 = StringSplit($recv, "Host: ", 1) $split2 = StringSplit($split1[2], @CRLF) $ip = TCPNameToIP($split2[1]) ConsoleWrite("Host IP: " & $ip & @CRLF) $socket = TCPConnect($ip, 80) TCPSend($socket, $recv) $recv = "" Do $recv2 = TCPRecv($socket, 1000000) If $recv2 <> "" Then $recv &= $recv2 Until $recv <> "" And $recv2 = "" ConsoleWrite("Web server data:-" & @CRLF & $recv & @CRLF & @CRLF) TCPCloseSocket($socket) ConsoleWrite("Disconnected from web server" & @CRLF) TCPSend($ConnectedSocket, $recv) ConsoleWrite("Sent Data to browser" & @CRLF) EndIf WEnd TCPCloseSocket($ConnectedSocket) ConsoleWrite("Disconnected from web browser" & @CRLF) WEnd TCPShutdown() Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007 Link to comment Share on other sites More sharing options...
ptrex Posted November 21, 2007 Share Posted November 21, 2007 @All A proxy was already made by someone else. I don't know who but here it is. Server 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)oÝ÷ Ø)bz{ZºÚ"µÍÈËÝÝÝËËÜËÜÜËÜÌNL[ÔÝ BÌÍÜÝHBÌÍÜÛØÚÙ]HÔÛÛXÝ ÌÎNÎK ÌÎNË MÌ HÈKHÛØÚÍHÞBÌÍØÛYH ÌÎNÐÓQÓÓPÕ LLKL ÌÑUÈÌKIÌÎNÈ [ÈÔÈ LLKL ÌH]]Ú]ØÜÛÛBÔÙ[ ÌÍÜÛØÚÙ] ÌÍØÛY BÚ[H JBY ÌÍÜÝHJH[ ÌÍÜÜÝHÔXÝ ÌÍÜÛØÚÙ] LLBY ÌÍÜÜÝ ÉÝÈ ][ÝÉ][ÝÊH[ÙÐÞ ][ÝÉ][ÝË ÌÍÜÜÝB[Y[YÑ[ Ii hope this can help you get going. 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...
BrettF Posted November 21, 2007 Share Posted November 21, 2007 BinaryString = Binary Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
ptrex Posted November 22, 2007 Share Posted November 22, 2007 @Bert Thanks for the tip. I'll tell the guy who created this, if I ever find out. 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...
BrettF Posted November 22, 2007 Share Posted November 22, 2007 Pleasure... Pity it never worked... For me. Any tips on usage? And should it still work? I have no knowledge on how it works... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
ptrex Posted November 22, 2007 Share Posted November 22, 2007 @Bert Sorry but I never used it. I just grabbed it from the forum some time back. Maybe you can do search and trace back the thread. 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...
BrettF Posted November 22, 2007 Share Posted November 22, 2007 Ok. I searched for the string "81.x.x.x sock5"Alas returned: http://www.autoitscript.com/forum/index.ph...B81.x.x.x+sock5 Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! 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