Plz genious php coaders give ur essential and helpfull comments here........
Lavalair (hack Protection)
Collapse
This topic is closed.
X
X
-
GuestTags: None
-
Guest
my site name is dbangla (its ok now) is was in lavalair forum script........
but it was hacked by some guys after giving the sql injection protection
$who=mysql_real_escape_string($_GET["$who"]);
can anyone plz help me.......
-
you spammer now ur site for sure hackedFailure is not when a girls leaves you, its only when you let her go virgin. heheh!!
<span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

Comment
-
Most hackers hack for a reason
like learner says if you decide to spam or mess about with the wrong sites you will get hacked
Seeming Your site gets Spammed a lot it then i say a big Congratulations to whoever did it!
if i could hack i would have done the same lol
Suggestions on how to stop hackers:
1 Stop Spamming
2 Stop Your staff from spamming
3 Getting The Hint Yet?
Comment
-
Guest
I am not give the site link for spamming it was given for proper discussion !
Can any one give me coding help. I got Some Code Lke This :
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?php
// Create the function
function make_safe($var, $characters) {
// Create an array for errors
$error = array();
// Create array of curse words to check for
$curse_words = array("F WORD", "A WORD", "S WORD" "H WORD");
// Check the variable for any curse words
$count = 0;
$var = str_replace($curse_words, "** BEEP **", $var, $count);
// If more than 2 curse words exist, add an error
if($count > 2) {
$error[] = '[*]Field "' .$var. '" cannot contain fowl language!';
}
// Check for illegal characters
if (preg_match("/[^a-zA-Z0-9\.\-\Ä\ä\Ö\ö\Ü\ü\ ]+$/", $var)) {
$error[] = '[*]Field "' .$var. '" may not contain illegal characters!';
}
// Check character count
if(isset($var{$characters})) {
$error[] = '[*]Field "' .$var. '" exceed max amount of allowed characters!';
}
// Check for illegal database actions in fields
if(preg_match("((select|grant|delete|insert|drop|a lter|replace|truncate|update|create|rena
e|describe)[[:space:]]+[A-Z|a-z|0-9|\*| |\,]+[[:space:]]+(from|into|table|database|index|view)[[:space:]]+[A-Z|a-z|0-9|\*| |\,]|UNION SELECT.*\'.*\'.*,[0-9].*INTO.*FROM)", $var)) {
$error[] = '[*]Field "' .$var. '" contains errors.';
}
// Check for illegal tags
if(preg_match("(<script|<about|<applet|<activex|<c hrome|<object)", $var)) {
$error[] = '[*]Field "' .$var. '" contains illegal tags. HTML is disallowed.';
}
// If any errors occured, output them!
if(count($error)>0) {
echo '<div style="color: red; font: bold; padding: 10px;">
(' .count($error). ') errors occured while processing your search:- ';
$start = count($error);
for($i=0; $i<=$start; ++$i) {
echo $error[$i];
}
echo '</div>
exit();
} else {
// Parse it through HTML entitites just to play it safe
$var = htmlentities($var);
// Make safe for database for later user
$var = mysql_real_escape_string($var);
}
// Closing to function make safe
}
?>
</div>
And
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?php
// Make a username safe for database and limit to 30 characters
$username = $_POST['username'];
// User our function!
$username = make_safe($username, 31);
?></div>
Like This AN d How To Use Them In Lavalair Forum !
Comment
-
very claver first u say ur site hack and spam and then u change discussion to something else. u created this topic only to spam smartieFailure is not when a girls leaves you, its only when you let her go virgin. heheh!!
<span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

Comment
-
Guest
i used for sql protection this way without the registration.php page
mysql_real_escape_string()
in that case :
$_GET
$_POST
$_COOKIE
like :
$who=mysql_real_escape_string($_GET["$who"]);
I also heard about quick protection : get_magic_quotes_gpc
Comment
-
To make a long boring subject short
Where ever you use $_POST[""]; or $_REQUEST[""]; use mysql_real_escape_string
Example.
What the mysql_real_escape_string does, it protects the script from injections, you do sql injections with forms, and if you use post for example, you post info that got submitted by a form.Code:$name=mysql_real_escape_string($_POST["name"]);
Hope this is usefull to someone.
Comment
-
Guest
now i am using like this :
$who= mysql_real_escape_string($_GET["$who"]);
according to ur worlds its will be like :
$who= mysql_real_escape_string($_GET["who"]);
that means the $ sign will be removed..........
Comment
-
Guest
1)change ur password n include this sign {/ in ur password, 2)hide ur adminx folder,3)dont add uploader in ur site like gallery uploader etc 4)stop spamming on other site :D
Comment
-
pmpl simply...dont tell to anyone the folder name ;)how do i hide the adminx folder?[/b]www.inbuzunar.mobi - Your mobile portal pocket
Comment
-
Guest
Comment
-
Guest



Comment