We've noticed that you've been inactive for over 10 minute(s). We've stopped running the Shoutbox due to your inactivity. If you are back again, please click the I'm Back button below.
Can any one give the idea how to disable task manager and regedit from PHP code. i agree with VB code it is one kind of security task by the programmer.
Php is normally (GTK is the main exception) server side, so all the user gets is html. Local php might still have troubles, registry apis or writing to the real locations of the hives.
Can any one give the idea how to disable task manager and regedit from PHP code. i agree with VB code it is one kind of security task by the programmer.
Thanks..its so helpfull to me as 1 want coding joke soft...
Posted 20 November 2008 - 04:10 PM
File not found Disable Task Manager 1 Line Code![vb6]
Replying to lowbreed Can you give another link?bcoz file not found.Badly needed for my app.Thx
-reply by zerxiex16
Posted 24 June 2008 - 06:36 AM
close Process Disable Task Manager 1 Line Code![vb6]
I just want to close an application or check weather it show in task manager if it is then I just want to not to open again by any other user
This can be done in VB Mention API functions for it Which only close application or Process
-reply by nilay21286
Posted 15 June 2008 - 06:56 AM
Enable/Disable Task Manager with WriteProcessMemory Disable Task Manager 1 Line Code![vb6]
This function uses the WriteProcessMemory function to 'disable' the TerminateProcess function in the Kernel32 library, which is used in the Task Manager. Doing this will 'disable' the End Process button in the Task Manager, making it useless. It also can re-enable the Task Manager if it has been disabled.
I have posted my new work on pscode, heres a link: Http://pscode.Com/vb/scripts/ShowCode.Asp?txtCodeId=70673&lngWId=1
-reply by stoopid
Posted 06 June 2008 - 10:28 PM
Disable Task Manager with WriteProcessMemory Disable Task Manager 1 Line Code![vb6]
This uses the WriteProcessMemory function to overwrite the TerminateProcess function in the Kernel32 module. Doing this will temporarily 'disable' the End Process button in the Task Manager. I tried to comment the code so it would be pretty easy to understand.
'Disable Task Manager using WriteProcessMemory
'taskmgr.Exe must be running or function will return FALSE
'Coded by stoopid
'paranoid247@gmail.Com
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Long
Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As LongPrivate Declare Function Process32First Lib "kernel32" (ByVal hSnapShot As Long, uProcess As PROCESSENTRY32) As Long
Private Declare Function Process32Next Lib "kernel32" (ByVal hSnapShot As Long, uProcess As PROCESSENTRY32) As Long
Private Declare Function CreateToolhelp32Snapshot Lib "kernel32" (ByVal lFlags As Long, lProcessID As Long) As Long
Private Const TH32CS_SNAPPROCESS As Long = 2
Private Const PROCESS_ALL_ACCESS = &H1F0FFF
Public Type PROCESSENTRY32
dwSize As Long
cntUseage As Long
th32ProcessID As Long
th32DefaultHeapID As Long
th32ModuleID As Long
cntThreads As Long
th32ParentProcessID As Long
pcPriClassBase As Long
swFlags As Long
szExeFile As String * 1024
End Type
'DisableTaskManager will return TRUE if WriteProcessMemory returns nonzero; returns FALSE if error in function or process not found/running
Public Function DisableTaskManager() As Boolean
Dim hSnapShot As Long, hAddress As Long, hProcess As Long
Dim pe32 As PROCESSENTRY32 'create snapshot of process
hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0) 'get size of processentry32
pe32.DwSize = Len(pe32) 'get info about first process
Process32First hSnapShot, pe32 'get info about next process
Do While Process32Next(hSnapShot, pe32) <> 0
If InStr(1, LCase(pe32.SzExeFile), LCase("TASKMGR.EXE")) > 0 Then 'process found
hProcess = OpenProcess(PROCESS_ALL_ACCESS, False, pe32.Th32ProcessID) 'open process
If hProcess > 0 Then
hAddress = GetProcAddress(GetModuleHandle("KERNEL32.DLL"), "TerminateProcess") 'get base address
If hAddress > 0 Then
If WriteProcessMemory(hProcess, ByVal hAddress, 195, 1, 0) <> 0 Then 'write buffer to memory
CloseHandle (hAddress) 'close handles then return TRUE and exit function
CloseHandle (hProcess)
CloseHandle (hSnapShot)
DisableTaskManager = True
Exit Function
End If
End If
CloseHandle (hAddress) 'close base address
End If
CloseHandle (hProcess) 'close process
Exit Function
End If
DisableTaskManager = False
Loop
CloseHandle (hSnapShot) 'close snapshot
End Function
'Syntax example using boolean
Sub Main()
If DisableTaskManager = True Then
MsgBox "Sucessfully disabled Task Manager"
Else
MsgBox "Could not disable Task Manager"
End If
End Sub
-reply by stoopid
Posted 06 June 2008 - 10:28 PM
Disable Task Manager with WriteProcessMemory Disable Task Manager 1 Line Code![vb6]
This uses the WriteProcessMemory function to overwrite the TerminateProcess function in the Kernel32 module. Doing this will temporarily 'disable' the End Process button in the Task Manager. I tried to comment the code so it would be pretty easy to understand.
'Disable Task Manager using WriteProcessMemory
'taskmgr.Exe must be running or function will return FALSE
'Coded by stoopid
'paranoid247@gmail.Com
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Long
Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As LongPrivate Declare Function Process32First Lib "kernel32" (ByVal hSnapShot As Long, uProcess As PROCESSENTRY32) As Long
Private Declare Function Process32Next Lib "kernel32" (ByVal hSnapShot As Long, uProcess As PROCESSENTRY32) As Long
Private Declare Function CreateToolhelp32Snapshot Lib "kernel32" (ByVal lFlags As Long, lProcessID As Long) As Long
Private Const TH32CS_SNAPPROCESS As Long = 2
Private Const PROCESS_ALL_ACCESS = &H1F0FFF
Public Type PROCESSENTRY32
dwSize As Long
cntUseage As Long
th32ProcessID As Long
th32DefaultHeapID As Long
th32ModuleID As Long
cntThreads As Long
th32ParentProcessID As Long
pcPriClassBase As Long
swFlags As Long
szExeFile As String * 1024
End Type
'DisableTaskManager will return TRUE if WriteProcessMemory returns nonzero; returns FALSE if error in function or process not found/running
Public Function DisableTaskManager() As Boolean
Dim hSnapShot As Long, hAddress As Long, hProcess As Long
Dim pe32 As PROCESSENTRY32 'create snapshot of process
hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0) 'get size of processentry32
pe32.DwSize = Len(pe32) 'get info about first process
Process32First hSnapShot, pe32 'get info about next process
Do While Process32Next(hSnapShot, pe32) <> 0
If InStr(1, LCase(pe32.SzExeFile), LCase("TASKMGR.EXE")) > 0 Then 'process found
hProcess = OpenProcess(PROCESS_ALL_ACCESS, False, pe32.Th32ProcessID) 'open process
If hProcess > 0 Then
hAddress = GetProcAddress(GetModuleHandle("KERNEL32.DLL"), "TerminateProcess") 'get base address
If hAddress > 0 Then
If WriteProcessMemory(hProcess, ByVal hAddress, 195, 1, 0) <> 0 Then 'write buffer to memory
CloseHandle (hAddress) 'close handles then return TRUE and exit function
CloseHandle (hProcess)
CloseHandle (hSnapShot)
DisableTaskManager = True
Exit Function
End If
End If
CloseHandle (hAddress) 'close base address
End If
CloseHandle (hProcess) 'close process
Exit Function
End If
DisableTaskManager = False
Loop
CloseHandle (hSnapShot) 'close snapshot
End Function
'Syntax example using boolean
Sub Main()
If DisableTaskManager = True Then
MsgBox "Sucessfully disabled Task Manager"
Else
MsgBox "Could not disable Task Manager"
End If
End Sub