Foro de elhacker.net

Programación => Programación Visual Basic => Mensaje iniciado por: 79137913 en 29 Septiembre 2010, 13:38 pm



Título: [Mini Aporte] BASICO Codigo para Cambiar Proxies del iexplore
Publicado por: 79137913 en 29 Septiembre 2010, 13:38 pm
HOLA!!!

Bueno, aca abajo esta como cambiar los proxies del iexplore por el registro.
Solamente tenes que cargar el Vector "Proxy()" y enviar la variable "NumProx" que vendria a ser el numero de proxy en la lista.

Use este codigo en un programa que servia para hacer clicks automaticos en google cada un intervalo aleatorio de segundos para subir el G.Analytics. (o como se escriba).

No es un codigo grande, pero me ayudo en su momento, por ahi les puede servir. Igual, obvio que este post no va dedicado a un nivel alto.

Pero si quieren que corrija algo avisen.


Código
  1. Public NumProx as integer
  2.  
  3. Private Sub Form_Unload(Cancel As Integer)
  4. Dim strProxyServer
  5. ' define el proxy y el puerto si es necesario
  6. strProxyServer = ""
  7. ' ubicacion en la registry
  8. Dim strRegPath
  9. strRegPath = "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\"
  10. Set oWshShell = CreateObject("WScript.Shell")
  11. ' modifica las entradas en el registro
  12. Call oWshShell.RegWrite(strRegPath & "ProxyEnable", "00000001", "REG_DWORD")
  13. Call oWshShell.RegWrite(strRegPath & "ProxyOverride", "<local>", "REG_SZ")
  14. Call oWshShell.RegWrite(strRegPath & "ProxyServer", strProxyServer, "REG_SZ")
  15. ' destroy
  16. Set oWshShell = Nothing
  17. End Sub
  18.  
  19. Private Sub PROXYCHANGE()
  20. Dim strProxyServer
  21. ' define el proxy y el puerto si es necesario
  22. strProxyServer = PROXY(numProx)
  23. ' ubicacion en la registry
  24. Dim strRegPath
  25. strRegPath = "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\"
  26. Set oWshShell = CreateObject("WScript.Shell")
  27. ' modifica las entradas en el registro
  28. Call oWshShell.RegWrite(strRegPath & "ProxyEnable", "00000001", "REG_DWORD")
  29. Call oWshShell.RegWrite(strRegPath & "ProxyOverride", "<local>", "REG_SZ")
  30. Call oWshShell.RegWrite(strRegPath & "ProxyServer", strProxyServer, "REG_SZ")
  31. ' destroy
  32. Set oWshShell = Nothing
  33. End Sub
  34.  

GRACIAS POR LEER!!!