This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Sophos Duplicate IDs

I just wanted to share the perl script i wrote to find duplciate unique IDs in Sophos. It scans the IIS logs looking for duplicate GUIDs.

#Stephen
#Check for Duplicates
use Data::Dumper;
$file = "\\\\sophos-c108-01\\W3SVC1\\u_ex110822.log";
my %hash = ();
my %hDup = ();
open FILE, $file or die $!;
while (<FILE>)
{ 
@data = ($_ =~ /(\b143\.55\.\d{1,3}\.\d{1,3}\b).*?(\b143\.55\.\d{1,3}\.\d{1,3}\b).*?(\{{0,1}[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\}{0,1})/);
#print $data[0] . "\n";
if ((exists $hash{$data[2]}) && ($hash{$data[2]} ne $data[1]))
{
if(not exists $hDup{$data[1]})
{
print $data[1] . "\n";
$hDup{$data[1]} = $data[1];
}
}
else
{
$hash{$data[2]} = $data[1];
}
}
close(FILE); 

I have more info on my blog about it.

http://www.stephenjc.com/2011/08/23/sophos-duplicate-ids/

:20691


This thread was automatically locked due to age.
Parents
  • I see the trick... but I don't feel quite at ease yet to apply your solution... 

    I've not even played with SQL queries, let alone DELETE !!

    Could you give me a query that will list IDs and names (or IPs) at first ? Or did I miss something and that is not possible ?

    Our problem is "just" to locate those PCs, really. There can't be that many for the moment. And we know what we did wrong (cloning and let go).

    Thanks.

    :36975
Reply
  • I see the trick... but I don't feel quite at ease yet to apply your solution... 

    I've not even played with SQL queries, let alone DELETE !!

    Could you give me a query that will list IDs and names (or IPs) at first ? Or did I miss something and that is not possible ?

    Our problem is "just" to locate those PCs, really. There can't be that many for the moment. And we know what we did wrong (cloning and let go).

    Thanks.

    :36975
Children
No Data