fork download
  1. <?php
  2.  
  3. $output = <<<OUTPUT
  4. CLASS: Win32_Process
  5. CreationDate|ExecutablePath|Handle|Name|Priority|ProcessId|WorkingSetSize \r
  6. 20160824162429.944953-180|(null)|4|System|8|4|2285568 \r
  7. 20160824162429.954968-180|(null)|416|smss.exe|11|416|716800 \r
  8. 20160824162431.296897-180|C:\Windows\system32\csrss.exe|484|csrss.exe|13|484|5029888 \r
  9. 20160824162431.717502-180|C:\Windows\system32\csrss.exe|528|csrss.exe|13|528|6160384 \r
  10. 20160824162431.847689-180|C:\Windows\system32\wininit.exe|536|wininit.exe|13|536|4005888 \r
  11. 20160824162431.877732-180|C:\Windows\system32\winlogon.exe|564|winlogon.exe|13|564|4403200 \r
  12. 20160824162432.168150-180|C:\Windows\system32\services.exe|616|services.exe|9|616|6356992 \r
  13. 20160824162432.328380-180|C:\Windows\system32\lsass.exe|628|lsass.exe|9|628|8413184 \r
  14. 20160824162432.338395-180|C:\Windows\system32\lsm.exe|636|lsm.exe|8|636|3878912 \r
  15. 20160824162433.119518-180|C:\Windows\system32\svchost.exe|800|svchost.exe|8|800|5939200 \r
  16. 20160824162433.219662-180|C:\Windows\system32\VBoxService.exe|848|VBoxService.exe|8|848|5877760 \r
  17. 20160824162433.483040-180|C:\Windows\system32\svchost.exe|900|svchost.exe|8|900|6172672 \r
  18. 20160824162433.582182-180|C:\Windows\System32\svchost.exe|936|svchost.exe|8|936|7872512 \r
  19. 20160824162434.033830-180|C:\Windows\system32\svchost.exe|1020|svchost.exe|8|1020|5718016 \r
  20. 20160824162434.199067-180|C:\Windows\system32\svchost.exe|1060|svchost.exe|8|1060|31662080 \r
  21. 20160824162434.254146-180|C:\Windows\system32\SLsvc.exe|1092|SLsvc.exe|8|1092|13414400 \r
  22. 20160824162434.386336-180|C:\Windows\system32\svchost.exe|1116|svchost.exe|8|1116|11026432 \r
  23. 20160824162434.496494-180|C:\Windows\System32\svchost.exe|1196|svchost.exe|8|1196|8716288 \r
  24. 20160824162434.551573-180|C:\Windows\system32\svchost.exe|1220|svchost.exe|8|1220|14458880 \r
  25. 20160824162434.837984-180|C:\Windows\system32\svchost.exe|1348|svchost.exe|8|1348|9605120 \r
  26. 20160824162441.788953-180|C:\Windows\System32\spoolsv.exe|1484|spoolsv.exe|8|1484|8818688 \r
  27. 20160824162441.943175-180|C:\Windows\system32\svchost.exe|1548|svchost.exe|8|1548|5152768 \r
  28. 20160824162441.998254-180|C:\Windows\system32\svchost.exe|1580|svchost.exe|8|1580|2920448 \r
  29. 20160824162442.064348-180|C:\Windows\System32\svchost.exe|1616|svchost.exe|8|1616|2306048 \r
  30. 20160824162445.706577-180|C:\Windows\system32\taskeng.exe|1992|taskeng.exe|6|1992|5599232 \r
  31. 20160824162450.843965-180|C:\Windows\system32\taskeng.exe|428|taskeng.exe|8|428|7766016 \r
  32. 20160824162456.632288-180|C:\Windows\system32\Dwm.exe|1832|dwm.exe|8|1832|3710976 \r
  33. 20160824162456.932720-180|C:\Windows\Explorer.EXE|688|explorer.exe|8|688|21454848 \r
  34. 20160824162457.713843-180|C:\Windows\System32\VBoxTray.exe|1032|VBoxTray.exe|8|1032|5095424 \r
  35. 20160824162501.909877-180|C:\Windows\system32\conime.exe|1588|conime.exe|8|1588|3432448 \r
  36. 20160824162646.109709-180|C:\Windows\System32\msdtc.exe|1836|msdtc.exe|8|1836|6926336 \r
  37. 20160824162732.316150-180|C:\Windows\system32\wbem\wmiprvse.exe|2008|WmiPrvSE.exe|8|2008|13152256 \r
  38. 20160824162747.558067-180|C:\Windows\system32\wuauclt.exe|1232|wuauclt.exe|8|1232|4935680 \r
  39. 20160825115345.986686-180|C:\Users\Administrador\Desktop\wmiexplorer.exe|2080|wmiexplorer.exe|8|2080|8876032 \r
  40. 20160826130558.767043-180|C:\Windows\system32\SLUI.exe|2928|SLUI.exe|8|2928|6709248 \r
  41. 20160826130639.427821-180|C:\Windows\system32\taskeng.exe|3432|taskeng.exe|6|3432|4108288 \r
  42. OUTPUT;
  43.  
  44. $output = str_replace("CLASS: Win32_Process","", $output);
  45. $output = (explode("\r\n", $output));
  46.  
  47. $keys = explode("|", $output[0]);
  48.  
  49.  
  50. for($i = 1; $i <= count($output)-1; $i++){
  51. $values[$i] = explode("|", $output[$i]);
  52. $final[] = array_combine($keys, $values[$i]);
  53. }
  54.  
  55.  
  56. print_r($final);
  57.  
  58.  
