View Single Post
  #2  
Old 09-23-2004, 06:56 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rinkrat
This was a great way to spot dupe accounts but now it doesn't work because things have changed with VB. Can someone update it to work with v3.03?? PLEASE

Code:
<?php
error_reporting(7);

require("./global.php");

cpheader();

echo "<a href='#'>[duplicate ip addresses]</a> | <a href='#pass'>[duplicate passwords]</a>";

$q1 = mysql_query("SELECT ipaddress, count(*) as cnt FROM user GROUP BY ipaddress HAVING cnt > 1 ORDER BY ipaddress");
echo mysql_error();
while(list($ip) = mysql_fetch_array($q1)) {
	if ($ip <> "") {
	$x .= "'$ip',";
	}
}
$x .= "'XXX'";
mysql_free_result($q1);
$qtwo = mysql_query("SELECT u.userid, u.username, u.password, u.ipaddress, u.posts, u.lastvisit,ug.canpostnew
FROM user u
LEFT JOIN usergroup ug ON ug.usergroupid = u.usergroupid
WHERE u.ipaddress IN ($x)
ORDER BY u.ipaddress, u.password, u.posts");
echo mysql_error();
echo "<h1>Duplicate IP Addresses</h1><table border=\"0\" cellspacing=\"0\" cellpadding=\"3\"><tr><td align=center><b><u>Username</u></b></td><td align=center><b><u>Encrypted password</u></b></td><td align=center><b><u>IP</u></b></td><td align=center><b><u>Posts</u></b></td><td align=center><b><u>Last Visit</u></b></td></tr>";
while(list($id, $user,$pass,$ip,$posts,$lastvisit,$canpostnew) = mysql_fetch_array($qtwo)) {
	if ($ip <> $ip1) {
        if ($bgcolor == "#CCCCCC") {
                $bgcolor = "white";
        } else {
                $bgcolor = "#CCCCCC";
        }
        }	
	if ($pass == $passold) { $color = "red"; } else { $color = "black"; }
	$lastvisit = date("M j y, H:i:s",$lastvisit);
	
	$canpostnew = ($canpostnew) ? 'Yes' : 'No';
	$hostname = gethostbyaddr($ip);
	
	echo "<tr bgcolor=$bgcolor ><td style=\"font-size: smaller;\"><a href=\"../moderator.php?s=&action=useroptions&userid=$id\" >$user</a></td><td><font color=\"$color\" style=\"font-size: smaller;\">$pass</font></td><td >$hostname</td><td style=\"font-size: smaller;\">$posts</td><td style=\"font-size: smaller;\">$lastvisit</td><td style=\"font-size: smaller;\">$canpostnew</td><td style=\"font-size: smaller;\"><a href=\"user.php?s=&action=remove&userid=$id\">Remove</a></td></tr>";
	$ip1 = $ip;
}
echo "</table>";
$bgcolor = "";
$qthre = mysql_query("SELECT password, count(*) as cnt FROM user GROUP BY password HAVING cnt > 1 ORDER BY password");
echo mysql_error();
while(list($pwd) = mysql_fetch_array($qthre)) {
	$y .= "'$pwd',";
}
$y .= "'XXX'";
mysql_free_result($qthre);

$qfor = mysql_query("SELECT 	u.userid, u.username, u.password, u.ipaddress, u.posts, u.lastvisit,ug.canpostnew
FROM 		user u
    LEFT JOIN usergroup ug ON ug.usergroupid = u.usergroupid
WHERE 	u.password IN ($y) 
ORDER BY 	u.password, u.posts");
echo mysql_error();
echo "<a name=\"pass\"></a><h1>Duplicate Passwords</h1><table border=\"0\" cellspacing=\"0\" cellpadding=\"2\">";
$color = "black";
while(list($id, $user,$pass,$ip,$posts,$lastvisit,$canpostnew) = mysql_fetch_array($qfor)) {
	//if ($pass == $passold) { $color = "red"; } else { $color = "black"; }
        if ($pass <> $pass1) {
	if ($bgcolor == "#CCCCCC") {
		$bgcolor = "white";
	} else {
		$bgcolor = "#CCCCCC";
	}
	}
	$canpostnew = ($canpostnew) ? 'Yes' : 'No';
	$hostname = gethostbyaddr($ip);
	$lastvisit = date("M j y, H:i:s",$lastvisit);
	echo "<tr bgcolor=$bgcolor ><td style=\"font-size: smaller;\"><a href=\"../moderator.php?s=&action=useroptions&userid=$id\" >$user</a></td><td><font color=\"$color\" style=\"font-size: smaller;\">$pass</font></td><td >$hostname</td><td style=\"font-size: smaller;\">$posts</td><td style=\"font-size: smaller;\">$lastvisit</td><td style=\"font-size: smaller;\">$canpostnew</td><td style=\"font-size: smaller;\"><a href=\"user.php?s=&action=remove&userid=$id\">Remove</a></td></tr>";
	$pass1 = $pass;
}
echo "</table>";

cpfooter();
?>
Impossible to do it with passwords now without removing the new security features (not recomended at all). I think someone did release a hack that does work with IP's
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01278 seconds
  • Memory Usage 1,793KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete