Skip to content

Commit

Permalink
Merge pull request #4 from hduisa/edwardl
Browse files Browse the repository at this point in the history
added mmd
  • Loading branch information
pnck committed Dec 9, 2015
2 parents 31f2e3c + 17e9941 commit 33e4076
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ http://120.26.93.115:12306/05e8309820953e7620a1ee47441243b6/ <br/>
分值:200 <br/>
开题金币:200 <br/>
奖励金币:200 <br/>
源码: <br/>
源码: https://github.com/hduisa/hctf2015-all-problems/tree/master/mmd <br/>

===================================================================

Expand Down
20 changes: 20 additions & 0 deletions mmd/check.php
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";
}
?>
14 changes: 14 additions & 0 deletions mmd/index.html
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>

0 comments on commit 33e4076

Please sign in to comment.