Initial commit
[2ch-be.git] / dev-test / test / z.php
blob4188a26a6c688b3ecbae70db9a8df87f2fc66d0f
1 <?php
3 include('../encrypt.php');
5 $email = Decrypt($_COOKIE['DMDM'],KEY);
6 $pass = Decrypt($_COOKIE['MDMD'],KEY);
7 #echo $_COOKIE['DMDM']."->".$email."<br><br>";
8 echo urlencode($_COOKIE['DMDM'])."->".$email."<br><br>";
9 echo urlencode($_COOKIE['MDMD'])."->".$pass."<br><br>";
11 #echo $_COOKIE['DMDM']."->".$email."<br><br>";
12 #echo $_COOKIE['MDMD']."->".$pass."<br><br>";
14 if (isset($_GET['d']) && isset($_GET['m']) && isset($_GET['r'])) {
15 #$d = urlencode(trim($_GET['d']));
16 #$m = urlencode(trim($_GET['m']));
17 #$r = urlencode(trim($_GET['r']));
18 $d = trim($_GET['d']);
19 $m = trim($_GET['m']);
20 $r = trim($_GET['r']);
22 echo $d."->".$m."<br>";
24 $d = filter_var($d, FILTER_SANITIZE_EMAIL);
25 $m = filter_var($m, FILTER_SANITIZE_STRING);
27 #echo $d."->".$m."<br>";
29 #$d = strip_tags(addslashes($d));
30 #$m = strip_tags(addslashes($m));
31 $r = strip_tags(addslashes($r));
33 $d = urldecode($d);
34 $m = urldecode($m);
36 $d = Decrypt($d,KEY);
37 $m = Decrypt($m,KEY);
39 #echo $d."<br>".$m;
41 $fdir = substr($d, 0, 1);
42 $sdir = substr($d, 1, 1);
43 $data = @file(DB_PATH."$fdir/$sdir/$d");
44 $ico = "";
46 if(md5($m."kahitanupo")==trim($data[2])){
47 if(count($data)>3) {
48 if(isset($data[5]))
49 $ico = $data[5];
51 echo $data[3]." ".$data[0]." ".$ico;
55 if(hash("sha256", $m."kahitanupo")==trim($data[2])){
56 if(count($data)>3) {
57 if(isset($data[5]))
58 $ico = $data[5];
60 echo $data[3]." ".$data[0]." ".$ico;