-
-
Save boo1ean/7094b334fc1b4c56fd30 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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