Greetings o enlightened ones,
A new problem has presented itself, apparently some users, register more than once, and use that, to bypass restrictions, and abuse our site. I'd like to be able to score similarities in user data, by comparing the values per each userid. and assigning points for each match, or similarity. like spam assasin, for an instance if the secret question/answer combo matched that would be 2 points, or same password and similar username, and so forth. I'm not real sure, how to handle comparing the values of each userid to the rest, just sound very resource intensive, and clumsy. this give or take is the format that I'd like to use, but what next?
#!/usr/bin/perl + + use warnings; use strict; use DBI; + + my ($db,$sql,%shady,$query,$c,$count,$userid); + + $sql = "select userid, firstname, lastname, password, username, dob, z +ipcode, age, remotehost, ut, secret_question, secret_answer from user +s where status='ok' limit 5;"; $db = DBI->connect("DBI:mysql:database=my_user_table;host=db_server"," +mysqluser","",{RaiseError=>0}); if ( !$db ) { print "Cannot contact db_server, bypassing."; } $count=0; $query = $db->prepare($sql); $query->execute(); while ($c = $query->fetchrow_hashref) { $count++; $userid=$c->{"userid"}; $shady{$userid}->{firstname}=$c->{"firstname"}; $shady{$userid}->{lastname}=$c->{"lastname"}; $shady{$userid}->{password}=$c->{"password"}; $shady{$userid}->{username}=$c->{"username"}; $shady{$userid}->{dob}=$c->{"dob"}; $shady{$userid}->{zipcode}=$c->{"zipcode"}; $shady{$userid}->{age}=$c->{"age"}; $shady{$userid}->{remotehost}=$c->{'remotehost'}; $shady{$userid}->{ut}=$c->{"ut"}; $shady{$userid}->{secret_question}=$c->{"secret_question"}; $shady{$userid}->{secret_answer}=$c->{"secret_answer"}; } $db->disconnect();


Of course, I'd also be getting info from other tables, etc.. Any ideas, and/or suggestions would be appreciated.

Regards:
~vili

In reply to Identifying fraudulent users, by comparing values in database. with a hash..? by vili

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.