Skip to content

Instantly share code, notes, and snippets.

@gboudreau
Created June 16, 2011 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gboudreau/1029255 to your computer and use it in GitHub Desktop.
Save gboudreau/1029255 to your computer and use it in GitHub Desktop.
This will allow you to check your contacts list to find if anyone had his account hacked by Lulzsec.
<?php
/*
This will allow you to check your contacts list to find if anyone had his account hacked by Lulzsec.
Instructions:
1. Download google.csv from google.com/contacts
Alternatively, export your address book in text format, and name the exported file google.csv
2. Download this file: http://pub.pommepause.com/LulzSec%20Latest%20Release.txt
3. Run this PHP script from the command line, from the directory where you saved google.csv and LulzSec Latest Release.txt:
php lulz_contacts_checker.php
*/
$contacts_file = file_get_contents('google.csv') or die("Can't open 'google.csv' for reading.\n");
$contacts = array();
foreach (explode("\n", $contacts_file) as $line) {
if (preg_match('/,([^,]+@[^,]+),/', $line, $regs)) {
$contacts[] = $regs[1];
}
}
$fp = fopen('LulzSec Latest Release.txt', 'r') or die("Can't open 'LulzSec Latest Release.txt' for reading.\n");
while (!feof($fp)) {
$email = trim(fgets($fp));
if (array_search($email, $contacts) !== FALSE) {
echo "Woho!!! $email had his email address & password leacked by lulzsec! You should tell him!\n";
}
}
echo "Done checking.\n";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment