首页
社区
课程
招聘
[原创]虚拟文件工具 v1.0 源码 for delphi
2006-10-11 11:22 5814

[原创]虚拟文件工具 v1.0 源码 for delphi

vxin 活跃值
10
2006-10-11 11:22
5814
源于:shoooo的epe国庆游戏~~

unit Un_main;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls, Buttons,shellapi,inifiles, WinSkinData;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    SpeedButton1: TSpeedButton;
    Edit2: TEdit;
    SpeedButton2: TSpeedButton;
    Edit3: TEdit;
    SpeedButton3: TSpeedButton;
    Button1: TButton;
    OpenDialog1: TOpenDialog;
    SaveDialog1: TSaveDialog;
    SkinData1: TSkinData;
    ProgressBar1: TProgressBar;
    procedure SpeedButton1Click(Sender: TObject);
    procedure SpeedButton2Click(Sender: TObject);
    procedure SpeedButton3Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  ini:tinifile;
  path,tmp:string;
  TimerID: Integer;
implementation

{$R *.dfm}
function ExtractFileNameEx(FileName: string): string;  //返回文件名
begin
  Result := ExtractFileName(FileName);
  Result := Copy(Result, 1, Length(Result) - length(ExtractFileExt(FileName)));
end;

function IsValidFileName(FileName: string): Boolean;
{
  判断FileName是否是合法的文件名,是,返回True,否则,返回False;
}
var
  i: integer;
begin
  result := True;
  for i := 1 to Length(FileName) do
    if FileName[i] in ['<', '>', '?', '/', '\', ':', '*', '|', '"'] then
    begin
      result := False;
      Exit;
    end;
end;

procedure TimerFunc;
begin
  application.MessageBox('文件已经创建成功!','提示',MB_OK+MB_ICONINFORMATION);
  KillTimer(0, TimerID);
end;

procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
   if OpenDialog1.Execute then
   edit1.Text:=OpenDialog1.FileName;
end;

procedure TForm1.SpeedButton2Click(Sender: TObject);
begin
   if OpenDialog1.Execute then
   edit2.Text:=OpenDialog1.FileName;
   edit3.Text:=ExtractFilePath(OpenDialog1.FileName)+
   ExtractFileNameEx(OpenDialog1.FileName)+'_VM'+
   ExtractFileExt(OpenDialog1.FileName);
end;

procedure TForm1.SpeedButton3Click(Sender: TObject);
begin
   if SaveDialog1.Execute  then
   edit3.Text:=SaveDialog1.FileName;
end;

procedure TForm1.Button1Click(Sender: TObject);
var M:TStringList;
begin
   if (FileExists(edit1.Text)) and (FileExists(edit2.Text)) and (IsValidFileName(ExtractFileNameEx(edit3.Text))) then
   begin
   tmp:=ExtractFileNameEx(Edit3.Text)+
   ExtractFileExt(Edit3.Text);
   path := ExtractFilePath(Application.ExeName);
   m:=TStringList.Create;
   m.Text:='copy '+'"'+edit2.Text+'"'+'/b +'+'"'+edit1.Text+'"'+'/b '+'"'+edit3.Text+'"';
   m.SaveToFile(path+'run.bat');
   m.Free;
   winexec(pchar(path+'run.bat'),SW_HIDE);
   ProgressBar1.Position:=20;
   sleep(1500);
   ProgressBar1.Position:=100;
   application.MessageBox(pchar('虚拟文件『'+tmp+' 』已经创建成功!'),'提示',MB_OK+MB_ICONINFORMATION);
   ProgressBar1.Position:=0;
   deletefile(path+'run.bat');
   end;
end;

end.

[培训]《安卓高级研修班(网课)》月薪三万计划,掌 握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法

上传的附件:
收藏
点赞7
打赏
分享
最新回复 (4)
雪    币: 7300
活跃值: (3758)
能力值: (RANK:1130 )
在线值:
发帖
回帖
粉丝
海风月影 22 2006-10-11 11:25
2
0
copy file1 /b + file2 /b file3
雪    币: 372
活跃值: (31)
能力值: ( LV12,RANK:410 )
在线值:
发帖
回帖
粉丝
vxin 10 2006-10-11 11:31
3
0
最初由 海风月影 发布
copy file1 /b + file2 /b file3


只能用批处理实现。。。

shellexecute 和 winexec似乎不行。。。
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
eech 2006-11-19 18:26
4
0
新来的.请问这软件做什么用的?
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
duchuan 2006-11-23 12:36
5
0
高手能和你交朋友不。
游客
登录 | 注册 方可回帖
返回