Hallo liebe Leute ^^
aaalso hab mir mal kurz folgendes kleinen Script gemacht.
Es ist eigentlich so simpel wie möglich , jedoch traue ich jedes Mal meinen Augen nicht wenn ich die Ausgabe sehe...
das Script lautet :
Sprich ... Tasklist, und jedes wort / Zahl wert in nen array wert schreiben und dann Zeilenweise ausgeben.
( Später sollen mal nur noch bestimmte Prozesse ausgegeben werden, aber das ja erstmal egal... )
Die Ausgabe jedoch verblüfft mich und ich weis nicht mehr weiter....
Was mache ich falsch? Wo liegt das Problem?
...hääää?
aaalso hab mir mal kurz folgendes kleinen Script gemacht.
Es ist eigentlich so simpel wie möglich , jedoch traue ich jedes Mal meinen Augen nicht wenn ich die Ausgabe sehe...
das Script lautet :
PHP:
<?php
$sText = shell_exec('tasklist /FI "STATUS ne running" /FI "USERNAME ne Benni"');
$aTasks = explode(" ",$sText);
for($i=0;$i<count($aTasks);$i++) {
if($aTasks[$i] == "" || empty($aTasks[$i])) {
unset($aTasks[$i]);
}
}
foreach ($aTasks as $sTask => $sValue) {
echo $sValue ." <br /> \n";
}
?>
Sprich ... Tasklist, und jedes wort / Zahl wert in nen array wert schreiben und dann Zeilenweise ausgeben.
( Später sollen mal nur noch bestimmte Prozesse ausgegeben werden, aber das ja erstmal egal... )
Die Ausgabe jedoch verblüfft mich und ich weis nicht mehr weiter....
Code:
Abbildname <br />
PID <br />
Sitzungsname <br />
Sitz.-Nr. <br />
Speichernutzung
========================= <br />
===== <br />
================ <br />
========== <br />
===============
System <br />
Idle <br />
Process <br />
Console <br />
28 <br />
K
System <br />
4 <br />
Console <br />
236 <br />
K
smss.exe <br />
472 <br />
Console <br />
412 <br />
K
csrss.exe <br />
804 <br />
Console <br />
7.544 <br />
K
winlogon.exe <br />
860 <br />
Console <br />
4.476 <br />
K
services.exe <br />
904 <br />
Console <br />
3.808 <br />
K
lsass.exe <br />
916 <br />
Console <br />
8.644 <br />
K
ati2evxx.exe <br />
1076 <br />
Console <br />
3.504 <br />
K
svchost.exe <br />
1088 <br />
Console <br />
7.452 <br />
K
svchost.exe <br />
1168 <br />
Console <br />
6.804 <br />
K
svchost.exe <br />
1256 <br />
Console <br />
32.908 <br />
K
svchost.exe <br />
1292 <br />
Console <br />
5.688 <br />
K
Smc.exe <br />
1332 <br />
Console <br />
11.228 <br />
K
ati2evxx.exe <br />
1400 <br />
Console <br />
4.384 <br />
K
svchost.exe <br />
1516 <br />
Console <br />
6.168 <br />
K
svchost.exe <br />
1600 <br />
Console <br />
11.352 <br />
K
spoolsv.exe <br /> ---> Bis hier lief alles ganz okay... o.O
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
1708 <br />
Console <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
0 <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
7.840 <br />
K
apache.exe <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
316 <br />
Console <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
0 <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
22.976 <br />
K
AVKProxy.exe <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
340 <br />
Console <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
0 <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
16.044 <br />
K
AVKService.exe <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
396 <br />
Console <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
0 <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
6.492 <br />
K
AVKWCtl.exe <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
416 <br />
Console <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
0 <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
87.216 <br />
K
StarWindServiceAE.exe <br />
<br />
<br />
<br />
<br />
<br />
<br />
604 <br />
Console <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
0 <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
3.856 <br />
K
svchost.exe <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
640 <br />
Console <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
0 <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
7.400 <br />
K
winvnc.exe <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
696 <br />
Console <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
0 <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
6.164 <br />
K
apache.exe <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
1372 <br />
Console <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
0 <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
26.404 <br />
K
alg.exe <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
3288 <br />
Console <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
0 <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
5.848 <br />
K
wmiprvse.exe <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
3352 <br />
Console <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
0 <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
7.436 <br />
K
svchost.exe <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
588 <br />
Console <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
0 <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
5.696 <br />
K
FileZillaServer.exe <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
2860 <br />
Console <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
0 <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
3.424 <br />
K
cmd.exe <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
7856 <br />
Console <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
0 <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
4.828 <br />
K
tasklist.exe <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
3116 <br />
Console <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
0 <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
6.540 <br />
K
wmiprvse.exe <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
4236 <br />
Console <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
0 <br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
8.032 <br />
K
<br />
Was mache ich falsch? Wo liegt das Problem?
...hääää?