So, you have to bypass the DOM and launch an external program.
Your DOM bypass can be done in many ways. However, here just take
var inputs = document.getElementsByTagName("input");
for (var idx=0; idx<inputs.length; idx++){
var tp = inputs[idx].attributes['type'].value
console.log(tp);
if (tp == 'hidden'){
}
}
Launching an external application according to this post
var file = Components.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsILocalFile);
file.initWithPath("c:\\myapp.exe");
file.launch();
source
share