Egress-Assess/datatypes/socials.py

30 lines
693 B
Python
Raw Permalink Normal View History

2014-12-24 13:37:31 +00:00
'''
This module generates social security numbers
'''
from common import helpers
class Datatype:
def __init__(self, cli_object):
self.cli = "ssn"
self.description = "Social Security Numbers"
self.filetype = "text"
self.datasize = int(cli_object.data_size)
def create_ssn(self):
ssn = helpers.randomNumbers(9)
ssn = ssn[0:3] + "-" + ssn[3:5] + "-" + ssn[5:9]
return ssn
def generate_data(self):
2015-01-15 14:42:00 +00:00
print "[*] Generating data..."
2014-12-24 13:37:31 +00:00
ssns = ''
# This is approx 1 meg of socials
for single_ssn in range(0, 81500 * self.datasize):
ssns += self.create_ssn() + ', '
return ssns