Advertisement
Guest User

Untitled

a guest
Jan 3rd, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. <style>
  2. .passscamm {
  3. background: white;
  4. border: 2px solid #000;
  5. border-radius: 3px;
  6. height: 30px;
  7. width: 50%;
  8. }
  9. .verifyscamm {
  10. background: green;
  11. border: 2px solid lightgreen;
  12. color: white;
  13. font-size: 18px;
  14. border-radius: 3px;
  15. height: 40px;
  16. }
  17. </style>
  18.  
  19. <?php
  20. require_once($_SERVER['DOCUMENT_ROOT'] .'/inc/core.php');
  21.  
  22. if($_GET['codice'] == 'true') {
  23. $query = $connessione->connessioneDb()->prepare("SELECT * FROM users WHERE username = :nomeutente && password = :password && rank > 7 LIMIT 1");
  24. $query->execute(array(
  25. "nomeutente" => $_POST['nomeutente'],
  26. "password" => sha1($_POST['passutente']),
  27. ));
  28. $controllo = $query->rowCount();
  29. if(!$controllo) {
  30. echo "<body bgcolor='darkred'>
  31. <center>
  32. <img style='margin-left:2px;' src='http://i.imgur.com/2Kuofx7.png'/><br>
  33. <font color='white'>
  34. Controlla di aver inserito il nome utente corretto o di non aver cambiato IP
  35. </font>";
  36.  
  37. exit;
  38. } else {
  39. $codice = "TrapCMS-";
  40. for($i=0; $i<6; $i++) {
  41. $mid = rand(0,99);
  42. $codice = "".$codice."".$mid;
  43. }
  44. $codice = "".$codice."-AntiScamm";
  45. echo "<body bgcolor='darkblue'>
  46. <center>
  47. <img style='margin-left:2px;' src='http://i.imgur.com/2Kuofx7.png'/><br>
  48. <font color='white'>
  49. Il tuo codice è:
  50. <b style='color:lightgreen;'></br>".$codice."</b><br>
  51. Ricorda di usarlo entro 2 minuti!
  52. </font>";
  53.  
  54. $query = $connessione->connessioneDb()->prepare("UPDATE users SET fdp = :codice WHERE username = :nomeutente");
  55. $query->execute(array("nomeutente" => $_POST['nomeutente'],
  56. "codice" => $codice,
  57. ));
  58. exit;
  59. }
  60. }
  61. ?>
  62. <body bgcolor="lightgray">
  63. <center>
  64. <img src="http://i.imgur.com/2Kuofx7.png"/><br>
  65. <form action="?codice=true" method="POST">
  66. <b><font color="#ff0000">Inserisci il tuo nome</font></b><br>
  67. <input type="text" name="nomeutente" class="passscamm"/><br>
  68. <b><font color="#ff0000">Inserisci la password</font></b><br>
  69. <input type="password" name="passutente" class="passscamm"/><br><br>
  70. <input type="submit" value="Verifica" class="verifyscamm">
  71. </form>
  72. </center>
  73. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement