Max
Max copied to clipboard
DPAT query fails if both parts of the 'or' return something
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='[email protected]' 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='[email protected]' 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
[email protected] - 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
[email protected] - S-1-5-21-1214440339-1035525444-XXXXXXXXXX-25935