parent
b23b428763
commit
f13632578d
@ -69,7 +69,6 @@ public class SecurePasswordsAssignment extends AssignmentEndpoint {
|
|||||||
output.append("</ul></br>");
|
output.append("</ul></br>");
|
||||||
}
|
}
|
||||||
output.append("<b>Score: </b>" + strength.getScore() + "/4 </br>");
|
output.append("<b>Score: </b>" + strength.getScore() + "/4 </br>");
|
||||||
output.append("<b>Estimated cracking time in seconds: </b>" + calculateTime((long) strength.getCrackTimeSeconds().getOnlineNoThrottling10perSecond()));
|
|
||||||
|
|
||||||
if (strength.getScore() >= 4)
|
if (strength.getScore() >= 4)
|
||||||
return success(this).feedback("securepassword-success").output(output.toString()).build();
|
return success(this).feedback("securepassword-success").output(output.toString()).build();
|
||||||
|
@ -22,16 +22,16 @@
|
|||||||
method="POST" name="form"
|
method="POST" name="form"
|
||||||
action="/WebGoat/SecurePasswords/assignment"
|
action="/WebGoat/SecurePasswords/assignment"
|
||||||
autocomplete="off">
|
autocomplete="off">
|
||||||
<table>
|
|
||||||
<tr>
|
<div class="input-group input-group">
|
||||||
<td><label>Password</label></td>
|
<input id="myInput" name="password" value="" type="password" class="form-control"
|
||||||
<td><input id="myInput" name="password" value="" type="password" placeholder="Enter a secure password"/></td>
|
placeholder="Enter a secure password..."
|
||||||
<td><input type="checkbox" onclick="javascript:myFunction()"/>Show password</td>
|
aria-describedby="password-label">
|
||||||
</tr>
|
<span class="input-group-addon"><input type="checkbox" onclick="javascript:myFunction()"/> Show password</span>
|
||||||
<tr>
|
</div>
|
||||||
<td><button type="SUBMIT">Submit</button></td>
|
<div class="input-group" style="margin-top: 10px">
|
||||||
</tr>
|
<button type="submit" class="btn btn-primary">Submit</button>
|
||||||
</table>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div class="attack-feedback"></div>
|
<div class="attack-feedback"></div>
|
||||||
<div class="attack-output"></div>
|
<div class="attack-output"></div>
|
||||||
@ -47,14 +47,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function myFunction() {
|
function myFunction() {
|
||||||
var x = document.getElementById("myInput");
|
var x = document.getElementById("myInput");
|
||||||
if (x.type === "password") {
|
if (x.type === "password") {
|
||||||
x.type = "text";
|
x.type = "text";
|
||||||
} else {
|
} else {
|
||||||
x.type = "password";
|
x.type = "password";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user