Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neo4j-driver 4+ issues #6

Open
mox1 opened this issue Oct 15, 2020 · 1 comment · May be fixed by #9
Open

Neo4j-driver 4+ issues #6

mox1 opened this issue Oct 15, 2020 · 1 comment · May be fixed by #9

Comments

@mox1
Copy link

mox1 commented Oct 15, 2020

Attempting to install / run this on current versions of neo4j / neo4j-driver presents a host of issues. Unfortunately its not a super quick fix.

neo4j-driver (python package) has removed the neo4j.v1 package. This is relatively easy to fix. simply change
from neo4j.v1 import GraphDatabase to
from neo4j import GraphDatabase

The next issue is that the {arg} format of passing variables in database queries has been depreciated. We need to use $arg.

This needs to be fixed in multiple places, but as an example (init.py line ~106):

q = "MATCH (n:%s {name: {name}}) RETURN n"
with database.driver.session() as session:
   fromres = session.run(q % args.from_type.capitalize(), name=from_object)

Must change to;

q = "MATCH (n:%s {name: $name}) RETURN n"
with database.driver.session() as session:
   fromres = session.run(q % args.from_type.capitalize(), name=from_object)

Finally, the REST API has been removed. This is the tough one, as I'm not sure how to fix. See pathfinding.py:dijkstra_find()

This is just an FYI for anyone attempting to install using recent packages / versions of things.

@mox1
Copy link
Author

mox1 commented Oct 15, 2020

Update, the following lines will install the correct versions of things to get aclpwn to run. Note that this isn't always going to work as other pip packages (crackmapexec for example) require neo4j-driver > 4.0.0. I recommend running these commands in a fresh virtualenv.

ALSO, you need to have your actual databse of neo4j < version 4 or this won't work.

python -m pip install 'neo4j-driver==1.7.0' --force-reinstall
python -m pip install 'neo4j==1.7.0' --force-reinstall
python -m pip install -U ldap3  
python -m pip install aclpwn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant