IE proxy

« Older   Newer »
  Share  
xdmisterx
CAT_IMG Posted on 14/7/2009, 14:17     +1   -1




Un semplice programma che permette di proxarsi con Internet Explorer attraverso la modifica delle chiavi di registro.
SPOILER (click to view)
CODICE
#cs  --------------------------
       |                          |
       | +     +                   /  |
       | + *  *+            /    |
       | +  *  +          /      |
       | +     +         /        |
       | +            +       /         |
       | +            +     /           |
   |                          |
#ce  --------------------------
#NoTrayIcon
#include <GuiConstants.au3>
#include <IE.au3>
#include <File.au3>
#include <INet.au3>
#include <GuiListView.au3>
#include <GuiButton.au3>
#include <GuiListBox.au3>
#include <Process.au3>

Global $on=1,$setact=0

;creazione file lista se non esiste
$list=@ScriptDir &"proxy.txt"
If Not FileExists($list) Then
       _FileCreate($list)
EndIf

;verifica se il proxy č gią impostato
$var=RegRead("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settings","ProxyEnable")
If $var=1 Then
       $alert=MsgBox(48+4,"IE proxy","Il proxy č gią abilitato." & @CRLF &"Mantenere impostazioni?")
       If $alert=7 Then
               _iesetproxy("",False)
       Else
               $setact=1
               $on=0
       EndIf
EndIf

;GUICreate
$gui=GUICreate("IE proxy",170,340)
ProgressOn("IE proxy","Rilevamento ip...")
For $prog=10 To 80 Step 10
       Sleep(10)
       ProgressSet($prog,$prog &"%")
Next
ProgressSet(90,"90%")
$menu=GUICtrlCreateMenu("Il tuoi ip e': "& _GetIP())
ProgressSet(100,"Rilevamento completato")
ProgressOff()
$apri=GUICtrlCreateMenuItem("Proxy.txt",$menu)
$ping=GUICtrlCreateMenuItem("Ping",$menu)
$exit=GUICtrlCreateMenuItem("Esci",$menu)
$help=GUICtrlCreateMenu("?")
$about=GUICtrlCreateMenuItem("About",$help)
$proxylist=GUICtrlCreateList("",10,10,150,200)
$add=GUICtrlCreateButton("Aggiungi",10,200,150)
$act=GUICtrlCreateButton("Attiva selezionato",10,230,150)
If $setact=1 Then _GUICtrlButton_SetText($act,"Disattiva selezionato")
$aggiorna=GUICtrlCreateButton("Aggiorna lista",10,260,150)
$ieopen=GUICtrlCreateButton("Avvia Internet Explorer",10,290,150)

;aggiornamento lista
_aggiorna($list,$proxylist)

GUISetState()
While 1
       $msg=GUIGetMsg()
       Switch $msg
       Case $ping
               $pingb=InputBox("IE proxy","Inserisci l'host:","","",50,50)
               _RunDOS("start ping -t "& $pingb)
       Case $about
               MsgBox(0,"IE proxy","Copyright© by Misterx.",5)
       Case $ieopen
               $iep=InputBox("IE proxy","Inserisci l'indirizzo di partenza:","http:\www.google.it","",50,50)
               _RunDOS("start iexplore.exe "& $iep)
       Case $aggiorna
               _GUICtrlListBox_Destroy($proxylist)
               $proxylist=GUICtrlCreateList("",10,10,150,200)
               _aggiorna($list,$proxylist)
       Case $act
               If $on=1 Then
                       $on=0
                       _GUICtrlButton_SetText($act,"Disattiva selezionato")
                       $proxy1=GUICtrlRead($proxylist)
                       If $proxy1="" Then
                               MsgBox(48,"IE proxy","Selezionare il proxy")
                       Else
                               ProgressOn("IE proxy","Impostamento proxy "& $proxy1)
                               ProgressSet(50,"Impostazione proxy...                50%")
                               Sleep(100)
                               _iesetproxy($proxy1,True)
                               ProgressSet(80,"Rilevamento nuovo ip...                80%")
                               Sleep(100)
                               GUICtrlSetData($menu,"Il tuoi ip e': "& _GetIP())
                               ProgressSet(100,"Proxy attivo.")
                               Sleep(20)
                               ProgressOff()
                       EndIf
               ElseIf $on=0 Then
                       $on=1
                       _GUICtrlButton_SetText($act,"Attiva selezionato")
                       ProgressOn("IE proxy","Disattivazione proxy")
                       ProgressSet(50,"Disattivazione in corso...        50%")
                       _iesetproxy("",False)
                       ProgressSet(80,"Rilevamento nuovo ip...                80%")
                       GUICtrlSetData($menu,"Il tuoi ip e': "& _GetIP())
                       ProgressSet(100,"Completato")
                       Sleep(20)
                       ProgressOff()
               EndIf
       Case $apri
               $list=@ScriptDir &"proxy.txt"
               If Not FileExists($list) Then
                       _FileCreate($list)
               EndIf
               ShellExecute($list)
       Case $add
               $open=FileOpen($list,1)
               $ipp=InputBox("Proxy list","Inserisci l'ip del proxy:","","",50,50)
               $port=InputBox("Proxy list","Inserisci la porta:","","",50,50)
               FileWrite($open,$ipp& ":"& $port & @CRLF)
               FileClose($open)
               _aggiorna($list,$proxylist)
       Case $gui_event_close
               Exit
       Case $exit
               Exit
       EndSwitch
WEnd

Func _iesetproxy($proxy,$stato=True)
       $reg="HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settings"
       $regen=RegRead($reg,"ProxyEnable")
       If $stato=True Then
               If $regen=0 Then
                       RegWrite($reg,"ProxyEnable","REG_DWORD","1")
               EndIf
               $proxyserv=RegWrite($reg,"ProxyServer","REG_SZ",$proxy)
       ElseIf $stato=False Then
               If $regen=1 Then
                       RegWrite($reg,"ProxyEnable","REG_DWORD","0")
               EndIf
       EndIf
EndFunc

Func _aggiorna($file,$lista)
       $read=FileOpen($file,0)
               While 1
                       $list1=FileReadLine($read)
                       If @error= -1 Then ExitLoop
                       If Not $list1="" Then
                       GUICtrlSetData($lista,$list1)
                       EndIf
               WEnd
               FileClose($file)
EndFunc

Un sito per trovare proxy che funzionano (io ne ho provati i primi e funzionano perfettamente): http://www.proxy4free.com/page1.html
ciao :)

Download attachment
IE_proxy.rar ( Number of downloads: 8 )

 
Top
stoke
CAT_IMG Posted on 14/7/2009, 14:40     +1   -1




per la funzione del proxy ci provai, ma sen risultati, cmq buono
 
Top
1 replies since 14/7/2009, 14:17   139 views
  Share