Skip to content

SOAPy seems not to deal well with large ADs with AD principals that have unusual characters in their names #10

Description

@johnmccash

Getting the following error when attempting to dump. I suspect this is due to insufficient escaping of unusual characters found in AD principal names.

┌──(root㉿)-[/home/]

└─# echo "START TIME groups: " | tee -a groups.txt

echo $(date +"%DT%T.%4NZ") | tee -a groups.txt

echo | tee -a groups.txt

/home//.local/share/pipx/venvs/soapy/bin/soapy /:$@ --groups | tee -a groups.txt

echo "END TIME groups: " | tee -a groups.txt

echo $(date +"%DT%T.%4NZ") | tee -a groups.txt

START TIME groups:

03/20/26T20:23:02.4976Z

███████╗ ██████╗ █████╗ ██████╗ ██╗ ██╗

██╔════╝██╔═══██╗██╔══██╗██╔══██╗╚██╗ ██╔╝

███████╗██║ ██║███████║██████╔╝ ╚████╔╝

╚════██║██║ ██║██╔══██║██╔═══╝ ╚██╔╝

███████║╚██████╔╝██║ ██║██║ ██║

╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝

[*] Connecting to for Enumeration

Traceback (most recent call last):

File "/home//.local/share/pipx/venvs/soapy/bin/soapy", line 7, in

sys.exit(run_cli())

         ~~~~~~~^^

File "/home//.local/share/pipx/venvs/soapy/lib/python3.13/site-packages/src/soa.py", line 553, in run_cli

client.pull(current_query, attributes, print_incrementally=True)

~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/home//.local/share/pipx/venvs/soapy/lib/python3.13/site-packages/src/adws.py", line 716, in pull

et, more_results = self._pull_results(

                   ~~~~~~~~~~~~~~~~~~^

    remoteName=self._fqdn, nmf=self._nmf, enum_ctx=enum_ctx

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

)

^

File "/home//.local/share/pipx/venvs/soapy/lib/python3.13/site-packages/src/adws.py", line 396, in _pull_results

et = self._handle_str_to_xml(pullResponse)

File "/home//.local/share/pipx/venvs/soapy/lib/python3.13/site-packages/src/adws.py", line 423, in _handle_str_to_xml

return ElementTree.fromstring(xmlstr)

       ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^

File "/usr/lib/python3.13/xml/etree/ElementTree.py", line 1342, in XML

parser.feed(text)

~~~~~~~~~~~^^^^^^

xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 52639

END TIME groups:

03/20/26T20:23:03.6591Z

Also getting a different error sometimes which may or may not be related. Might be associated with a large amount of data being requested?

src.adws.ADWSError: Active Directory returned an error processing the operation.<ns0:Detail xmlns:ns0="[http://www.w3.org/2003/05/soap-envelope"](http://www.w3.org/2003/05/soap-envelope%22](http://www.w3.org/2003/05/soap-envelope%22)) xmlns:ns1="[http://schemas.microsoft.com/2008/1/ActiveDirectory">](http://schemas.microsoft.com/2008/1/ActiveDirectory%22%3E](http://schemas.microsoft.com/2008/1/ActiveDirectory%22%3E))

ns1:FaultDetail

ns1:DirectoryError

ns1:MessageThe server is unavailable.</ns1:Message>

ns1:ErrorCode52</ns1:ErrorCode>

ns1:ExtendedErrorMessageThe server is unavailable.</ns1:ExtendedErrorMessage>

ns1:Win32ErrorCode8207</ns1:Win32ErrorCode>

ns1:ShortMessageEDirectoryOperation</ns1:ShortMessage>

</ns1:DirectoryError>

</ns1:FaultDetail>

</ns0:Detail>

NTAC:3NS-20

CONFIDENTIALITY NOTICE: This communication is confidential, may be privileged and is meant only for the intended recipient. If you are not the intended recipient, please notify the sender ASAP and delete this message from your system.

Please read our Privacy Notice to learn about how we use the personal information you provide and the rights you have in relation to it.

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