 |
clubdogirc.MyForum.ro Forumul oficial al canalului CluBDog de pe serveru RomaniaIRC | by GMA
|
| Subiectul anterior :: Subiectul urmator |
| Autor |
Mesaj |
gma Fondator


Data inscrierii: 26/Noi/2007 Mesaje: 25 Localitate: Focsani
|
Trimis: 27/11/2007 22:24 Titlul subiectului: Asemanator cu Windows task manager |
|
|
asemanator cu Windows task manager:
<html>
<head>
<hta:application
applicationname="Task Manager"
scroll="yes"
singleinstance="yes"
windowstate="normal"
>
<title>Task Manager</title>
<style>
body, td, input{font: icon}
</style>
<script language="JavaScript">
function TaskManager()
{
var container = document.getElementById("container");
var service = GetObject("winmgmts:\\.\root\cimv2");
var e = new Enumerator(service.ExecQuery("Select Name, ProcessId, ParentProcessId, Priority, ThreadCount, ExecutablePath, WorkingSetSize from Win32_Process", "WQL", 48));
var output = "<table width='100%' border='1' cellspacing='0' cellpadding'5'>" +
"<tr>" +
"<td><b>Name</b></td>" +
"<td><b>Id</b></td>" +
"<td><b>Parent</b></td>" +
"<td><b>Priority</b></td>" +
"<td><b>Threads</b></td>" +
"<td width='100%'><b>Path</b></td>" +
"<td><b>Memory</b></td>" +
"<td> </td>" +
"</tr>";
for (; !e.atEnd(); e.moveNext())
{
var process = e.item();
output += "<tr>" +
"<td nowrap>" + process.Name + "</td>" +
"<td align='right' nowrap>" + process.ProcessId + "</td>" +
"<td align='right' nowrap>" + process.ParentProcessId + "</td>" +
"<td align='right' nowrap>" + process.Priority + "</td>" +
"<td align='right' nowrap>" + process.ThreadCount + "</td>" +
"<td width='100%' nowrap>" + process.ExecutablePath + "</td>" +
"<td align='right' nowrap>" + (parseInt(process.WorkingSetSize) / 1024) + " KB</td>" +
"<td><input type='button' value=' Kill ' style='width:100%' onclick='Kill(" + process.ProcessId + ")'></td>" +
"</tr>";
}
output += "</table>";
container.innerHTML = output;
}
function Run()
{
var executablePath = document.getElementById("ExecutablePath").value;
var service = GetObject("winmgmts:{impersonationLevel=impersonate}\\.\root\cimv2:Win32_Process");
switch(service.Create(executablePath, null, null, 0))
{
case 0:
alert("Successful completion");
break;
case 2:
alert("Access denied");
break;
case 3:
alert("Insufficient privilege");
break;
case 8:
alert("Unknown failure");
break;
case 9:
alert("Path not found");
break;
case 21:
alert("Invalid parameter");
break;
}
}
function Kill(processId)
{
if(confirm("Are you sure you want to kill process?"))
{
var service = GetObject("winmgmts:\\.\root\cimv2");
var e = new Enumerator(service.ExecQuery("Select ProcessId from Win32_Process where ProcessId = " + processId, "WQL", 48));
for(; !e.atEnd(); e.moveNext())
{
var process = e.item();
if(process.ProcessId == processId)
switch(process.Terminate(process.ProcessId))
{
case 0:
alert("Successful completion");
break;
case 2:
alert("Access denied");
break;
case 3:
alert("Insufficient privilege");
break;
case 8:
alert("Unknown failure");
break;
case 9:
alert("Path not found");
break;
case 21:
alert("Invalid parameter");
break;
}
}
}
}
</script>
</head>
<body bgcolor="buttonface" onload="setInterval('TaskManager()', 500)">
<h3>Task Manager by h3h3 u never gonna' know</h3>
<table width="100%">
<tr>
<td nowrap><b>New Process</b></td>
<td width='100%'><input id="ExecutablePath" type="file" style="width:100%"></td>
<td><input type="button" value=" Run " style="width:100%" onclick="Run()"></td>
</tr>
<tr>
<td colspan="3" width="100%"><div id="container"></div></td>
</tr>
</table>
</body>
</html> |
|
| Sus |
|
 |
|
|
Nu puteti crea un subiect nou in acest forum Nu puteti raspunde in subiectele acestui forum Nu puteti modifica mesajele proprii din acest forum Nu puteti sterge mesajele proprii din acest forum Nu puteti vota in chestionarele din acest forum
|
smartDark Style by Smartor
Powered by phpBB © 2001, 2002 phpBB Group
|