• XSS.stack #1 – первый литературный журнал от юзеров форума

Чем отсортировываете корпы из баз вида mail:pass ?

spice

RAID-массив
Пользователь
Регистрация
06.03.2021
Сообщения
56
Реакции
8
Всем привет форумчане!

Собственно интересует вопрос в теме. Чем отсортировываете корпы из баз вида mail:pass ?

Ведь нерационально такие базы ставить на чек смтп.

И второй вопрос. Может кто поделиться базой корп доменов?
 
i actually have a script that is supposed to do that although im not done working on it
this Python script reads through a list or file of email entries, checks each entry against a list of specified domains, and then separates the lines into two categories: filtered and retained.

Python:
import os
import logging

# Configure logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)

def load_tld_list(tld_file='filter_domains.txt'):
    """
    Loads the list of TLDs/domains to filter from a specified file.
    """
    if not os.path.exists(tld_file):
        logger.warning(f"{tld_file} not found. Creating an empty file for future updates.")
        open(tld_file, 'w').close()
        return set()

    with open(tld_file, 'r') as file:
        tlds = {line.strip().lower() for line in file if line.strip()}
    
    if not tlds:
        logger.warning("No TLDs specified for filtering.")
    
    return tlds

def process_emails(input_file='emails.txt', tld_file='filter_domains.txt', filtered_output='filtered_emails.txt', retained_output='retained_emails.txt'):
    """
    Processes the emails line by line, filtering out those matching specified TLDs.
    """
    # Load TLD list
    tld_list = load_tld_list(tld_file)

    # Check input file
    if not os.path.exists(input_file):
        logger.error(f"Input file '{input_file}' not found. Exiting.")
        return

    # Initialize lists to store filtered and retained lines
    filtered_lines = []
    retained_lines = []

    with open(input_file, 'r') as file:
        for line in file:
            line = line.strip()
            if not line:
                continue

            try:
                # Assuming email is the first item in a comma-separated line
                email = line.split(',')[0].strip()
                domain = email.split('@')[-1].lower()
                
                if any(tld in domain for tld in tld_list):
                    filtered_lines.append(line)
                    logger.debug(f"Filtered: {line}")
                else:
                    retained_lines.append(line)
            except IndexError:
                logger.warning(f"Skipping malformed line: {line}")

    # Write results to output files
    try:
        with open(filtered_output, 'w') as file:
            file.write('\n'.join(filtered_lines))
        logger.info(f"Filtered emails written to '{filtered_output}'")
    except IOError as e:
        logger.error(f"Error writing filtered output: {e}")

    try:
        with open(retained_output, 'w') as file:
            file.write('\n'.join(retained_lines))
        logger.info(f"Retained emails written to '{retained_output}'")
    except IOError as e:
        logger.error(f"Error writing retained output: {e}")

    # Summary
    logger.info(f"Processing complete. Total lines processed: {len(filtered_lines) + len(retained_lines)}")
    logger.info(f"Filtered emails: {len(filtered_lines)}, Retained emails: {len(retained_lines)}")

# Run the script
process_emails()
 
Есть софт под названием емейл тулс, кажется от разраба мейлеркинга. Там можно выставить фильтр по количеству вхождений домена в базе. К примеру можешь поставить не более 5 раз, это даст достаточно неплохую корп базу
 


Напишите ответ...
  • Вставить:
Прикрепить файлы
Верх