-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from hduisa/edwardl
added mmd
- Loading branch information
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
$connection = new Mongo("mongodb://admin:[email protected]:10000"); | ||
|
||
$db = $connection -> HCTF; | ||
$collection = $db -> login; | ||
|
||
$name = $_POST["name"]; | ||
$password = $_POST["password"]; | ||
$function = "function(){if(this.name == '$name' && this.password == '$password') return true}"; | ||
$result = $collection->find(array('$where'=>$function)); | ||
$check = $result->count(); | ||
echo "<br/>"; | ||
if ($check>0){ | ||
echo "开心吗~233333"; | ||
} | ||
else{ | ||
echo "nonono"; | ||
} | ||
?> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
</head> | ||
<form action="check.php" method = "POST"> | ||
<div> | ||
用户名:<input type = "text" name = "name"> | ||
</div> | ||
<div> | ||
密码:<input type = "password" name = "password"> | ||
</div> | ||
<button type = "submit" >登录</button> | ||
</form> | ||
</html> |