Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.2 KiB

  1. <HTML>
  2. <HEAD>
  3. <TITLE>ATL 3.0 test page for object WMIObjectBroker</TITLE>
  4. </HEAD>
  5. <BODY>
  6. hello there<br>
  7. one<br>
  8. <SCRIPT LANGUAGE="VBScript">
  9. sub window_onload
  10. dim obj
  11. ' set obj = CreateObject("WMIScriptUtils.WMIObjectBroker")
  12. end sub
  13. </SCRIPT>
  14. <SCRIPT LANGUAGE="JSCRIPT">
  15. function hack2()
  16. {
  17. //<OBJECT ID="broker" CLASSID="CLSID:4BA59771-8FBF-4E67-9917-3BBB39B743AB"></OBJECT>
  18. alert (window.document.designMode);
  19. // window.document.designMode = "On";
  20. alert (window.document.designMode);
  21. alert(window.location.pathname);
  22. alert(window.location.protocol);
  23. alert (window.parent.document.URL);
  24. alert (window.parent.parent.document.URL);
  25. alert (window.parent.parent.parent.document.URL);
  26. alert (window.parent.parent.parent.parent.document.URL);
  27. }
  28. function window.onload()
  29. {
  30. var broker = new ActiveXObject("WMIScriptUtils.WMIObjectBroker");
  31. var obj = broker.CreateObject("WbemScripting.SWbemLocator");
  32. var service = obj.ConnectServer();
  33. var procs = service.InstancesOf("Win32_Process");
  34. var f = new Enumerator(procs);
  35. sz = "";
  36. for (;!f.atEnd();f.moveNext())
  37. {
  38. var proc = f.item();
  39. sz += proc["Name"] + "\r\n";
  40. }
  41. alert(sz);
  42. }
  43. </SCRIPT>
  44. </BODY>
  45. </HTML>