def get_peid_db():
    ''' Grab the peid_userdb.txt file from local disk '''

    # Try to find the yara rules directory relative to the worker
    my_dir = os.path.dirname(os.path.realpath(__file__))
    db_path = os.path.join(my_dir, 'peid_userdb.txt')
    if not os.path.exists(db_path):
        raise RuntimeError('peid could not find peid_userdb.txt under: %s' % db_path)

    # Okay load up signature
    signatures = peutils.SignatureDatabase(data = open(db_path, 'rb').read())
    return signatures
dataset/ETHPy150Open SuperCowPowers/workbench/workbench/workers/pe_peid.py/get_peid_db/original