Last active
January 21, 2021 03:38
-
-
Save reinforchu/cf0ed710946f0af8ed4895ed68962aca to your computer and use it in GitHub Desktop.
file:///Users/reinforchu/Desktop/autoPost.html?login=taro&password=1234
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="cache-control" content="no-cache, no-store"> | |
<meta http-equiv="pragma" content="no-cache"> | |
<meta name="expires" content="0"> | |
<title>Auto Login Demo</title> | |
</head> | |
<body> | |
<h1>Login</h1> | |
<form action="http://localhost/login.php" name="auto" method="get"> | |
<input type="text" id="user" name="id" value=""> | |
<input type="password" id="pwd" name="pw" value=""> | |
</form> | |
<script> | |
var p = window.location.search.substring(1).split('&'); | |
for( var i = 0; i < p.length; i++ ) { | |
var e = p[i].split('='); | |
if (i === 0) user.value=decodeURIComponent(e[1]); else pwd.value=decodeURIComponent(e[1]); | |
} | |
document.auto.submit(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment