Hello!
I need the victim to open a specific website and then open the JS code that will be stored in a bookmark. The other, better option that im not sure if possible is the JS button that will open a URL, but within that url area will be javascript. When i run the code below it cuts of the "javascript:" part and leaves only "alert('Hello Cocksucker!')". I know there is many people who work with XSS. Does someone here knows how to make this JS run?
<button onclick="openSite()">Open Site</button>
<script>
function openSite() {
window.open("javascript:alert('Hello Cocksucker!');", "_blank");
}
</script>
I need the victim to open a specific website and then open the JS code that will be stored in a bookmark. The other, better option that im not sure if possible is the JS button that will open a URL, but within that url area will be javascript. When i run the code below it cuts of the "javascript:" part and leaves only "alert('Hello Cocksucker!')". I know there is many people who work with XSS. Does someone here knows how to make this JS run?
<button onclick="openSite()">Open Site</button>
<script>
function openSite() {
window.open("javascript:alert('Hello Cocksucker!');", "_blank");
}
</script>