Skip to content

Instantly share code, notes, and snippets.

@jeffvestal
Created January 24, 2023 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffvestal/92e748e8bea2f3d843b01fdfbc07f9e3 to your computer and use it in GitHub Desktop.
Save jeffvestal/92e748e8bea2f3d843b01fdfbc07f9e3 to your computer and use it in GitHub Desktop.
from faker import Faker
import random
import datetime
# Create an instance of the Faker class
faker = Faker()
# Define the number of logs
num_logs = 1000000
# Create a list to hold the logs
logs = []
# Define a list of card types
card_types = ['visa', 'mastercard', 'amex', 'discover']
for i in range(num_logs):
# Generate a random timestamp
timestamp = faker.date_time_between(start_date='-30d', end_date='now')
# Generate fake name
name = faker.name()
# Generate fake SSN
ssn = faker.ssn()
# Generate fake address
address = faker.address()
address = address.replace("\n", " ")
# Generate fake phone number
phone_number = faker.phone_number()
# Generate full Credit Card info
# Select a random card type
card_type = random.choice(card_types)
# Generate a credit card number with the selected card type
card_number = faker.credit_card_number(card_type=card_type)
card_number = card_number.replace("\n", " ")
# Create a log string
log = f'[{timestamp}] - {name} - {ssn} - {address} - {phone_number} - {card_type} - {card_number}'
#just print to stdout
print(log)
@jeffvestal
Copy link
Author

Sample FAKE output

[2023-01-20 15:22:38] - Vincent Harmon - 366-61-4443 - 18502 Mitchell Mountain Apt. 757 North Stevenmouth, IL 08732 - 001-049-504-3229x82796 - visa - 4185516356206890
[2023-01-06 06:29:01] - David Williams - 229-84-8777 - 67418 Richardson Square Suite 905 South Davidchester, ND 84419 - (650)972-1114 - amex - 343339432659371
[2023-01-10 23:25:09] - Mr. Roy Miller - 438-22-5519 - 3103 Sara Key Apt. 405 Carterville, GU 94367 - 252-939-7177x736 - visa - 4600590369796210
[2022-12-26 17:06:23] - Christopher Church - 571-27-2237 - 62231 Ryan Camp Suite 161 New Erika, ND 20744 - 808-268-4725 - mastercard - 2252638224023133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment