Ir para conteúdo
Fórum Script Brasil
  • 0

[RESOLVIDO] Tirar base64_encode e md5


manogaucho

Pergunta

Oi tudo bem!!!

Queria tirar " base64_encode e md5 " da pagina access_admin.php, para inserir senha e login, sem proteção, fiz mudanças mais não consegui, venho pedir mais uma vez ajuda.

Agradeço desde Já.

access_admin.php

<?php


    ini_set("display_errors", "1");
   session_start();
include("./cfg/connect.inc.php");

    if (isset($_POST["authorize"]))
    {
        if (!strcmp(base64_encode($_POST["login"]), ADMIN_LOGIN) && !strcmp(md5($_POST["password"]), ADMIN_PASS)) //Quero tirar base64_encode e md5
        { 
            $_SESSION["log"] = ADMIN_LOGIN;
            $_SESSION["pass"] = ADMIN_PASS;
            
            header("Location: produto.php");
        }
        else $errorStr = "Invalido Login ou Senha";
    }

?>
<html>
<head>
<link rel=STYLESHEET href="style1.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Administrator login</title></head>
<body>
<center>

<?php
    if (isset($errorStr)) echo "<font color=red><b>$errorStr</b></font>";
?>

<form name="form1" method="post" action="access_admin.php">
    <table width="319" border="0" cellpadding="2" cellspacing="1" bgcolor="#333333">
      <tr bgcolor="#CCCCCC"> 
        <td colspan="2" align=center><h4><font size="7">BEM VINDO</font></h4></td>
  </tr>
      <tr bgcolor="#FFFFFF"> 
        <td align="right">&nbsp;</td>
        <td> 
          <div align="center">
            <input name="login" type="text"<?php if (isset($_POST["login"])) echo ' value="'.str_replace("\"","&quot;",stripslashes($_POST["login"])).'"';?>>
        </div></td>
  </tr>
      <tr bgcolor="#FFFFFF"> 
        <td align="right">&nbsp;</td>
        <td> 
          <div align="center">
            <input name="password" type="password">
        </div></td>
  </tr>
</table>

    <p>
      <input type="hidden" name="authorize" value="1">
      <input type="submit" value="ENTRE">
    </p>
  </form>
  <p><font color="#FF0000" size="4"></font></p>
</center>
</body>
</html>
connect.inc.php
<?php
    //database connection settings

    define('DB_HOST', 'xxxxxxxxx'); 
    define('DB_USER', 'xxxxxxxxx');
    define('DB_PASS', 'xxxxxxxx'); 
    define('DB_NAME', 'xxxxxxxxxxx'); 
    define('ADMIN_LOGIN', 'bWlsbGVuaXVubg=='); //Login
    define('ADMIN_PASS', '3b82fe3f8ab2dda087e9219d555e31c4'); //senha

    //database tables
    include("./cfg/tables.inc.php");

?>
Queria que ficasse assim
<?php
    //database connection settings

    define('DB_HOST', 'xxxxxxxxx'); 
    define('DB_USER', 'xxxxxxxxx');
    define('DB_PASS', 'xxxxxxxx'); 
    define('DB_NAME', 'xxxxxxxxxxx'); 
    define('ADMIN_LOGIN', 'admin'); //Login
    define('ADMIN_PASS', '123456'); //senha

    //database tables
    include("./cfg/tables.inc.php");

?>
Obrigado!!! >>>>>>>>>>><<<<<<<<<<<<< Resposta. Foi dificil mais encontrei. Ficou assim: access_admin.php
<?php


    ini_set("display_errors", "1");
   session_start();
include("./cfg/connect.inc.php");

    if (isset($_POST["authorize"]))
    {
        if (!strcmp(($_POST["login"]), ADMIN_LOGIN) && !strcmp(($_POST["password"]), ADMIN_PASS)) //aqui que mudei...somente
        { 
            $_SESSION["log"] = ADMIN_LOGIN;
            $_SESSION["pass"] = ADMIN_PASS;
            
            header("Location: produto.php");
        }
        else $errorStr = "Invalido Login ou Senha";
    }

?>
<html>
<head>
<link rel=STYLESHEET href="style1.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Administrator login</title></head>
<body>
<center>

<?php
    if (isset($errorStr)) echo "<font color=red><b>$errorStr</b></font>";
?>

<form name="form1" method="post" action="access_admin.php">
    <table width="319" border="0" cellpadding="2" cellspacing="1" bgcolor="#333333">
      <tr bgcolor="#CCCCCC"> 
        <td colspan="2" align=center><h4><font size="7">BEM VINDO</font></h4></td>
  </tr>
      <tr bgcolor="#FFFFFF"> 
        <td align="right">&nbsp;</td>
        <td> 
          <div align="center">
            <input name="login" type="text"<?php if (isset($_POST["login"])) echo ' value="'.str_replace("\"","&quot;",stripslashes($_POST["login"])).'"';?>>
        </div></td>
  </tr>
      <tr bgcolor="#FFFFFF"> 
        <td align="right">&nbsp;</td>
        <td> 
          <div align="center">
            <input name="password" type="password">
        </div></td>
  </tr>
