0 Replies - 1248 Views - Last Post: 21 May 2007 - 04:52 AM

#1 no2pencil   User is online

  • Professor Snuggly Pants
  • member icon

Reputation: 6655
  • View blog
  • Posts: 30,973
  • Joined: 10-May 07

Change proxy server

Posted 21 May 2007 - 04:52 AM

Description: Create a program using your favorite platform. This dll will accept a value of 0 or 1.A windows dll file that will change the proxy server in the registry (for IE).
Proxy_Change PROC STDCALL,src:DWORD 
  ; ------------------------------------ 
  ; this code opens the windows registry, 
  ; replaces the proxy server address, 
  ; & then sets enable to 0 or 1 
  ; ------------------------------------ 


    invoke  RegOpenKey,HKEY_CURRENT_USER,ADDR lpSubKey,ADDR lpFullKey 
    cmp eax,ERROR_SUCCESS 
    je     cont 
    invoke MessageBox,0,offset ErrMsg,offset AppName,MB_OK 
    ret 


  cont: 
    mov esi, src 
    cmp BYTE PTR [esi],48 
    je off 


  on: 
    mov arg,1 
    invoke RegSetValueEx,lpFullKey,addr lpValueName2,NULL, 
                         00000004h,addr arg,4 
    invoke RegSetValueEx,lpFullKey,addr lpValueName, 
                         NULL,00000001h,offset ProxyAddr,32 
    jmp done 


  off: 
    mov arg,0 
    invoke RegSetValueEx,lpFullKey,addr lpValueName2,NULL, 
                         00000004h,addr arg,4 
    invoke RegSetValueEx,lpFullKey,addr lpValueName, 
                         NULL,00000001h,offset FakeProxyAddr,32 


  done: 
    invoke RegCloseKey,lpFullKey 
    invoke MessageBox,0,addr Finish,offset AppName,MB_OK 
    ret 


Proxy_Change ENDP 



Is This A Good Question/Topic? 0
  • +

Page 1 of 1