The purpose is to send the username without password and from the failed login via script to perform self-registration.
If I only enter the username and click on submit from the login page, the login fails. while from the registration page no.
I attach the registration page.
Code: Select all
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="-1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Internet hotspot - Log in</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<!-- two other colors
<body class="lite">
<body class="dark">
-->
$(if chap-id)
<form name="sendin" action="$(link-login-only)" method="post" style="display:none">
<input type="hidden" name="username" />
<input type="hidden" name="password" />
<input type="hidden" name="number" />
<input type="hidden" name="dst" value="http://green.hotspot/policy.html" />
<input type="hidden" name="popup" value="true" />
</form>
<script src="/md5.js"></script>
<script>
function doLogin() {
document.sendin.username.value = document.login.username.value;
document.sendin.password.value = hexMD5('$(chap-id)' + document.login.password.value + '$(chap-challenge)');
document.sendin.submit();
return false;
}
</script>
$(endif)
<div class="ie-fixMinHeight">
<div class="main">
<div class="wrap animated fadeIn">
<form name="login" action="$(link-login-only)" method="post" $(if chap-id) onSubmit="return doLogin()" $(endif)>
<input type="hidden" name="dst" value="$(link-orig)" />
<input type="hidden" name="popup" value="true" />
<div style="margin:0px">
<img src="img/green-logo.png" alt="" width="280px" >
<p class="info $(if error)alert$(endif)">
$(if error == "")Inserisci il tuo indirizzo mail per eseguire la Registrazione. Riceverai una email con le credenziali di accesso. $(if trial == 'yes')<br />Free trial available, <a href="$(link-login-only)?dst=$(link-orig-esc)&username=T-$(mac-esc)">click here</a>.$(endif)
$(endif)
$(if error)$(error)$(endif)
</p>
<label>
<img class="ico" src="img/email.svg" alt="#" />
<input name="Email" type="email" value="$(username)" placeholder="Email" />
</label>
<input type="checkbox" value="checkbox" name="checkbox" checked="checked" id="checkbox">
<label for="checkbox"> Accetto le condizioni generali</label>
<a href="http://green.hotspot/policy.html" style="color:rgb(57, 186, 143); text-align:center" target="_blank" rel="noopener noreferrer">Condizioni Generali</a>
<br>
<br>
</p>
<input type="submit" value="Registrati" />
<br>
<br>
</p>
<p class="info bt1">Torna alla pagina del <a href="http://green.hotspot/login.html" style="color:rgb(57, 186, 143); text-align:center" target="_blank" rel="noopener noreferrer">Login</a>
<br>
<form action="">
</form>
<br>
<br>
<br>
<br>
</p>
<a href="https://foisfabio.it/" style="color:rgb(57, 186, 143); text-align:center" target="_blank" rel="noopener noreferrer">Powered by foisfabio.it</a>
</p>
</div>
</div>
</div>
</body>
</html>