Add exams from exam58 to exam98
This commit is contained in:
27
exam96/encryption.php
Normal file
27
exam96/encryption.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
if (isset($_POST['password']) && !empty($_POST['password'])) {
|
||||
$pass = md5($_POST['password']);
|
||||
|
||||
$filename = 'hash.txt';
|
||||
$handle = fopen($filename,'r');
|
||||
$file_pass = fread($handle,filesize($filename));
|
||||
|
||||
if($pass == $file_pass){
|
||||
echo 'Password ok!';
|
||||
}else{
|
||||
echo 'Incorrect passwrod';
|
||||
}
|
||||
|
||||
|
||||
} else{
|
||||
echo 'Please enter the password!';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<form action="encryption.php" method="POST">
|
||||
Password:<input type="text" name="password"><br><br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
1
exam96/hash.txt
Normal file
1
exam96/hash.txt
Normal file
@@ -0,0 +1 @@
|
||||
5f4dcc3b5aa765d61d8327deb882cf99
|
||||
Reference in New Issue
Block a user