</table>

    <p>
      <input type="hidden" name="authorize" value="1">
      <input type="submit" value="ENTRE">
    </p>
  </form>
  <p><font color="#FF0000" size="4"><strong>Aten&ccedil;&atilde;o Apenas Clique no bot&atilde;o ENTRE</strong></font></p>
</center>
</body>
</html>

Obrigado.

tópico Encerrado.

Editado por manogaucho
Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts Recomendados

  • 0

Foi dificil mais encontrei.

Ficou assim:

access_admin.php

<?php


    ini_set("display_errors", "1");
   session_start();
include("./cfg/connect.inc.php");

    if (isset($_POST["authorize"]))
    {
        if (!strcmp(($_POST["login"]), ADMIN_LOGIN) && !strcmp(($_POST["password"]), ADMIN_PASS)) //aqui que mudei...somente
        { 
            $_SESSION["log"] = ADMIN_LOGIN;
            $_SESSION["pass"] = ADMIN_PASS;
            
            header("Location: produto.php");
        }
        else $errorStr = "Invalido Login ou Senha";
    }

?>
<html>
<head>
<link rel=STYLESHEET href="style1.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Administrator login</title></head>
<body>
<center>

<?php
    if (isset($errorStr)) echo "<font color=red><b>$errorStr</b></font>";
?>

<form name="form1" method="post" action="access_admin.php">
    <table width="319" border="0" cellpadding="2" cellspacing="1" bgcolor="#333333">
      <tr bgcolor="#CCCCCC"> 
        <td colspan="2" align=center><h4><font size="7">BEM VINDO</font></h4></td>
  </tr>
      <tr bgcolor="#FFFFFF"> 
        <td align="right">&nbsp;</td>
        <td> 
          <div align="center">
            <input name="login" type="text"<?php if (isset($_POST["login"])) echo ' value="'.str_replace("\"","&quot;",stripslashes($_POST["login"])).'"';?>>
        </div></td>
  </tr>
      <tr bgcolor="#FFFFFF"> 
        <td align="right">&nbsp;</td>
        <td> 
          <div align="center">
            <input name="password" type="password">
        </div></td>
  </tr>
</table>

    <p>
      <input type="hidden" name="authorize" value="1">
      <input type="submit" value="ENTRE">
    </p>
  </form>
  <p><font color="#FF0000" size="4"><strong>Aten&ccedil;&atilde;o Apenas Clique no bot&atilde;o ENTRE</strong></font></p>
</center>
</body>
</html>
Obrigado. tópico Encerrado. Foi dificil mais encontrei. Ficou assim: access_admin.php
<?php


    ini_set("display_errors", "1");
   session_start();
include("./cfg/connect.inc.php");

    if (isset($_POST["authorize"]))
    {
        if (!strcmp(($_POST["login"]), ADMIN_LOGIN) && !strcmp(($_POST["password"]), ADMIN_PASS)) //aqui que mudei...somente
        { 
            $_SESSION["log"] = ADMIN_LOGIN;
            $_SESSION["pass"] = ADMIN_PASS;
            
            header("Location: produto.php");
        }
        else $errorStr = "Invalido Login ou Senha";
    }

?>
<html>
<head>
<link rel=STYLESHEET href="style1.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Administrator login</title></head>
<body>
<center>

<?php
    if (isset($errorStr)) echo "<font color=red><b>$errorStr</b></font>";
?>

<form name="form1" method="post" action="access_admin.php">
    <table width="319" border="0" cellpadding="2" cellspacing="1" bgcolor="#333333">
      <tr bgcolor="#CCCCCC"> 
        <td colspan="2" align=center><h4><font size="7">BEM VINDO</font></h4></td>
  </tr>
      <tr bgcolor="#FFFFFF"> 
        <td align="right">&nbsp;</td>
        <td> 
          <div align="center">
            <input name="login" type="text"<?php if (isset($_POST["login"])) echo ' value="'.str_replace("\"","&quot;",stripslashes($_POST["login"])).'"';?>>
        </div></td>
  </tr>
      <tr bgcolor="#FFFFFF"> 
        <td align="right">&nbsp;</td>
        <td> 
          <div align="center">
            <input name="password" type="password">
        </div></td>
  </tr>
</table>

    <p>
      <input type="hidden" name="authorize" value="1">
      <input type="submit" value="ENTRE">
    </p>
  </form>
  <p><font color="#FF0000" size="4"><strong>Aten&ccedil;&atilde;o Apenas Clique no bot&atilde;o ENTRE</strong></font></p>
</center>
</body>
</html>

Obrigado.

tópico Encerrado.

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      651,9k
×
×
  • Criar Novo...