Skip to content

Commit

Permalink
allow signatures w/o server set.
Browse files Browse the repository at this point in the history
  • Loading branch information
willscott committed Jan 2, 2017
1 parent d23ab37 commit bb47009
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cluster_correlation/domain_signature.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ var a_output = process.argv[6];
var ip2asn = JSON.parse(fs.readFileSync(a_lookup));
ip2asn.lookup = ip2country.lookup.bind({}, ip2asn);
var ptrs = jsonlinesloader.load(a_ptrs);
var servers = jsonlinesloader.load(a_servers);
var servers = {};
if (fs.existsSync(a_servers)) {
servers = jsonlinesloader.load(a_servers);
}

var getSignature = function(output, domLine) {
if (!domLine.length) {
Expand Down Expand Up @@ -156,7 +159,9 @@ var printStats = function(domains) {
if (domains[dom].length == 0) {
types.UNKNOWN += 1;
} else {
types[domains[dom][0]] += 1;
domains[dom].forEach(function(el) {
types[el[0]] += 1;
});
}
});

Expand Down

0 comments on commit bb47009

Please sign in to comment.