RSS|Ͷ
λãվҳ > ϵͳ

delphiСг򴰿С

1.гСusesComObj;varshell:OleVariant;beginshell:=CreateOleObject('Shell.Application');shell.minimizeAll;end;2.Сspy++ҪСijclassnamevarIndicador:Integer;begin ...
ϵͳ ǩ ߣadmin ڣ2018-01-17 20.50.09

delphi Hook APIOpenProcessTerminateProcessֹ

˼·ʵȽϼ򵥣DLLдAPIOpenProcessTerminateProcessĽṹѱдAPIһĺGetProcAddressȡϵͳAPIڵַWriteProcessMemoryд
ϵͳ ǩ ߣadmin ڣ2018-01-17 08.05.55

delphi ȡû

functionCurrentUserName:String;varnSize:DWord;beginnSize:=1024;SetLength(Result,nSize);ifGetUserName(PChar(Result),nSize)thenSetLength(Result,nSize-1)elseRaiseLastOSError;end;functionCurrentDomain:Str
ϵͳ ǩ ߣadmin ڣ2018-01-16 19.38.25

delphi GetProcessIdentity ȡǰ¼״̬ĹԱ

//ȡеûfunctionGetProcessIdentity():String;varhToken:THandle;UserName,UserDomain:String;cbName,cbDomainName:ULONG;ReturnLength:DWORD;Buff:arrayofByte;tu:PTokenUser;peUse:SID_NAME_USE;la
ϵͳ ǩ ߣadmin ڣ2018-01-16 16.33.06

delphi ϵͳ״̬ȡԱû

//==============================typeWTS_INFO_CLASS=(WTSInitialProgram,WTSApplicationName,WTSWorkingDirectory,WTSOEMId,WTSSessionId,WTSUserName,WTSWinStationName,WTSDomainName,WTSConnectState,...
ϵͳ ǩ ߣadmin ڣ2018-01-16 10.35.07

delphi ̹ӵļӦ

ǣWindowsϵͳǽ¼Ļϵģ˵˾ϵͳͨϢĴʵֵġWindowsϵͳзdzҪϵͳӿڣԽػ񲢴͸ӦóϢͨӦóʵ֡
ϵͳ ǩ ߣadmin ڣ2018-01-16 07.44.18

DelphiȫֹӺ;ֲ

1.װSetWindowsHookExfunctionʵ֣MSDNInstallsanapplication-definedhookprocedureintoahookchain.Youwouldinstallahookproceduretomonitorthesystemforcertaintypesofevents.Th
ϵͳ ǩ ߣadmin ڣ2018-01-16 07.39.28

delphi EmptyRecycle() ջվ

//usesfunctionSHEmptyRecycleBinA(Wnd:HWND;str:PChar;WRD:DWORD):Integer;stdcall;external'SHell32.dll';{ջվ}//EmptyRecycle();functionEmptyRecycle():boolean;beginResult:=true;tryifAp
ϵͳ ǩ ߣadmin ڣ2018-01-15 19.58.49

delphi getSys32Path()õϵͳSystem32·

{õϵͳC:\Windows\system32·}//Edit1.text:=getSys32Path();functiongetSys32Path():string;varsPath:PCHAR;beginGetMem(sPath,255);GetSystemDirectory(sPath,255);Result:=sPath;//C:\Windows\system32e
ϵͳ ǩ ߣadmin ڣ2018-01-15 19.57.45

delphi GetComputerName() GetUserName() ȡǰû

{ȡǰû}//÷ֵ:=GetUser();functionGetUserName():string;varBuffer:array[0..255]ofChar;Size:cardinal;beginSize:=256;ifGetUserName(Buffer,Size)thenbeginResult:=BufferendelsebeginResult:
ϵͳ ǩ ߣadmin ڣ2018-01-15 19.56.03

Delphi GetDriveTypeA() 鿴

{GetDriveType}//GetDriveTypeA(Memo1);procedureGetDriveTypeA(Memo:TMemo);vari:Integer;C:String;DType:Integer;DriveString:String;begin//ͨѭжϸ̷...
ϵͳ ǩ ߣadmin ڣ2018-01-15 19.55.34

delphi Ȩ޽ʵҷļ

Vista/Win7ϵͳУUACUIPIĴڣȨ޵Ľ޷Ȩ޵Ľ̷κθWM_USERϢWM_USERϢһҲΪȫԭ򱻽ֹɼUACǰͻܶ鷳
ϵͳ ǩ ߣadmin ڣ2018-01-15 16.39.41

delphi WIN10Message޷յ

win10ЩϢ޷Ľգ磺WM_COPYDATAݴWM_DROPFILESļקΪϵͳΪ˰ȫˣҪЩϢҪһAPIChangeWindowMessageFilterhttps://msdn.microsoft.com/en-us
ϵͳ ǩ ߣadmin ڣ2018-01-15 16.30.48

delphi RunAsAdmin гԱȨ

procedureRunAsAdmin(constaFile:string;constaParameters:string='';Handle:HWND=0);varsei:TShellExecuteInfo;beginFillChar(sei,SizeOf(sei),0);sei.cbSize:=SizeOf(sei);sei.Wnd:=Handle;sei.fMask:=SEE_MASK_FL
ϵͳ ǩ ߣadmin ڣ2018-01-15 14.52.10

delphiִcmdbatļ

cmd:='echod|Xcopy'+BasePath+''+TargetPath+'/s/e';i:=ShellExecute(Handle,nil,'cmd.exe',PChar('/K'+cmd),nil,SW_HIDE);ShellExecute(Handle,nil,'cmd.exe',pchar('/C'+GetCurrentDir+'\build.bat'),nil,SW_HIDE)
ϵͳ ǩ ߣadmin ڣ2018-01-15 13.38.01

DELPHIдķڷʾ

DELPHIдķ򣬿XPϵͳķʾơû롰ӦķʾհסμԼġأĿǰַ1޸עHKEY_LOCAL_MA
ϵͳ ǩ ߣadmin ڣ2018-01-15 11.06.04

delphi ȡʱļ·

//:GetTempPath(nBufferLength:DWORD;{С}lpBuffer:PChar{}):DWORD;{ʵʳ}//:vararr:array[0..MAX_PATH]ofChar;num:DWORD;...
ϵͳ ǩ ߣadmin ڣ2018-01-14 09.41.05

delphi ϵͳҼ˵

unitPopupMenuShell;interfaceusesWindows,Messages,SysUtils,StrUtils,ComObj,ShlObj,ActiveX;functionDisplayContextMenu(constHandle:THandle;constFileName:string;Pos:TPoint):Boolean;implementationtypeTUnic
ϵͳ ǩ ߣadmin ڣ2018-01-13 17.03.14

Delphi֮ϵͳOEM DIY

//תעunitUnit1;interfaceusesWindows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms,Dialogs,ExtCtrls,StdCtrls,ExtDlgs,Registry;typeTForm1=class(TForm)GroupBox1:TGroupBox;Label1:T
ϵͳ ǩ ߣadmin ڣ2018-01-12 15.40.06

Delphi֮ʾֱ

unitUnit1;interfaceusesWindows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms,Dialogs,StdCtrls;typeTForm1=class(TForm)Label1:TLabel;procedureFormCreate(Sender:TObject);private{Privatedecla
ϵͳ ǩ ߣadmin ڣ2018-01-12 15.38.08