Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this is a warning... please follow as i have stated... thinking you know better and can ignore what i say can leave your sql damaged, all bans removed, and it banning everyone.... EVER!
- READ EVERYTHING BEFORE ATTEMPTING, MAKE SURE YOU UNDERSTAND WHAT YOU ARE DOING BEFORE YOU DO IT, IF UNSURE, FUCKING ASK.....
- any damaged caused by running this script without following what i have stated is not my problem, .... <13.4>
- here is the code... save it, but dont run it...
- <?php
- require 'config.php';
- require KU_ROOTDIR . 'inc/functions.php';
- if (isset($_GET["start"])) {
- $tc_db->Execute("ALTER TABLE `" . KU_DBPREFIX . "banlist` ADD `checked` INT NOT NULL DEFAULT '0'");
- }
- $results = $tc_db->GetAll("SELECT * FROM `" . KU_DBPREFIX . "banlist` WHERE `checked` =0");
- foreach ($results as $line) {
- $ip = md5_decrypt($line['ip'], KU_RANDOMSEED);
- $ipcheck = substr($ip, -1);
- while ($ipcheck == "*") {
- $ip = substr($ip, 0, -2);
- $ipcheck = substr($ip, -1);
- }
- $ip = $ip . ".";
- $ip = md5_encrypt($ip, KU_RANDOMSEED);
- $tc_db->Execute("UPDATE `" . KU_DBPREFIX . "banlist` SET `ipmd5` = '" . $ip . "', `checked` = '1' WHERE `id` =" . $line['id'] . ";");
- }
- $tc_db->Execute("ALTER TABLE `" . KU_DBPREFIX . "banlist`DROP `checked`;");
- echo "your done!! stop running this script and delete it...";
- ?>
- now you must run it with the arg "start=1" when you first run it... after that you run it normally...
- i.e,
- (ipconvert.php is the name i saved it under, change it if you saved it under something else)
- you run it first like this: http://derpmydomain.com/ipconvert.php?start=1
- you will most likely get a blank screen after a long time of loading, or a warning saying your over the time limit/timed out... THIS IS NORMAL
- after that, you run it normally without any args, like so : http://derpmydomain.com/ipconvert.php
- now, keep on running it normally untill you see this message: "your done!! stop running this script and delete it..."
- you now double check that it has converted the bans, if its not done them all, you must try again, using the "?start=1" arg first time, then without the rest
- depending on how many bans you have, depends on how long it will take, if you have 2k bans, you may have to run it a few times (about 40 times :( )
- :)
Advertisement
Add Comment
Please, Sign In to add comment