Any way to execute inline javascript as a url?

In many browsers, you can do something like this:

javascript: alert("...");

Is there a way to combine this with a url? I am thinking of something like this:

http://example.com?javascript: alert("...");

The effect will be that javascript will be executed after the page loads (the same effect as loading the URL and then entering the javascript operator above)

Edit: I cannot use window.onload or something like that because I do not necessarily own the page.

+3
source share
4 answers

, . , , Javascript , XSS ( " " ).

, Javascript, , .

: Javascript . , , . . , ?

:

  • ;
  • cookie ( JS);
  • -, cookie .

.

+9

window.onload = function() {
    alert("...");
};

?

0

:

, - . ( FRAME IFRAME) script .

0

... URL-.

Check out the links provided at http://supergenpass.com/

0
source

Source: https://habr.com/ru/post/1730501/


All Articles