How To Cheeck blind SqL IN Lava?

Started on the old forum in January 2013 · view the original in the archive · old links redirect here

2 replies · 5,139 views · started 13 years ago · 1 min read

3 participants
hridoy636 Newbie · 8 posts #1

Plz share the code by which i can cheeck it...

hi_jakkk Developer · 52 posts #3

just try to put it in your core

function cleanInput($text) {
 
$search = array(
    '@<script[^>]*?>.*?</script>@si',   // Strip out javascript
    '@<[\/\!]*?[^<>]*?>@si',            // Strip out HTML tags
    '@<style[^>]*?>.*?</style>@siU',    // Strip style tags properly
    '@<![\s\S]*?--[ \t\n\r]*>@'         // Strip multi-line comments
);
 
    $output = preg_replace($search, '', $text);
    return $output;
}
function sanitize($text) {
    if (is_array($text)) {
        foreach($text as $var=>$val) {
            $output[$var] = sanitize($val);
        }
    }
    else {
        if (get_magic_quotes_gpc()) {
            $text = stripslashes($text);
        }
        $text  = cleanInput($text);
        $output = mysql_real_escape_string($text);
    }
    return $output;
}
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;
}

And sanititze all user inputs like this

$page = sanitize(cleanInput($_GET["page"]));
$who = sanitize(cleanInput($_GET["who"]));

just try this than n0thing at all 🙂

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close