Group Details Private

administrators

  • RE: User Reconciliation Automation with Python and ChatGPT

    Updated the script to include the source header names in the output!

    import os
    import csv
    import re
    import pandas as pd
    
    # Set the path to the folder containing the CSV files
    path = os.path.dirname(__file__)
    
    # Initialize a list to store the data from each CSV file
    data = []
    
    # Iterate through each file in the folder
    for filename in os.listdir(path):
        # Check if the file is a CSV file
        if filename.endswith('.csv'):
            # Open the file and read the data
            with open(os.path.join(path, filename), 'r') as f:
                reader = csv.reader(f)
                file_data = list(reader)  # Store the file data in a list
            # Check if the first row starts with "#TYPE", if so, skip it
            if file_data[0][0].startswith("#TYPE"):
                file_data = file_data[1:]
            # Get the headers
            headers = file_data[0]
            # Initialize a list to store the email column indices
            email_columns = []
            # Iterate through the columns to find the email columns
            for i, header in enumerate(headers):
                    column_data = [row[i] for row in file_data[1:]]
                    # Check if any of the values in the column are valid email addresses
                    for value in column_data:
                        if re.match(r'[^@]+@[^@]+\.[^@]+', value):
                            email_columns.append(i)
                            break  # No need to check the rest of the values in this column
            # If there is more than one email column, prompt the user to choose one
            if len(email_columns) > 1:
                print(f'Multiple email columns found in {filename}:')
                for i, header in enumerate(headers):
                    if i in email_columns:
                        print(f'{i}: {header}')
                email_column = int(input('Please select the email column by entering the corresponding number: '))
            elif len(email_columns) == 1:
                # If there is only one email column, use that one
                email_column = email_columns[0]
            else:
                # If there are no email columns, skip this file
                print(f'No email columns found in {filename}, skipping...')
                continue
            # Extract the email column data from the file
            file_data = [[row[email_column], f'{filename}-{headers[email_column]}', filename] for row in file_data[1:]]
            # Add the data from this file to the list
            data.extend(file_data)
    
    # Create a results subfolder if it doesn't already exist
    results_path = os.path.join(path, 'results')
    if not os.path.exists(results_path):
        os.makedirs(results_path)
    
    #Write the data to a CSV file in the results folder
    with open(os.path.join(results_path, 'emails.csv'), 'w', newline='') as f:
        writer = csv.writer(f)
        writer.writerows(data)
    
    #Read the CSV file into a pandas DataFrame
    with open(os.path.join(results_path, 'emails.csv'), 'r') as f:
        first_line = f.readline().strip()
        if first_line.startswith("#TYPE"):
            df = pd.read_csv(f, names=['email', 'source', 'filename'], skiprows=[0])
        else:
            df = pd.read_csv(os.path.join(results_path, 'emails.csv'), names=['email', 'source', 'filename'])
    
    #Create the pivot table
    pivot_table = df.pivot_table(index='email', columns='source', aggfunc='size')
    
    #Add a column showing the total number of accounts for each email address
    pivot_table['total'] = pivot_table.sum(axis=1)
    
    #Output the pivot table to a CSV file in the results folder
    pivot_table.to_csv(os.path.join(results_path, 'pivot_table.csv'))
    
    print('Done!')
    
    
    posted in Python
  • Flipper Out of Stock? - This script will check the site every hour
    import requests
    from bs4 import BeautifulSoup
    import time
    from fake_useragent import UserAgent
    
    ua = UserAgent()
    
    while True:
        try:
            #create headers
            headers = {'User-Agent': ua.random}
            time.sleep(0)
            # Download the website's HTML
            response = requests.get("https://shop.flipperzero.one/", headers=headers)
            response.raise_for_status()
            html = response.text
    
            # Use BeautifulSoup to parse the HTML
            soup = BeautifulSoup(html, 'html.parser')
    
            # Check for the presence of "SOLD OUT"
            if soup.find("span", text="Sold out"):
                print("SOLD OUT still appears on the website.")
            else:
                print("SOLD OUT no longer appears on the website!")
        except requests.exceptions.RequestException as e:
            # handle error
            print(f'Error: {e}')
        except Exception as e:
            # handle other errors
            print(f'Error: {e}')
        finally:
            # Sleep for 1 hour
            time.sleep(60*60)
    
    
    posted in Python
  • RE: User Reconciliation Automation with Python and ChatGPT

    Excellent work, I've been meaning to do that for years...

    posted in Python
  • RE: Sponsorship Opportunities

    What a great idea 😄

    posted in Cybersecurity Forums
  • Is anybody out there?

    It's you im looking for

    posted in Adminz Only
  • Text2 AI - Beta Open!

    Text2 AI is a new tool for interacting with AI models.

    b6be4a61-5395-488b-b09c-ce4d683fbf3d-image.png
    Please let it speak for itself by visiting www.text2ai.com

    Best,
    Ryan

    posted in Announcements
  • Beta Test

    At Text2AI, we are embarking on an ambitious journey to revolutionize the way we interact with AI through the creation of an SMS endpoint and web-based dashboard. Our platform allows for seamless fine-tuning and control of interactions with various AI models and chatbot-style functionality, expertly blended with the power of advanced AI.

    Our founder, Ryan Decker, brings a wealth of experience in the field, having established Webhosting Thats Fun as a leading player in the industry. With a passion for innovation and a drive to push the boundaries of what's possible, Ryan has set Text2AI on a path to success.

    If you're excited about the possibilities of this cutting-edge technology and want to be part of shaping its future, we invite you to join us in beta testing. Visit our website at www.text2ai.com and discover how Text2AI can help you take your AI interactions to the next level. And don't forget to check out Webhosting Thats Fun (webhostingthatsfun.com) to see more of Ryan Decker's outstanding work

    posted in Text2 AI
  • RE: Search

    I enabled the search functionality. Please let me know if you have any feedback or notice any issues.

    posted in Announcements
  • RE: Flipper Zero - A pentester's swiss army knife

    This thing looks so cool. But how do you test consumption? (ha ha)

    posted in Assessments | Penetration Testing