Skip to content

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

Description

@TheToddLuci0

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions