Surprise! We've been running on hardware provided by BuyVM for a few months and wanted to show them a little appreciation.
Running a paste site comes with unique challenges, ones that aren't always obvious and hard to control. As such, BuyVM offered us a home where we could worry less about the hosting side of things and focus on maintaining a clean and useful service! Go check them out and show them some love!
Description: 28 Digit Generator
Submitted on September 13, 2024 at 06:14 AM
Expires on September 13, 2025 at 06:14 AM (11 months from now)

28digitgen.py (Python)

def generate_28_digit_numbers():
    # Ask the user for the first 24 digits
    base_number = input("Enter the first 24 digits: ")

    # Check if the input is 24 digits long and numeric
    while len(base_number) != 24 or not base_number.isdigit():
        print("The input must be exactly 24 digits.")
        base_number = input("Enter the first 24 digits: ")

    # Ask the user for the filename
    file_name = input("Enter the file name (without extension): ") + ".txt"

    # Open the file in write mode
    with open(file_name, 'w') as file:
        # Loop through 0000 to 9999
        for i in range(10000):
            # Create a 4-digit number with leading zeros if necessary
            suffix = f"{i:04d}"
            # Concatenate the 24-digit base with the 4-digit suffix
            full_number = base_number + suffix
            # Write the 28-digit number to the file followed by a comma and space
            file.write(full_number + ", ")

    print(f"File '{file_name}' has been created with 10,000 28-digit numbers.")

# Run the function
generate_28_digit_numbers()