nyxgeek / onedrive_user_enum

onedrive user enumeration - pentest tool to enumerate valid o365 users
GNU General Public License v3.0
621 stars 78 forks source link

Avoid duplicating emails in export file #10

Open incogbyte opened 1 year ago

incogbyte commented 1 year ago

Updated the export_sql_users function to prevent duplicate emails from being written into the export file.

Previously, the function was overwriting the file and writing all the emails fetched from the database, regardless of whether they already existed in the file.

The function now checks if the file exists, reads all existing emails into a set, and only writes emails that do not already exist in the file. The file is now opened in append mode to preserve existing emails.

This change optimizes the export process and avoids unnecessary duplication of data, i think 📦