[php]
unit SocketUnit;
interface
uses
Windows;
const
szKeyBuffer: Array[0..$F] Of Char =(
#$A3, #$78, #$26, #$35, #$57, #$32, #$2D, #$60, #$B4, #$3C, #$2A, #$5E, #$33, #$34, #$72, #$00
);
Type
LPSocketHeader = ^TSocketHeader;
TSocketHeader = packed Record
dwSocketLen: DWORD;
bSocketCmd: Byte;
end;
const
CStr_MasterPort = 2000;
CStr_MasterAddress1 = ‚127.0.0.1‘;
CStr_MasterAddress2 = ‚localhost‘;
CStr_MasterAddress3 = ‚192.168.1.2‘;
const
cOsUnknown= 0;
cOsWin95 = 1;
cOsWin98 = 2;
cOsWinME = 3;
cOsWinNT3 = 4;
cOsWinNT4 = 5;
cOsWin2K = 6;
cOsWinXP = 7;
const
CDelimiter = $07; // Êý¾Ý·Ö¸ô·û
CTheEnd = $00; // ½áÊø·û
// Server³£ÓÃÖ¸Áî
CSocket_PING = $97; // PingÖ¸Áî
CSocket_Uninstall = $C1; // жÔØ
CSocket_ListProcess = $BE; // »ñÈ¡½ø³ÌÁбí
CSocket_GetBaseInfo = $C0; // »ñÈ¡»ù±¾ÅäÖÃÐÅÏ¢
CSocket_ListDrive = $82; // »ñÈ¡Çý¶¯Æ÷dÁбí
CSocket_ListFile = $83; // Ë¢ÐÂĿ¼Îļþ
CSocket_FileUploadStart = $84; // ÎļþÉÏ´«¿ªÊ¼(Ö¸Áîºó|DWORD-Îļþ³¤¶È|Îļþ·¾¶|)
CSocket_FileUploading = $85; // ÎļþÉÏ´«ÖÐ(ÿ´ÎÉÏ´«4090×Ö½Ú)
CSocket_FileDownStart = $86; // ÎļþÏÂÔØ¿ªÊ¼
CSocket_FileSendStop = $87; // ÖÕÖ¹Îļþ´«Êä
CSocket_FileRun = $88; // ÎļþÔËÐÐ(WinExec-Ö¸Áîºó¸úËæÎļþ·¾¶)
CSocket_CreateDirectory = $89; // ´´½¨Ä¿Â¼(CreateDirectory-Ö¸Áîºó¸úËæĿ¼·¾¶)
CSocket_FileDelete = $8A; // Îļþɾ³ý(Ö¸ÁîºóÊÇÐèҪɾ³ýµÄÎļþĿ¼)
CSocket_DeleteDirectory = $8B; // ɾ³ýĿ¼
CSockek_FileOpen = $8E; // ÎļþÔ¶³Ì´ò¿ª(ShellExecute-Ö¸Áîºó¸úËæÎļþ·¾¶-ÎÞ·µ»ØÖµ)
CSocket_FileRename = $8F; // Îļþ¸ÄÃû
// Client³£ÓÃÖ¸Áî
const
CSocket_Online = $32; // ÉÏÏßÖ¸Áî(·¢ËÍ»ù±¾Êý¾ÝÖ¸Áî)
CSocket_PONG = $33; // »ØÓ¦PingÖ¸Áî
CSocket_SendProcess = $5A; // ·¢Ëͽø³ÌÁбí
CSocket_SendBaseInfo = $5C; // ·¢ËÍClient»ù±¾ÐÅÏ¢
CSocket_SendListDrive = $1E; // ·¢ËÍÇý¶¯Æ÷Áбí
CSocket_SendDriveError = $45; // ·¢ËÍÇý¶¯Æ÷»ñÈ¡´íÎóÐÅÏ¢
CSocket_SendListFile = $1F; // ·¢ËÍÎļþºÍĿ¼Áбí
CSocket_SendListFileEnd = $20; // ÎļþÁÐ±í·¢ËÍÍê±Ï
CSocket_FileRunOk = $24; // ÎļþWinExec³É¹¦(Ö¸Áîºó¸úËæÔËÐеÄÎļþÃû)
CSocket_FileRunFailed = $3E; // ÎļþWinExecʧ°Ü(Ö¸Áîºó¸úËæÔËÐеÄÎļþÃû)
CSocket_FileDeleteOk = $26; // Îļþɾ³ý³É¹¦(Ö¸Áîºó¸úËæɾ³ýµÄÎļþÃû)
CSocket_FileDeleteFailed= $40; // Îļþɾ³ýʧ°Ü(Ö¸Áîºó¸úËæɾ³ýµÄÎļþÃû)
CSocket_DirectoryCreateOk = $25; // Ŀ¼´´½¨³É¹¦(Ö¸Áîºó¸úËæ´´½¨µÄĿ¼Ãû)
CSocket_DirectoryCreateFailed = $3F; // Ŀ¼´´½¨Ê§°Ü(Ö¸Áîºó¸úËæ´´½¨µÄĿ¼Ãû)
CSocket_FileRenameOK = $2B; // Îļþ¸ÄÃû³É¹¦(Ö¸Áîºó¸úÔʼÎļþÃû)
CSocket_FileRenameFailed = $49; // Îļþ¸ÄÃûʧ°Ü(Ö¸Áîºó¸úÔʼÎļþÃû)
CSocket_SendFileDownStart = $21; // ·¢ËÍÏÂÔØÎļþ¿ªÊ¼Ö¸Áî(ºóÃæ¸úËæµÄÊÇÎļþ³¤¶È)
CSocket_SendFileDowning = $22; // ÎļþÏÂÔØing…(ÿ´Î¶ÁÈ¡4091×Ö½Ú)
CSocket_SendReadFileError = $3C; // ·¢ËͶÁÈ¡Îļþʧ°ÜÖ¸Áî
CSocket_SendUpLoadFailed = $3D; // ·¢ËÍдÈëÎļþʧ°ÜÖ¸Áî
CSocket_SendUpLoadStart = $46; // ·¢ËÍÉÏ´«¿ªÊ¼Ö¸Áî
CSocket_SendUpLoadTheEnd = $23; // ·¢ËÍÉÏ´«½áÊøÖ¸Áî
[/php]
Download : http://ul.to/3x73z15l