SHARE
TWEET

Untitled

a guest Jun 19th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function protect( &$str ) {
  2.         if( !is_array( $str ) ) {                      
  3.                 $str = preg_replace( '/(from|select|insert|delete|where|drop|union|order|update|database)/i', '', $str );
  4.                 $str = preg_replace( '/(<|<)?script(/?(>|>(.*))?)/i', '', $str );
  5.                 $tbl = get_html_translation_table( HTML_ENTITIES );
  6.                 $tbl = array_flip( $tbl );
  7.                 $str = addslashes( $str );
  8.                 $str = strip_tags( $str );
  9.                 return strtr( $str, $tbl );
  10.         } else {
  11.                 return array_filter( $str, "protect" );
  12.         } }
  13.      
  14. session_start();
  15. $login = protect($_SESSION['login']));
  16. $senha = protect($_SESSION['senha']));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top