Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-23-2004, 06:54 PM
rinkrat's Avatar
rinkrat rinkrat is offline
 
Join Date: Jan 2002
Location: Long Beach
Posts: 530
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Dupe IP's and passwords

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();
?>
Reply With Quote
  #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
  #3  
Old 09-23-2004, 06:59 PM
rinkrat's Avatar
rinkrat rinkrat is offline
 
Join Date: Jan 2002
Location: Long Beach
Posts: 530
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the quick response
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:05 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03440 seconds
  • Memory Usage 2,199KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete