Advertisement
Guest User

Untitled

a guest
Sep 9th, 2017
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Icon 0.55 KB | None | 0 0
  1.  function nebula_ping(ip) {
  2.  
  3.     // Going a different route so it works with FF3.  Added toString for 3.5 compatibility.
  4.  
  5.     var ping = Components.classes["@mozilla.org/file/local;1"]
  6.                 .createInstance(Components.interfaces.nsILocalFile);
  7.                
  8.     ping.initWithPath("C:\\Users\\nholloway\\Desktop\\win.com");
  9.    
  10.     var process = Components.classes["@mozilla.org/process/util;1"]
  11.                 .createInstance(Components.interfaces.nsIProcess);
  12.    
  13.     process.init(ping);
  14.     ip = ip.toString();
  15.    
  16.     var args = ["ping.exe", "-t", ip];
  17.     process.run(false, args, args.length);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement