Fixes from today server hacking.

master
Zed A. Shaw 2 years ago
parent c41b965614
commit 120235b670
  1. 10
      02-filter-a-log-file/chains_parser/parser.js
  2. 2
      02-filter-a-log-file/chains_parser/reporter.js

@ -174,13 +174,15 @@ const parse_log_file = async (results, stats, file_name, errors) => {
parser.start(line); parser.start(line);
const data = parser.parse(); const data = parser.parse();
// skip lines that have content we don't care about
if(data.url.match(skip)) continue;
// convert the date to a only day length // convert the date to a only day length
const date_key = format(data.time, "yyyy-MM-dd"); const date_key = format(data.time, "yyyy-MM-dd");
// skip lines that have content we don't care about
if(data.url.match(skip)) {
stats.excluded += 1;
continue;
}
// get the date entry or a new one // get the date entry or a new one
const date_entry = results[date_key] || {}; const date_entry = results[date_key] || {};

@ -58,6 +58,8 @@ for(let key of keys) {
} }
} }
console.log("FROM", keys[0], "TO", keys[keys.length - 1]);
for(let [chain, counts] of Object.entries(by_chain)) { for(let [chain, counts] of Object.entries(by_chain)) {
if(counts.length > OPTS.maxDays) { if(counts.length > OPTS.maxDays) {
console.log(chain); console.log(chain);

Loading…
Cancel
Save