<commit_before>from glob import glob
from hashlib import sha1

from canaryd_packages import six

from canaryd.plugin import Plugin

BUFFER_SIZE = 65536
PATHS_TO_TRACK = (
    '/etc/passwd',
    '/etc/group',
    '/etc/shadow',
    '/etc/sudoers',
    '/sbin/*',
    '/bin/*',
)


def get_file_hash(filename):
    sha = sha1()

    with open(filename, 'rb') as f:<commit_msg>Checksum all of `/etc`, `/boot` and `/dev`.<commit_after>from glob import glob
from hashlib import sha1

from canaryd_packages import six

from canaryd.plugin import Plugin

BUFFER_SIZE = 65536
PATHS_TO_TRACK = (
    '/etc/*',
    '/sbin/*',
    '/bin/*',
    '/boot/*',
    '/dev/*',
)


def get_file_hash(filename):
    sha = sha1()

    with open(filename, 'rb') as f:
{'fraction_non_alphanumeric': 0.15167785234899328, 'fraction_numerical': 0.01879194630872483, 'mean_word_length': 3.098901098901099, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5753322', 'n_tokens_mistral': 286, 'n_tokens_neox': 271, 'n_words': 72}