Altitude Game: Forums  

Go Back   Altitude Game: Forums > Altitude Discussion > General Altitude Discussion
FAQ Community Calendar

General Altitude Discussion Discuss anything Altitude related that doesn't belong in another forum.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-23-2009, 06:30 PM
tec27 tec27 is offline
Super Moderator
 
Join Date: Apr 2009
Posts: 178
Default Gargamel - Smurf Detection Script

I've completed the smurf detection script I was working on yesterday, and I figured someone else may find it useful so I've decided to post it here. For those who don't know, smurfs are basically people playing under names that are not their originals. This script detects vaporId's that are associated with multiple names or IP addresses and names that are associated with multiple vaporId's. This should find every instance of someone playing under multiple names (and also generates false positives for multiple people playing from the same network, but that is easily manually checked).

Anyway, here's the script:
http://avantageous.com/gargamel.rb

It's written in ruby, so you'll obviously need to have that installed to use it. Using it is fairly simple, just pass it the path to your Altitude log directory (and maybe redirect its output to a file, cause its fairly long). After that it'll run through all your log files and analyze them for you.

I plan on updating it soon to allow specifying a time range to limit analysis to, and I'll let you guys know when that happens.

Note: this script is intended for use by people running servers, not people who only use the client.

Last edited by tec27; 07-23-2009 at 06:33 PM.
Reply With Quote
  #2  
Old 07-23-2009, 08:02 PM
DiogenesDog DiogenesDog is offline
Super Moderator
 
Join Date: May 2008
Posts: 1,016
Default

awesome name for this utility.
Reply With Quote
  #3  
Old 07-23-2009, 08:22 PM
Vi* Vi* is offline
Super Moderator
 
Join Date: May 2008
Posts: 468
Send a message via AIM to Vi*
Default

ahahhaa I agree with Dio
Reply With Quote
  #4  
Old 07-23-2009, 09:38 PM
phong phong is offline
Senior Member
 
Join Date: Jul 2009
Location: Chicago
Posts: 372
Default

Wouldn't it be easier to just script it in a bash or bat file? There are plenty of built in utilities to parse logs like this without having to install ruby
Reply With Quote
  #5  
Old 07-23-2009, 09:52 PM
Rechtschaffen Rechtschaffen is offline
Senior Member
 
Join Date: Jun 2009
Posts: 155
Default

Quote:
Originally Posted by phong View Post
Wouldn't it be easier to just script it in a bash or bat file? There are plenty of built in utilities to parse logs like this without having to install ruby
Well, I'd just jack it into the codematrix and reconfigulate it as FORTRAN 2000.
Reply With Quote
  #6  
Old 07-23-2009, 10:06 PM
phong phong is offline
Senior Member
 
Join Date: Jul 2009
Location: Chicago
Posts: 372
Default

If fortan still ran natively I'd give it thumbs up

Last edited by phong; 07-23-2009 at 10:18 PM.
Reply With Quote
  #7  
Old 07-23-2009, 10:16 PM
phong phong is offline
Senior Member
 
Join Date: Jul 2009
Location: Chicago
Posts: 372
Default

Script to pull all the ip connections per vaporid, could easily add names as well. I'm pretty sure lam will have a fix for nicknames soon.

Code:
#!/bin/sh
# ipscan.sh
# Usage: ipscan.sh ServerLogFile

tmpfile=$RANDOM".tmp";

grep 'Handling join request' $1 | awk '{ print $11 }' | sed 's/.*\(vaporId=\)//' | sed 's/,//' | sort -u > $tmpfile

exec 3<&0
exec 0<$tmpfile

while read line
do
        echo "Vapor ID: "$line
        echo "################## IP Connections ######################"
        grep 'Handling join request' $1 | grep $line | awk '{ print $9}' | sed 's/\([^.]*\.[^.]*\.[^.]*\)\..*/\1/' | sort -u
        echo "##################### Nicknames ########################"
        grep 'Handling join request' $1 | grep $line | sed 's/.*\(nickName=\)//' | sed 's/\(, loggedIn=\).*//' | sort -u
        echo ""
done
exec 0<&3

# Cleanup
rm $tmpfile;
exit 0
edit - added nicknames also. This could be cleaned up more but I'm bad with sed.

Last edited by phong; 07-23-2009 at 10:29 PM.
Reply With Quote
  #8  
Old 07-24-2009, 12:54 AM
ham ham is offline
Member
 
Join Date: Dec 2008
Posts: 93
Default

oh my god, the name is hilarious
Reply With Quote
  #9  
Old 07-24-2009, 10:58 AM
Rechtschaffen Rechtschaffen is offline
Senior Member
 
Join Date: Jun 2009
Posts: 155
Default

Quote:
Originally Posted by ham View Post
oh my god, the name is hilarious
Correction: the name is 'Gargamel'.
Reply With Quote
  #10  
Old 07-24-2009, 05:36 PM
mikesol mikesol is offline
Super Moderator
 
Join Date: Jul 2009
Location: Portland, OR
Posts: 2,183
Default

I appreciate the fact there's another Ruby programmer out there - I have met very few people who do anything in Ruby.
Reply With Quote
  #11  
Old 07-24-2009, 08:55 PM
Triped Triped is offline
Senior Member
 
Join Date: May 2008
Posts: 597
Default

Quote:
Originally Posted by mikesol View Post
I appreciate the fact there's another Ruby programmer out there - I have met very few people who do anything in Ruby.
Well, not everyone likes sites that can't scale.
Reply With Quote
  #12  
Old 07-25-2009, 02:21 AM
tec27 tec27 is offline
Super Moderator
 
Join Date: Apr 2009
Posts: 178
Default

Quote:
Originally Posted by mikesol View Post
I appreciate the fact there's another Ruby programmer out there - I have met very few people who do anything in Ruby.
I haven't done very much in it. I fooled around with it a while back and I enjoyed using it, so I decided that this script was a good excuse to use it some more
Reply With Quote
  #13  
Old 07-25-2009, 03:30 AM
mikesol mikesol is offline
Super Moderator
 
Join Date: Jul 2009
Location: Portland, OR
Posts: 2,183
Default

Quote:
Originally Posted by Triped View Post
Well, not everyone likes sites that can't scale.
My girlfriend has spent the summer working on a ridiculously huge website with tons of databases and it's mostly done in Ruby. Ruby can scale if you know what you're doing =P
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 06:11 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
2008 Nimbly Games LLC