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

DPAT query fails if both parts of the 'or' return something #29

Open
TheToddLuci0 opened this issue Oct 26, 2022 · 0 comments
Open

DPAT query fails if both parts of the 'or' return something #29

TheToddLuci0 opened this issue Oct 26, 2022 · 0 comments

Comments

@TheToddLuci0
Copy link
Contributor

Using the query option to run the command directly, we get nothing back if you run the full original command. If you split the command into sub-sections, they run fine. The end result of this in live usage is no users getting mapped for DPAT.

https://github.com/knavesec/Max/blob/master/max.py#L736

┌──(venv)─(notroot㉿devbox)-[~/git/Max]
└─$ python3 max.py query -q "MATCH (u:User) WHERE u.name='USERNAME@CORP.LOCAL' OR (u.name STARTS WITH 'USERNAME@' AND u.objectid ENDS WITH '-25935')  RETURN u.name,u.objectid" 
/home/notroot/git/Max/max.py:16: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.util import strtobool
                                                                                                                                                                                                                                            
┌──(venv)─(notroot㉿devbox)-[~/git/Max]
└─$ python3 max.py query -q "MATCH (u:User) WHERE u.name='USERNAME@CORP.LOCAL'  RETURN u.name,u.objectid" 
/home/notroot/git/Max/max.py:16: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.util import strtobool
USERNAME@CORP.LOCAL - S-1-5-21-1214440339-1035525444-XXXXXXXXXX-25935
                                                                                                                                                                                                                                            
┌──(venv)─(notroot㉿devbox)-[~/git/Max]
└─$ python3 max.py query -q "MATCH (u:User) WHERE u.name STARTS WITH 'USERNAME@' AND u.objectid ENDS WITH '-25935'  RETURN u.name,u.objectid" 
/home/notroot/git/Max/max.py:16: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.util import strtobool
USERNAME@CORP.LOCAL - S-1-5-21-1214440339-1035525444-XXXXXXXXXX-25935
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

No branches or pull requests

1 participant