Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. /**
  2. * Developed by IlluSec [Schiz0ide]
  3. *
  4. */
  5. <?php
  6. $ip = $_SERVER['REMOTE_ADDR'];
  7. if ($ip !== gethostbyaddr($ip)) {
  8. Die("GEEN VPN TOEGESTAAN");
  9. }
  10. ?>
  11. <html>
  12. <form action="" method="post">
  13. <input type="text" placeholder="Username" name="user" /><br>
  14. <input type="password" name="pass" /><br>
  15. <input type="submit" name="login" value="Log nu in!" />
  16. </form>
  17. </html>
  18.  
  19. <?
  20. function Clean($stat) {
  21. return mysql_real_escape_string(htmlentities($stat));
  22. }
  23.  
  24. $username = Clean($stat);
  25. $password = md5(Clean($_POST['pass']));
  26.  
  27. if(isset($username) && isset($password)) {
  28. define("HOST", 'jouw host hier');
  29. define("USER", 'jouw mysql_username');
  30. define("PASS", 'jouw mysql_password);
  31. define("DB", 'jouw db name');
  32.  
  33. $con = mysql_connect(HOST, USER, PASS);
  34. mysql_select_db(DB, $con);
  35.  
  36. $query = mysql_query("SELECT * FROM users where username = $username and password = $password");
  37. $result = mysql_fetch_assoc($query);
  38.  
  39. if(!$result) {
  40. die("er is iets mis gegaan");
  41. }else{
  42. echo 'succesvol ingelogt';
  43. }
  44. }
  45.  
  46.  
  47. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement