INNER CODE UNIT · Python

schema

idnahacks/GoodHound · goodhound/neodb.py:17

def schema(graph, args):
    """Optionally runs cypher statements to add attributes to nodes or edges."""
    try:
        with open(args.schema,'r') as schema_query:
            line = schema_query.readline()
            logging.info('Writing schema.')
            while line:
                graph.run(line)
                line = schema_query.readline()
        logging.info("Written schema!")        
    except:
        logging.warning("Error setting custom schema.")
        sys.exit(1)

def bloodhound41patch(graph):
    """Bloodhound 4.1 doesn't automatically tag non highvalue items with the attribute."""
    logging.info('Patching for Bloodhound 4.1')
    hvpatch="""match (n:Base) where n.highvalue is NULL set n.highvalue = FALSE"""

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…