Success #stdin #stdout 0.01s 52488KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Array
        (
            [
CreationDate] => 20160824162429.944953-180
            [ExecutablePath] => (null)
            [Handle] => 4
            [Name] => System
            [Priority] => 8
            [ProcessId] => 4
            [WorkingSetSize ] => 2285568 
        )

    [1] => Array
        (
            [
CreationDate] => 20160824162429.954968-180
            [ExecutablePath] => (null)
            [Handle] => 416
            [Name] => smss.exe
            [Priority] => 11
            [ProcessId] => 416
            [WorkingSetSize ] => 716800 
        )

    [2] => Array
        (
            [
CreationDate] => 20160824162431.296897-180
            [ExecutablePath] => C:\Windows\system32\csrss.exe
            [Handle] => 484
            [Name] => csrss.exe
            [Priority] => 13
            [ProcessId] => 484
            [WorkingSetSize ] => 5029888 
        )

    [3] => Array
        (
            [
CreationDate] => 20160824162431.717502-180
            [ExecutablePath] => C:\Windows\system32\csrss.exe
            [Handle] => 528
            [Name] => csrss.exe
            [Priority] => 13
            [ProcessId] => 528
            [WorkingSetSize ] => 6160384 
        )

    [4] => Array
        (
            [
CreationDate] => 20160824162431.847689-180
            [ExecutablePath] => C:\Windows\system32\wininit.exe
            [Handle] => 536
            [Name] => wininit.exe
            [Priority] => 13
            [ProcessId] => 536
            [WorkingSetSize ] => 4005888 
        )

    [5] => Array
        (
            [
CreationDate] => 20160824162431.877732-180
            [ExecutablePath] => C:\Windows\system32\winlogon.exe
            [Handle] => 564
            [Name] => winlogon.exe
            [Priority] => 13
            [ProcessId] => 564
            [WorkingSetSize ] => 4403200 
        )

    [6] => Array
        (
            [
CreationDate] => 20160824162432.168150-180
            [ExecutablePath] => C:\Windows\system32\services.exe
            [Handle] => 616
            [Name] => services.exe
            [Priority] => 9
            [ProcessId] => 616
            [WorkingSetSize ] => 6356992 
        )

    [7] => Array
        (
            [
CreationDate] => 20160824162432.328380-180
            [ExecutablePath] => C:\Windows\system32\lsass.exe
            [Handle] => 628
            [Name] => lsass.exe
            [Priority] => 9
            [ProcessId] => 628
            [WorkingSetSize ] => 8413184 
        )

    [8] => Array
        (
            [
CreationDate] => 20160824162432.338395-180
            [ExecutablePath] => C:\Windows\system32\lsm.exe
            [Handle] => 636
            [Name] => lsm.exe
            [Priority] => 8
            [ProcessId] => 636
            [WorkingSetSize ] => 3878912 
        )

    [9] => Array
        (
            [
CreationDate] => 20160824162433.119518-180
            [ExecutablePath] => C:\Windows\system32\svchost.exe
            [Handle] => 800
            [Name] => svchost.exe
            [Priority] => 8
            [ProcessId] => 800
            [WorkingSetSize ] => 5939200 
        )

    [10] => Array
        (
            [
CreationDate] => 20160824162433.219662-180
            [ExecutablePath] => C:\Windows\system32\VBoxService.exe
            [Handle] => 848
            [Name] => VBoxService.exe
            [Priority] => 8
            [ProcessId] => 848
            [WorkingSetSize ] => 5877760 
        )

    [11] => Array
        (
            [
CreationDate] => 20160824162433.483040-180
            [ExecutablePath] => C:\Windows\system32\svchost.exe
            [Handle] => 900
            [Name] => svchost.exe
            [Priority] => 8
            [ProcessId] => 900
            [WorkingSetSize ] => 6172672 
        )

    [12] => Array
        (
            [
CreationDate] => 20160824162433.582182-180
            [ExecutablePath] => C:\Windows\System32\svchost.exe
            [Handle] => 936
            [Name] => svchost.exe
            [Priority] => 8
            [ProcessId] => 936
            [WorkingSetSize ] => 7872512 
        )

    [13] => Array
        (
            [
CreationDate] => 20160824162434.033830-180
            [ExecutablePath] => C:\Windows\system32\svchost.exe
            [Handle] => 1020
            [Name] => svchost.exe
            [Priority] => 8
            [ProcessId] => 1020
            [WorkingSetSize ] => 5718016 
        )

    [14] => Array
        (
            [
CreationDate] => 20160824162434.199067-180
            [ExecutablePath] => C:\Windows\system32\svchost.exe
            [Handle] => 1060
            [Name] => svchost.exe
            [Priority] => 8
            [ProcessId] => 1060
            [WorkingSetSize ] => 31662080 
        )

    [15] => Array
        (
            [
CreationDate] => 20160824162434.254146-180
            [ExecutablePath] => C:\Windows\system32\SLsvc.exe
            [Handle] => 1092
            [Name] => SLsvc.exe
            [Priority] => 8
            [ProcessId] => 1092
            [WorkingSetSize ] => 13414400 
        )

    [16] => Array
        (
            [
CreationDate] => 20160824162434.386336-180
            [ExecutablePath] => C:\Windows\system32\svchost.exe
            [Handle] => 1116
            [Name] => svchost.exe
            [Priority] => 8
            [ProcessId] => 1116
            [WorkingSetSize ] => 11026432 
        )

    [17] => Array
        (
            [
CreationDate] => 20160824162434.496494-180
            [ExecutablePath] => C:\Windows\System32\svchost.exe
            [Handle] => 1196
            [Name] => svchost.exe
            [Priority] => 8
            [ProcessId] => 1196
            [WorkingSetSize ] => 8716288 
        )

    [18] => Array
        (
            [
CreationDate] => 20160824162434.551573-180
            [ExecutablePath] => C:\Windows\system32\svchost.exe
            [Handle] => 1220
            [Name] => svchost.exe
            [Priority] => 8
            [ProcessId] => 1220
            [WorkingSetSize ] => 14458880 
        )

    [19] => Array
        (
            [
CreationDate] => 20160824162434.837984-180
            [ExecutablePath] => C:\Windows\system32\svchost.exe
            [Handle] => 1348
            [Name] => svchost.exe
            [Priority] => 8
            [ProcessId] => 1348
            [WorkingSetSize ] => 9605120 
        )

    [20] => Array
        (
            [
CreationDate] => 20160824162441.788953-180
            [ExecutablePath] => C:\Windows\System32\spoolsv.exe
            [Handle] => 1484
            [Name] => spoolsv.exe
            [Priority] => 8
            [ProcessId] => 1484
            [WorkingSetSize ] => 8818688 
        )

    [21] => Array
        (
            [
CreationDate] => 20160824162441.943175-180
            [ExecutablePath] => C:\Windows\system32\svchost.exe
            [Handle] => 1548
            [Name] => svchost.exe
            [Priority] => 8
            [ProcessId] => 1548
            [WorkingSetSize ] => 5152768 
        )

    [22] => Array
        (
            [
CreationDate] => 20160824162441.998254-180
            [ExecutablePath] => C:\Windows\system32\svchost.exe
            [Handle] => 1580
            [Name] => svchost.exe
            [Priority] => 8
            [ProcessId] => 1580
            [WorkingSetSize ] => 2920448 
        )

    [23] => Array
        (
            [
CreationDate] => 20160824162442.064348-180
            [ExecutablePath] => C:\Windows\System32\svchost.exe
            [Handle] => 1616
            [Name] => svchost.exe
            [Priority] => 8
            [ProcessId] => 1616
            [WorkingSetSize ] => 2306048 
        )

    [24] => Array
        (
            [
CreationDate] => 20160824162445.706577-180
            [ExecutablePath] => C:\Windows\system32	askeng.exe
            [Handle] => 1992
            [Name] => taskeng.exe
            [Priority] => 6
            [ProcessId] => 1992
            [WorkingSetSize ] => 5599232 
        )

    [25] => Array
        (
            [
CreationDate] => 20160824162450.843965-180
            [ExecutablePath] => C:\Windows\system32	askeng.exe
            [Handle] => 428
            [Name] => taskeng.exe
            [Priority] => 8
            [ProcessId] => 428
            [WorkingSetSize ] => 7766016 
        )

    [26] => Array
        (
            [
CreationDate] => 20160824162456.632288-180
            [ExecutablePath] => C:\Windows\system32\Dwm.exe
            [Handle] => 1832
            [Name] => dwm.exe
            [Priority] => 8
            [ProcessId] => 1832
            [WorkingSetSize ] => 3710976 
        )

    [27] => Array
        (
            [
CreationDate] => 20160824162456.932720-180
            [ExecutablePath] => C:\Windows\Explorer.EXE
            [Handle] => 688
            [Name] => explorer.exe
            [Priority] => 8
            [ProcessId] => 688
            [WorkingSetSize ] => 21454848 
        )

    [28] => Array
        (
            [
CreationDate] => 20160824162457.713843-180
            [ExecutablePath] => C:\Windows\System32\VBoxTray.exe
            [Handle] => 1032
            [Name] => VBoxTray.exe
            [Priority] => 8
            [ProcessId] => 1032
            [WorkingSetSize ] => 5095424 
        )

    [29] => Array
        (
            [
CreationDate] => 20160824162501.909877-180
            [ExecutablePath] => C:\Windows\system32\conime.exe
            [Handle] => 1588
            [Name] => conime.exe
            [Priority] => 8
            [ProcessId] => 1588
            [WorkingSetSize ] => 3432448 
        )

    [30] => Array
        (
            [
CreationDate] => 20160824162646.109709-180
            [ExecutablePath] => C:\Windows\System32\msdtc.exe
            [Handle] => 1836
            [Name] => msdtc.exe
            [Priority] => 8
            [ProcessId] => 1836
            [WorkingSetSize ] => 6926336 
        )

    [31] => Array
        (
            [
CreationDate] => 20160824162732.316150-180
            [ExecutablePath] => C:\Windows\system32\wbem\wmiprvse.exe
            [Handle] => 2008
            [Name] => WmiPrvSE.exe
            [Priority] => 8
            [ProcessId] => 2008
            [WorkingSetSize ] => 13152256 
        )

    [32] => Array
        (
            [
CreationDate] => 20160824162747.558067-180
            [ExecutablePath] => C:\Windows\system32\wuauclt.exe
            [Handle] => 1232
            [Name] => wuauclt.exe
            [Priority] => 8
            [ProcessId] => 1232
            [WorkingSetSize ] => 4935680 
        )

    [33] => Array
        (
            [
CreationDate] => 20160825115345.986686-180
            [ExecutablePath] => C:\Users\Administrador\Desktop\wmiexplorer.exe
            [Handle] => 2080
            [Name] => wmiexplorer.exe
            [Priority] => 8
            [ProcessId] => 2080
            [WorkingSetSize ] => 8876032 
        )

    [34] => Array
        (
            [
CreationDate] => 20160826130558.767043-180
            [ExecutablePath] => C:\Windows\system32\SLUI.exe
            [Handle] => 2928
            [Name] => SLUI.exe
            [Priority] => 8
            [ProcessId] => 2928
            [WorkingSetSize ] => 6709248 
        )

    [35] => Array
        (
            [
CreationDate] => 20160826130639.427821-180
            [ExecutablePath] => C:\Windows\system32	askeng.exe
            [Handle] => 3432
            [Name] => taskeng.exe
            [Priority] => 6
            [ProcessId] => 3432
            [WorkingSetSize ] => 4108288 
        )

)