Skip to content

Instantly share code, notes, and snippets.

@boo1ean
Created July 8, 2014 18:39
Show Gist options
  • Save boo1ean/7094b334fc1b4c56fd30 to your computer and use it in GitHub Desktop.
Save boo1ean/7094b334fc1b4c56fd30 to your computer and use it in GitHub Desktop.
var fs = require('fs');
var c = {};
fs.readFile('ips', function(err, data) {
var ips = data.toString().split('\n');
for (var i in ips) {
if (!c[ips[i]]) {
c[ips[i]] = 1
} else {
c[ips[i]]++;
}
}
var u = {};
for (var i in c) {
if (c[i] > 500) {
u[i] = c[i];
console.log(i);
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment