Created
May 9, 2024 01:02
-
-
Save dunderhay/e8a7faf552de119a034391f3baab563e to your computer and use it in GitHub Desktop.
Query roadrecon db for specific users
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from roadtools.roadlib.metadef.database import User | |
import roadtools.roadlib.metadef.database as database | |
session = database.get_session(database.init()) | |
pattern = r".*@example\.com$" | |
for user in session.query(User): | |
if user.mail and re.match(pattern, user.mail): | |
print(user.userPrincipalName) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment