• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

how to block ip adress ? my server got hacked

Status
Not open for further replies.
Initiate Mage
Joined
Sep 27, 2011
Messages
1
Reaction score
0
dear

how to block ip adress ? my travianx server got hacked,(inject sql maybe)
he can change his population and source, help me please
 
Elite Diviner
Joined
Sep 3, 2011
Messages
404
Reaction score
100
dear

how to block ip adress ? my travianx server got hacked,(inject sql maybe)
he can change his population and source, help me please


Hacker used ddos attack on your host

See that you host has ban ip ability
 
Skilled Illusionist
Joined
Apr 21, 2011
Messages
378
Reaction score
88
It's really tuff thing about ddosing, if you have dedicated server, ill make the tautorial soon how to defend 80% of dos DDOS or slowloris dos attacks. Using APF for whole server + mod_evasive mod for apache and mod_qos(more for centos users) for apache aswell.
 
Elite Diviner
Joined
Sep 3, 2011
Messages
404
Reaction score
100
It's really tuff thing about ddosing, if you have dedicated server, ill make the tautorial soon how to defend 80% of dos DDOS or slowloris dos attacks. Using APF for whole server + mod_evasive mod for apache and mod_qos(more for centos users) for apache aswell.



Thx my friend, It's my problem too

If you could make a good tutorial for this it will be useful, I'll try to make some other account in this site just to like your post :)

Btw thx
 
Skilled Illusionist
Joined
Apr 21, 2011
Messages
378
Reaction score
88
He didnt ddos him. Try reading, he made sql injection and now he can change everything in database.

WOW, no ideas to prevent from that... any suggestions? It never happend to me but, youll never know..
 
Joined
Jun 20, 2011
Messages
582
Reaction score
182
dzoki...i'm waiting your server..please restart it from 0

---------- Post added at 01:26 PM ---------- Previous post was at 01:26 PM ----------

you are the best dev ever!!
 
Joined
May 15, 2009
Messages
799
Reaction score
558
oh narcis where is the love you said that about me too lol

and sql injection is a matter of sanitizing all get and post request anything that has input that is procsed by user into sql can be injected unless sanitized
 
Elite Diviner
Joined
Sep 3, 2011
Messages
404
Reaction score
100
WOW, no ideas to prevent from that... any suggestions? It never happend to me but, youll never know..


But ddos attacks are allways is on my server

Maybe one of my friends do it btw don't know how to defend server from those attacks

Can't one of friends make a tutorial for it (Prevent from ddos attacks)

Grifit can you make it, Cause you said you'll make, If can't no problem

But if can it'll be good :)


------------------------------
Question from advocaite :

Advocaite i downloaded Travianx v4 now but it seems it damaged ?

Are you still working on it or expired ?
 
 
Joined
May 15, 2009
Messages
799
Reaction score
558
PHP:
function clean($str) {
 $cleaned = strip_tags($str);
 $cleaned = htmlspecialchars(mysql_real_escape_string($cleaned));
 return $cleaned;}
add to db_mysql.php and then call it like this

PHP:
$database->clean($_POST[sommething]);
 
Junior Spellweaver
Joined
Oct 2, 2010
Messages
100
Reaction score
22
PHP:
function clean($str) {
 $cleaned = strip_tags($str);
 $cleaned = htmlspecialchars(mysql_real_escape_string($cleaned));
 return $cleaned;}
add to db_mysql.php and then call it like this

PHP:
$database->clean($_POST[sommething]);

Faster than my friend probably..
 
Elite Diviner
Joined
Sep 3, 2011
Messages
404
Reaction score
100
PHP:
function clean($str) {
 $cleaned = strip_tags($str);
 $cleaned = htmlspecialchars(mysql_real_escape_string($cleaned));
 return $cleaned;}
add to db_mysql.php and then call it like this

PHP:
$database->clean($_POST[sommething]);


What is this Script doing ?, We must add first code to db_mysql.php and add second code to it again or ...
 
 
Junior Spellweaver
Joined
Mar 29, 2011
Messages
119
Reaction score
56
PHP:
/**
 * Copyright by Manuel Mannhardt < manuel_mannhardt@web.de >
 * Skype: manuel.mannhardt
 */
function escape_pg() {
 	  if($_POST) {
		    foreach($_POST AS $key => $value) {
            if(is_array($value)) {
			          foreach($value AS $key2 => $value2) {
                    $_POST[$key2][$key2] = htmlspecialchars(mysql_escape_string($value2));
                }
            } else {
                $_POST[$key] = htmlspecialchars(mysql_escape_string($value));
            }
		    }
	  }
	
	  if($_GET) {
		    foreach($_GET AS $key => $value) {
			      $_GET[$key] = htmlspecialchars(mysql_escape_string($value));
		    }
	  }
}

Use this function.
Write escape_pg(); in some file, you ever include, for example config.php or something like that, then you don´t hava to escape all posts or gets ever ;)

Function copyright by me, Manuel Mannhardt

greets Slim
 
Elite Diviner
Joined
Sep 3, 2011
Messages
404
Reaction score
100
Which one is better to use then ?

advocaite's or yours ?
 
Pee Aitch Pee
Joined
Mar 30, 2011
Messages
630
Reaction score
422
Use the one of SlimShady95.
If you use cookies then you need to add $_COOKIE too.
 
Elite Diviner
Joined
Sep 3, 2011
Messages
404
Reaction score
100
Use the one of SlimShady95.
If you use cookies then you need to add $_COOKIE too.


I don't know about this scripts (Those codes are new for me)

Can you say where must i exactly copy scripts (to db_MYSQL.php?) and where must i call that functions that i copied ?

In which part i must add $_COOKIE ?

Can anyone of you give me an intelligible tutorial ?

wow it's new for me

---------- Post added at 07:05 PM ---------- Previous post was at 05:26 PM ----------

OK, If there is no more guidance then np :)
 
Skilled Illusionist
Joined
Feb 22, 2010
Messages
367
Reaction score
46
There is always going to be ways to get hacked. SQL inject on server more than ever. Even more on servers running travianX. Not because it is bad coding but because the script is not 100% and all the loops and stuff (I don't know what to call it) have not been closed. Meaning that there is always going to be somewhere that you can get SQL injected until the script is finished and people start focusing on not getting hacked and actually fix all the opening that allow SQL injection.
 
Status
Not open for further replies.
Back
Top