Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- os.system("print f '\033]2;Email Sorter By Pentester708\a'")
- print('\033[92m' + 'Creator: Pentester708(Telegram)' + '\033[0m')
- with open('input.txt', 'r') as file:
- lines = file.readlines()
- emails_by_domain = {}
- for line in lines:
- email = line.strip()
- domain = email.split('@')[-1]
- if domain not in emails_by_domain:
- emails_by_domain[domain] = []
- emails_by_domain[domain].append(email)
- # Create a directory to store the output files
- if not os.path.exists('output'):
- os.makedirs('output')
- # Write the email addresses to separate files for each domain
- for domain, emails in emails_by_domain.items():
- filename = f'output/{domain}.txt'
- with open(filename, 'w') as file:
- file.write('\n'.join(emails))
- print(f'Saved {len(emails)} emails to {filename}')
Advertisement
Add Comment
Please, Sign In to add comment