Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. <?php
  2. foreach($_GET as $gets){
  3. $sqli=ereg("(s|S)(e|E)(l|L)(e|E)(c|C)(t|T)|\(|\)|,|(u|U)(n|N)(i|I)(o|O)(n|N)|(a|A)(n|N)(d|D)(.{9,})|=|<|>|\n|\r|\t|\xa3",$gets);
  4. if($sqli){
  5. $fp = fopen("cgi-bin/log.txt","a");
  6. fwrite($fp,$_SERVER['REMOTE_ADDR']."---".date('d/m/Y h:i') ."---". $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].$gets."\n");
  7. fclose($fp);
  8. die( "<script>alert('hacking attempt: ISP and IP register for investigation');document.location='http://www.google.com/search?q=tutorial+sql+injection+para+retrasados'</script>");
  9. }
  10. }
  11.  
  12. foreach($_POST as $posts){
  13.  
  14. //$sqli=ereg("|\(|\)|,",$posts);
  15. $sqli=ereg("(s|S)(e|E)(l|L)(e|E)(c|C)(t|T)|\(|\)|,|(u|U)(n|N)(i|I)(o|O)(n|N)|(a|A)(n|N)(d|D)(.{9,})|=|[[:space:]]|<|>|\n|\r|\t|\xa3",$posts);
  16.  
  17. if($sqli){
  18. die( "<script>alert('hacking attempt: ISP and IP register for investigation');document.location='http://www.google.com/search?q=tutorial+sql+injection+para+retrasados'</script>");
  19. }
  20. }
  21.  
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement