Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- foreach($_GET as $gets){
- $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);
- if($sqli){
- $fp = fopen("cgi-bin/log.txt","a");
- fwrite($fp,$_SERVER['REMOTE_ADDR']."---".date('d/m/Y h:i') ."---". $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].$gets."\n");
- fclose($fp);
- 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>");
- }
- }
- foreach($_POST as $posts){
- //$sqli=ereg("|\(|\)|,",$posts);
- $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);
- if($sqli){
- 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>");
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement