Exemplo n.º 1
0
<?php

include "../control.php";
$co = new control();
$search = isset($_POST['input']) ? $co->search($_POST['input']) : "403";
$mass = $search !== false ? str_replace(":<!#:#!>:", "<br/>Base:", $search) : $co->fromOther($_POST['input']);
echo $mass;
Exemplo n.º 2
0
<?php

include "../control.php";
$co = new control();
$commend = $_GET['commend'];
$com = substr($commend, 3);
$re = array("status" => true);
if (substr($commend, 0, 3) == "-c/") {
    $search = $co->search($com);
    $mass = $search !== false ? $search : $co->fromOther($com);
    if ($mass === "This isn't a MD5 hash.") {
        $re['status'] = false;
        $re['code'] = "403";
    } elseif ($mass === "Not found") {
        $re['status'] = false;
        $re['code'] = "404";
    } else {
        $a = explode(":<!#:#!>:", $mass);
        if (isset($a[1])) {
            $re['base'] = $a[1];
        }
        $re['return'] = $a[0];
    }
} elseif (substr($commend, 0, 3) == "-g/") {
    $a = $co->newHash($com);
    $re['return'] = $a;
    $re['base'] = $com;
} else {
    $re['status'] = false;
    $re['code'] = "405";
}