docker-vulnerable-dvwa/dvwa/vulnerabilities/csp/source/impossible.js

20 lines
421 B
JavaScript
Raw Normal View History

2018-10-12 15:49:58 +00:00
function clickButton() {
var s = document.createElement("script");
s.src = "source/jsonp_impossible.php";
document.body.appendChild(s);
}
function solveSum(obj) {
if ("answer" in obj) {
document.getElementById("answer").innerHTML = obj['answer'];
}
}
var solve_button = document.getElementById ("solve");
if (solve_button) {
solve_button.addEventListener("click", function() {
clickButton();
});
}