How to find hackers in your server (The easiest ways)
#2

Here is a much shorter one(plus your has some problems for instance a_count does not exist)

DROP PROCEDURE IF EXISTS check_inventory;
CREATE PROCEDURE check_inventory()
BEGIN
-- init stuff
SET @i = 0;
SET @str_inven = "t_inven0";
SET @str_count = "a_count";
-- for every table
WHILE @i <= 9 DO
SET @t_inven = CONCAT(@str_inven, @i);
SET @j = 0;
-- for every columns
WHILE @j <= 4 DO
SET @a_count = CONCAT(@str_count, @j);
-- prepare statemets and execute it
SET @q = CONCAT("UPDATE ",@t_inven, " SET ", @a_count, " = 0 WHERE ", @a_count, " > 10000000000;");
PREPARE stmt FROM @q; EXECUTE stmt; DEALLOCATE PREPARE stmt;
SET @j = @j + 1;
END WHILE;
SET @i = @i + 1;
END WHILE;
END;

CALL check_inventory();



Messages In This Thread
[No subject] - by slayer1 - 07-06-2012, 02:03 AM
[No subject] - by someone - 07-06-2012, 11:24 AM
[No subject] - by slayer1 - 07-06-2012, 03:34 PM
[No subject] - by Blackfire - 08-06-2012, 06:29 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)