Initial commit
[2ch-be.git] / dev-test / old / c.php
blob0a2eb82ccaea95c1fe60f13bcd87f921933ec755
1 <html lang="en">
2 <head>
3 <meta charset="shift_jis">
4 <title>ƒpƒXƒ��[ƒh‚ð•Ï�X‚·‚é</title>
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <meta name="description" content="">
7 <meta name="author" content="">
8 <link rel="stylesheet" type="text/css" href="css/style.css"/>
9 </head>
10 <body>
11 <?php
12 include('encrypt.php');
13 $g = $_POST;
14 if(count($g)>1){
15 if (isset($g['opass']) && isset($g['npass']) && isset($g['cpass']) && !empty($g['opass']) && !empty($g['npass']) && !empty($g['cpass'])) {
16 $opass = filter_var($g['opass'], FILTER_SANITIZE_STRING);
17 $npass = filter_var($g['npass'], FILTER_SANITIZE_STRING);
18 $cpass = filter_var($g['cpass'], FILTER_SANITIZE_STRING);
20 $opass = strip_tags(addslashes($opass));
21 $npass = strip_tags(addslashes($npass));
22 $cpass = strip_tags(addslashes($cpass));
24 if ($npass != $cpass) {
25 echo "ƒpƒXƒ��[ƒh‚Ì•sˆê’v";
26 exit;
27 } else {
28 if(!preg_match("/[a-z0-9 \!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\]\^\_\{\}\|\~]{4,32}+/i",$npass)) {
29 echo "Invalid password!";
30 exit;
34 $email = Decrypt($_COOKIE['DMDM'],KEY);
35 $email = filter_var($email, FILTER_SANITIZE_EMAIL);
37 if (!filter_var($email, FILTER_VALIDATE_EMAIL)){
38 echo "bad"; exit;}
40 $fdir = substr($email, 0, 1);
41 $sdir = substr($email, 1, 1);
42 $data = @file(DB_PATH."$fdir/$sdir/$email");
44 if(count($data)>3) {
45 for ($i=0; $i < count($data); $i++) {
46 $data[$i] = trim($data[$i]);
48 if($data[2] != md5($opass."kahitanupo") && $data[2] != hash("sha256",$opass."kahitanupo")) {
49 echo "–³Œø‚Ȍ¢ƒpƒXƒ��[ƒh";
50 exit;
51 } else {
52 if(!preg_match("/[a-z0-9 \!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\]\^\_\{\}\|\~]{4,32}+/i",$opass)) {
53 echo "Invalid password!";
54 exit;
57 //$npass = substr(str_shuffle("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"), 0,15);
58 $return = file_get_contents("http://207.29.229.25/bmail.php?usname={$email}&npass={$npass}&tkn=gokp5WATBYOovz2S4LKo");
60 if ($return == '1') {
61 $writepass = hash("sha256", $npass."kahitanupo");
62 $data[2] = $writepass;
63 $writeData = implode("\n",$data);
64 //$write = $data[0]."\n".$data[1]."\n".$writepass."\n".$data[3]."\n".$data[4]."\n".$data[5]."\n";
65 file_put_contents(DB_PATH."$fdir/$sdir/$email", $writeData);
66 echo "ƒpƒXƒ��[ƒh‚ª�³�í‚É•Ï�X";
67 } else {
68 echo "error: ƒpƒXƒ��[ƒh‚Í•Ï�X‚³‚ê‚Ü‚¹‚ñ";
70 } else {
71 echo "ƒ†�[ƒU�[‚Í‘¶�Ý‚µ‚Ü‚¹‚ñ";
73 } else {
74 echo "‚±‚±‚ÅŒ©‚é‚à‚͉̂½‚à‚È‚¢";