//get distinct passwords $string = "password"; multiip_showBetween($string); $passwords = multiip_getDistinct_($string); //check each password foreach ($passwords as $pass) { $users = multiip_check_($pass, $string); if (sizeof($users) > 1) { multiip_log("%s: (%s)", $pass, implode(',', $users)); } } /**PollID**/ //get distinct pollIDs $string = "pollID"; multiip_showBetween($string); $pollIDs = multiip_getDistinct_($string); //check each pollID foreach ($pollIDs as $poll) { $users = multiip_check_($poll, $string); if (sizeof($users) > 1) { multiip_log("%s: (%s)", $poll, implode(', ', $users)); } } // ***** FUNCTIONS ***** ******************************************************* /** * Shows usage */ function multiip_usage() { echo "Usage: php login_multi_ip.php [-d] [-h] [-t time_interval]\n" . " -d Debug\n" . " -h This help\n" . " -t time_interval Only consider ips of the last time_interval hours\n"; }
//get distinct passwords $string = "password"; multiip_showBetween($string); $passwords = multiip_getDistinct_($db_login, $string); //check each password foreach ($passwords as $pass) { $users = multiip_check_($db_login, $pass, $string); if (sizeof($users) > 1) { multiip_log("%s: (%s)", $pass, implode(',', $users)); } } /**PollID**/ //get distinct pollIDs $string = "pollID"; multiip_showBetween($string); $pollIDs = multiip_getDistinct_($db_login, $string); //check each password foreach ($pollIDs as $poll) { $users = multiip_check_($db_login, $poll, $string); if (sizeof($users) > 1) { multiip_log("%s: (%s)", $poll, implode(',', $users)); } } // ***** FUNCTIONS ***** ******************************************************* /** * Shows usage */ function multiip_usage() { echo "Usage: php login_multi_ip.php [-d] [-h] [-t time_interval]\n" . " -d Debug\n" . " -h This help\n" . " -t time_interval Only consider ips of the last time_interval hours\n"; }