user = ['user1', 'user2', 'user3', 'user4', 'user5', 'user6', 'user7', 'user8']
aboutme = [
'哪个村里来的能有我帅?统统拉出去枪毙五分钟',
'生长在江南水乡绍兴。再多四两,就成了九斤姑娘',
'一个自由的灵魂加上一颗爱吃爱睡爱胡歌的心',
'大家好,我是“杭行世界”实践',
'没学问的读书人,拖延症晚期却乐观面对的少年',
'坐标南京的射手少女,爱胡吃海喝,更爱江山美人',
'我长得小,可我胃口大啊!我肤不白,可我腹不黑啊',
'一个made in Taiwan可高冷可逗比追求新鲜刺激的男子',
'懒癌晚期,摸鱼上瘾。英俊潇洒,风流倜傥,喜欢胡扯',
'文文静静风风火火,爱吃爱笑爱睡的小女生一枚',
'我喜欢快乐,我总是把笑容挂在嘴边'
]
addr = ["'北京市', '中国', '北京市'", "'重庆市', '中国', '重庆'"]
import random
def RandomEmail(emailType=None, rang=None):
__emailtype = ["@qq.com", "@163.com", "@126.com", "@189.com", "@gmail.com"]
# 如果没有指定邮箱类型,默认在 __emailtype中随机一个
if emailType == None:
__randomEmail = random.choice(__emailtype)
else:
__randomEmail = emailType
# 如果没有指定邮箱长度,默认在4-10之间随机
if rang == None:
__rang = random.randint(6, 10)
else:
__rang = int(rang)
__Number = "0123456789qbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPWRSTUVWXYZ"
__randomNumber = "".join(random.choice(__Number) for i in range(__rang))
_email = __randomNumber + __randomEmail
return _email
def RandomAboutMe():
return random.choice(aboutme)
def RandomTime():
return '20{}-0{}-1{} 1{}:33:48.136183'.format(random.randint(14, 18), random.randint(1, 9), random.randint(1, 9), random.randint(1, 9))
def RandomAddr():
return random.choice(addr)
for id_ in range(3, 30):
print("INSERT INTO 'user' VALUES ({}, 'user{}', '{}', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '{}', '{}', 0, {});".format(id_, id_, RandomEmail(), RandomAboutMe(), RandomTime(), RandomAddr()))
示例结果
INSERT INTO 'user' VALUES (3, 'user3', 'RLULMmWmI@189.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '坐标南京的射手少女,爱胡吃海喝,更爱江山美人', '2015-04-11 13:33:48.136183', 0, '重庆市', '中国', '重庆');
INSERT INTO 'user' VALUES (4, 'user4', 't3qr9howj@126.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '我长得小,可我胃口大啊!我肤不白,可我腹不黑啊', '2018-06-13 16:33:48.136183', 0, '北京市', '中国', '北京市');
INSERT INTO 'user' VALUES (5, 'user5', 'snb95y9AvA@qq.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '一个自由的灵魂加上一颗爱吃爱睡爱胡歌的心', '2017-05-19 17:33:48.136183', 0, '重庆市', '中国', '重庆');
INSERT INTO 'user' VALUES (6, 'user6', 'ASZCXLm@gmail.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '哪个村里来的能有我帅?统统拉出去枪毙五分钟', '2017-01-19 12:33:48.136183', 0, '重庆市', '中国', '重庆');
INSERT INTO 'user' VALUES (7, 'user7', 'mCT1hTYu@163.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '没学问的读书人,拖延症晚期却乐观面对的少年', '2017-01-12 15:33:48.136183', 0, '重庆市', '中国', '重庆');
INSERT INTO 'user' VALUES (8, 'user8', 'tg7U7eWO@126.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '一个自由的灵魂加上一颗爱吃爱睡爱胡歌的心', '2014-08-17 15:33:48.136183', 0, '重庆市', '中国', '重庆');
INSERT INTO 'user' VALUES (9, 'user9', '1TRTpRV4@189.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '我喜欢快乐,我总是把笑容挂在嘴边', '2017-01-17 16:33:48.136183', 0, '北京市', '中国', '北京市');
INSERT INTO 'user' VALUES (10, 'user10', 'BOWZLiMZ@qq.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '生长在江南水乡绍兴。再多四两,就成了九斤姑娘', '2016-06-11 17:33:48.136183', 0, '北京市', '中国', '北京市');
INSERT INTO 'user' VALUES (11, 'user11', 'WqO7y2x7o@gmail.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '哪个村里来的能有我帅?统统拉出去枪毙五分钟', '2017-05-15 16:33:48.136183', 0, '北京市', '中国', '北京市');
INSERT INTO 'user' VALUES (12, 'user12', 'vqGNZ9eU@gmail.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '生长在江南水乡绍兴。再多四两,就成了九斤姑娘', '2017-01-18 17:33:48.136183', 0, '北京市', '中国', '北京市');
INSERT INTO 'user' VALUES (13, 'user13', 'XyKg5Wic1@gmail.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '懒癌晚期,摸鱼上瘾。英俊潇洒,风流倜傥,喜欢胡扯', '2017-04-12 19:33:48.136183', 0, '北京市', '中国', '北京市');
INSERT INTO 'user' VALUES (14, 'user14', 'Rq60W2Y7O2@qq.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '没学问的读书人,拖延症晚期却乐观面对的少年', '2018-04-18 14:33:48.136183', 0, '重庆市', '中国', '重庆');
INSERT INTO 'user' VALUES (15, 'user15', '8X7n1DKqI@126.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '我长得小,可我胃口大啊!我肤不白,可我腹不黑啊', '2016-07-18 18:33:48.136183', 0, '重庆市', '中国', '重庆');
INSERT INTO 'user' VALUES (16, 'user16', 'ViYHJ2fF7@189.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '哪个村里来的能有我帅?统统拉出去枪毙五分钟', '2016-03-17 11:33:48.136183', 0, '重庆市', '中国', '重庆');
INSERT INTO 'user' VALUES (17, 'user17', '2XFWVP@gmail.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '文文静静风风火火,爱吃爱笑爱睡的小女生一枚', '2018-07-16 12:33:48.136183', 0, '北京市', '中国', '北京市');
INSERT INTO 'user' VALUES (18, 'user18', 'WTRDFf@126.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '一个made in Taiwan可高冷可逗比追求新鲜刺激的男子', '2016-03-12 13:33:48.136183', 0, '北京市', '中国', '北京市');
INSERT INTO 'user' VALUES (19, 'user19', '4kjIYt@189.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '一个自由的灵魂加上一颗爱吃爱睡爱胡歌的心', '2018-05-14 12:33:48.136183', 0, '北京市', '中国', '北京市');
INSERT INTO 'user' VALUES (20, 'user20', 'jBFKAsWw4@163.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '没学问的读书人,拖延症晚期却乐观面对的少年', '2015-09-11 13:33:48.136183', 0, '北京市', '中国', '北京市');
INSERT INTO 'user' VALUES (21, 'user21', 'Acn44zdrS@qq.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '懒癌晚期,摸鱼上瘾。英俊潇洒,风流倜傥,喜欢胡扯', '2017-09-11 13:33:48.136183', 0, '重庆市', '中国', '重庆');
INSERT INTO 'user' VALUES (22, 'user22', 'RcLENWvVg@gmail.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '大家好,我是“杭行世界”实践', '2015-05-16 12:33:48.136183', 0, '北京市', '中国', '北京市');
INSERT INTO 'user' VALUES (23, 'user23', 'gPYlqxknuy@gmail.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '一个made in Taiwan可高冷可逗比追求新鲜刺激的男子', '2015-06-12 15:33:48.136183', 0, '北京市', '中国', '北京市');
INSERT INTO 'user' VALUES (24, 'user24', 'zqp5XfT7@126.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '一个made in Taiwan可高冷可逗比追求新鲜刺激的男子', '2014-02-12 18:33:48.136183', 0, '北京市', '中国', '北京市');
INSERT INTO 'user' VALUES (25, 'user25', 'uo12xiO9@qq.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '一个made in Taiwan可高冷可逗比追求新鲜刺激的男子', '2017-04-14 15:33:48.136183', 0, '北京市', '中国', '北京市');
INSERT INTO 'user' VALUES (26, 'user26', 'vokYhTpR@gmail.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '文文静静风风火火,爱吃爱笑爱睡的小女生一枚', '2014-01-19 18:33:48.136183', 0, '重庆市', '中国', '重庆');
INSERT INTO 'user' VALUES (27, 'user27', '6MWPeq@gmail.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '一个自由的灵魂加上一颗爱吃爱睡爱胡歌的心', '2014-08-19 13:33:48.136183', 0, '重庆市', '中国', '重庆');
INSERT INTO 'user' VALUES (28, 'user28', 'uAnWSeW@gmail.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '我长得小,可我胃口大啊!我肤不白,可我腹不黑啊', '2017-07-14 19:33:48.136183', 0, '北京市', '中国', '北京市');
INSERT INTO 'user' VALUES (29, 'user29', 'hcu7xywqr6@gmail.com', 'pbkdf2:sha256:150000$yJ0CcfiR$c7a3a9075853a463d4f2f3c22af15ab4bc8ba0447ff237ca8c78de4b0a38ba42', '我长得小,可我胃口大啊!我肤不白,可我腹不黑啊', '2018-06-14 14:33:48.136183', 0, '重庆市', '中国', '重庆');