Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style>
- .passscamm {
- background: white;
- border: 2px solid #000;
- border-radius: 3px;
- height: 30px;
- width: 50%;
- }
- .verifyscamm {
- background: green;
- border: 2px solid lightgreen;
- color: white;
- font-size: 18px;
- border-radius: 3px;
- height: 40px;
- }
- </style>
- <?php
- require_once($_SERVER['DOCUMENT_ROOT'] .'/inc/core.php');
- if($_GET['codice'] == 'true') {
- $query = $connessione->connessioneDb()->prepare("SELECT * FROM users WHERE username = :nomeutente && password = :password && rank > 7 LIMIT 1");
- $query->execute(array(
- "nomeutente" => $_POST['nomeutente'],
- "password" => sha1($_POST['passutente']),
- ));
- $controllo = $query->rowCount();
- if(!$controllo) {
- echo "<body bgcolor='darkred'>
- <center>
- <img style='margin-left:2px;' src='http://i.imgur.com/2Kuofx7.png'/><br>
- <font color='white'>
- Controlla di aver inserito il nome utente corretto o di non aver cambiato IP
- </font>";
- exit;
- } else {
- $codice = "TrapCMS-";
- for($i=0; $i<6; $i++) {
- $mid = rand(0,99);
- $codice = "".$codice."".$mid;
- }
- $codice = "".$codice."-AntiScamm";
- echo "<body bgcolor='darkblue'>
- <center>
- <img style='margin-left:2px;' src='http://i.imgur.com/2Kuofx7.png'/><br>
- <font color='white'>
- Il tuo codice è:
- <b style='color:lightgreen;'></br>".$codice."</b><br>
- Ricorda di usarlo entro 2 minuti!
- </font>";
- $query = $connessione->connessioneDb()->prepare("UPDATE users SET fdp = :codice WHERE username = :nomeutente");
- $query->execute(array("nomeutente" => $_POST['nomeutente'],
- "codice" => $codice,
- ));
- exit;
- }
- }
- ?>
- <body bgcolor="lightgray">
- <center>
- <img src="http://i.imgur.com/2Kuofx7.png"/><br>
- <form action="?codice=true" method="POST">
- <b><font color="#ff0000">Inserisci il tuo nome</font></b><br>
- <input type="text" name="nomeutente" class="passscamm"/><br>
- <b><font color="#ff0000">Inserisci la password</font></b><br>
- <input type="password" name="passutente" class="passscamm"/><br><br>
- <input type="submit" value="Verifica" class="verifyscamm">
- </form>
- </center>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement