Lavalair Sql Injection Blocker

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

    #16
    Tht dnt stop hacking lol

    Comment


      #17
      I Uses this when i used to use lavalair
      PHP Code:
      ini_set("display_errors""0");
      if(!
      get_magic_quotes_gpc())
      {
      $_GET array_map('trim'$_GET);
      $_POST array_map('trim'$_POST);
      $_COOKIE array_map('trim'$_COOKIE);

      $_GET array_map('addslashes'$_GET);
      $_POST array_map('addslashes'$_POST);
      $_COOKIE array_map('addslashes'$_COOKIE);

      E107 Security Team Leader
      Proudly Support AccountLab Plus Billing Software

      Want your Apps to be Developed ??? mail us your requirement at info@csarlab.com
      ------------------

      Comment


        #18
        where to put that?

        Comment


          #19
          i think that comes in core.php

          Comment


            #20
            yes it is in core.php

            Comment


              #21
              re

              ini_set("display_errors", "0");
              if(!get_magic_quotes_gpc())
              {
              $_GET = array_map('trim', $_GET);
              $_POST = array_map('trim', $_POST);
              $_COOKIE = array_map('trim', $_COOKIE);

              $_GET = array_map('addslashes', $_GET);
              $_POST = array_map('addslashes', $_POST);
              $_COOKIE = array_map('addslashes', $_COOKIE);
              }

              its true prevent sql inject?

              Comment


                #22
                PHP Code:
                function clean($str)
                {
                $str = @trim($str);
                if(
                get_magic_quotes_gpc())
                {
                $str stripslashes($str);
                }
                return 
                mysql_real_escape_string($str);

                Easy and very usefull:
                $test = clean($_REQUEST['test']);
                $test = clean($_POST['test']);
                $test = clean($_GET['test']);
                www.inbuzunar.mobi - Your mobile portal pocket

                Comment


                  #23
                  Post this in your core.Php
                  PHP Code:
                  function check_injection()
                    {
                      
                  $badchars = array("DROP""SELECT""UPDATE""DELETE""DELETE" "UNION""WHERE""FROM");
                    
                      foreach(
                  $_REQUEST  as $value)
                      {
                        if(
                  in_array(strtoupper($value), $badchars))
                        {
                        
                  $logfile'log/log.txt'//chmod 777
                  $IP $_SERVER['REMOTE_ADDR'];
                  $logdetailsdate("F j, Y, g:i a") . ': ' '<a href=http://dnsstuff.com/tools/city.ch?ip='.$_SERVER['REMOTE_ADDR'].' target=_blank>'.$_SERVER['REMOTE_ADDR'].'</a>';
                  $fp fopen($logfile"r+");
                  fwrite($fp$logdetailsstrlen($logdetails));
                  fclose($fp);

                         
                  header('Location:http://go-to-hell.com');

                        }
                        else
                        {
                          
                  $check preg_split("//"$value, -1PREG_SPLIT_OFFSET_CAPTURE);
                          foreach(
                  $check as $char)
                          {
                           if(
                  in_array(strtoupper($char), $badchars))
                            {
                        
                  $logfile'log/log.txt';
                  $IP $_SERVER['REMOTE_ADDR'];
                  $logdetailsdate("F j, Y, g:i a") . ': ' '<a href=http://dnsstuff.com/tools/city.ch?ip='.$_SERVER['REMOTE_ADDR'].' target=_blank>'.$_SERVER['REMOTE_ADDR'].'</a>';
                  $fp fopen($logfile"r+");
                  fwrite($fp$logdetailsstrlen($logdetails));
                  fclose($fp);

                              
                  header('Location:http://go-to-hell.com');
                       }
                      }
                     }
                    }
                    } 
                  hehehe. . .
                  PHP Code:
                  /* I don't know everything hehe */ 
                  Find me on facebook

                  Comment


                    #24
                    PHP Code:
                    function safe($text)
                    {
                    $safe stripslashes($text);
                    if(
                    function_exists("mysql_real_escape_string"))
                    {
                    $safe mysql_real_escape_string($safe);
                    }else if(
                    function_exists("mysql_escape_string"))
                    {
                    $safe mysql_escape_string($safe);
                    }
                    return 
                    $safe;

                    use:
                    $str = safe($_POST['str']);
                    $str = safe($_GET['str']);
                    My Blog: http://jhommark.blogspot.com
                    My Facebook: http://www.facebook.com/jhommark
                    My Official Site: http://www.undergroundweb.tk
                    My Community Site: http://undergroundwap.xtreemhost.com

                    Comment


                      #25
                      Where do i use d script

                      Comment


                        #26
                        how to stop sql blocking when some one comes and makes a external link to avatar, forum posts. how to stop that?

                        Comment


                          #27
                          Originally posted by murshid7 View Post
                          how to stop sql blocking when some one comes and makes a external link to avatar, forum posts. how to stop that?
                          try to make something like go.php, so when someone adds a link, it will loose everything in there, then redirect to the desired url.
                          mysterio.al - programming is a functional art

                          Comment


                            #28
                            Originally posted by jsyguy23 View Post
                            $uid=mysql_real_escape_string( $_GET["uid"] );
                            this
                            PHP Code:
                            $uid mysql_escape_string(strip_tags(htmlspecialchars($_GET['uid']))); 
                            could be a lot better
                            It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
                            ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
                            ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
                            キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

                            Comment


                              #29
                              Originally posted by kenxyz View Post
                              Where do i use d script
                              on core.php top

                              Comment


                                #30
                                remove all forms of request password, or forgotten password to avoid the send me the password hacking method

                                Comment

                                Working...
                                X