Cleanup neo4j support

pull/30/head
Raphaël Vinot 2016-10-27 15:58:08 -04:00
parent abd836babb
commit 2907fd18d7
2 changed files with 4 additions and 3 deletions

View File

@ -13,10 +13,12 @@ if __name__ == '__main__':
parser.add_argument("--host", default='localhost:7474', help="Host where neo4j is running.")
parser.add_argument("-u", "--user", default='neo4j', help="User on neo4j.")
parser.add_argument("-p", "--password", default='neo4j', help="Password on neo4j.")
parser.add_argument("-d", "--deleteall", action="store_true", default=False, help="Delete all nodes from the database")
args = parser.parse_args()
neo4j = Neo4j(args.host, args.user, args.password)
neo4j.del_all()
if args.deleteall:
neo4j.del_all()
misp = PyMISP(misp_url, misp_key)
result = misp.search_all(args.search)
for json_event in result['response']:

View File

@ -32,8 +32,7 @@ class Neo4j():
def import_event(self, event):
tx = self.graph.begin()
event_node = Node('Event', uuid=event.uuid)
event_node['name'] = event.info
event_node = Node('Event', uuid=event.uuid, name=event.info)
# event_node['distribution'] = event.distribution
# event_node['threat_level_id'] = event.threat_level_id
# event_node['analysis'] = event.analysis