grrrr

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CreativityKills
    replied
    um why? Youre afraid someone will use it remotely? Lol half you folks dont know a thing about php.

    Leave a comment:


  • nclemale36
    replied
    its not really i just put it like that on here so no one else sees my real function

    Leave a comment:


  • CreativityKills
    replied
    PHP Code:
    function sanitize($value$escape FALSE)
    {
     if(
    is_array($value) OR is_object($value))
     {
      foreach(
    $value as $k => $v)
      {
       
    // Handle recursively
       
    $value[$k] = sanitize($v, (bool) $escape);
      }
     }
     elseif(
    is_string($value))
     {
       if(
    get_magic_quotes_gpc())
      {
        
    $value stripslashes($value);
      }

      if(
    strpos($value"\r") === TRUE)
      {
       
    $value str_replace(array("\r\n""\n"), "\n"$value);
      }

     return (
    $escape) ? mysql_real_escape_string($value) : $value;
     }
    }

    $_GET sanitize($_GET);
    $_POST sanitize($_POST);
    $_COOKIE sanitize($_COOKIE); 
    Added after 2 minutes:

    and oh i just noticed your function name is a reserved php function, thats stupid.
    Last edited by CreativityKills; 17.10.10, 06:36.

    Leave a comment:


  • thanatos
    replied
    sanitize the query where the browser and ip gets updated.

    Leave a comment:


  • nclemale36
    replied
    do i replace that with my function ? ? ? @ optical. .

    Leave a comment:


  • opticalpigion
    replied
    Originally posted by nclemale36 View Post
    so add (,) to

    Code:
    $badWords = "(delete)|(update)|(union)|(insert)| (drop)|(http)|(--)|(>)|(<)|(&)|(#)";
    ???
    PHP Code:
    function clean($str) { 
            
    $str = @trim($str); 
            if(
    get_magic_quotes_gpc()) { 
                
    $str=htmlspecialchars($str);                        
                
    $str=stripslashes(trim($str)); 
                
    $search=array("\\","\0","\n","\r","\x1a","'",'"'); 
                
    $replace=array("\\\\","\\0","\\n","\\r","\Z","\'",'\"'); 
                
    $str str_replace($search,$replace,$str); 
            } 
            return 
    mysql_real_escape_string($str); 
        } 

    Leave a comment:


  • nclemale36
    replied
    so add (,) to

    Code:
    $badWords = "(delete)|(update)|(union)|(insert)| (drop)|(http)|(--)|(>)|(<)|(&)|(#)";
    ???

    Leave a comment:


  • subzero
    replied
    block ' , in inputs

    Leave a comment:


  • nclemale36
    started a topic grrrr

    grrrr

    i thought i had this covered but seems not.
    Code:
    else if($action=="uprof")
    {
        addonline(getuid_sid($sid),"Updating Settings","");
        $savat = mysql_real_escape_string($_POST["savat"]);
        $semail = mysql_real_escape_string($_POST["semail"]);
        $ubday = mysql_real_escape_string($_POST["ubday"]);
        $uloc = mysql_real_escape_string($_POST["uloc"]);
        $usig = mysql_real_escape_string($_POST["usig"]);
        $usex = mysql_real_escape_string($_POST["usex"]);
        $ms = mysql_real_escape_string($_POST["ms"]);
    Code:
    /////////////////////
    
    function mysql_real_escape_string($string) 
    {
     $badWords = "(delete)|(update)|(union)|(insert)| (drop)|(http)|(--)|(>)|(<)|(&)|(#)"; 
     $string = eregi_replace($badWords, "", $string);
    
     $string = mysql_real_escape_string($string); 
    
    return $string;
     }
    /////////////////////////////
    just had some muppet update all my location and emails to this site always gets hacked.

    last person that did this was huwad or his mates .

    why dont the codes i got in place stop this ? ? ?
    Last edited by nclemale36; 16.10.10, 17:16.
Working...
X