usr bin env python chmod to it and run file py The passgen by xN -----

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#! /usr/bin/env python
########################################
# chmod a+x to it and run "./file.py" #
########################################
# The passgen by xN #
########----------2008----------########
########################################
import random,os.path
from sys import argv
def gen(numz=1):
ass=[]
b=[]
stringg ='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456_'
lss=list(stringg)#list of simz
for a in range(numz):
ass.append('')
#--------------------set symz-
for d in range(8):
b.append(random.choice(lss))
d+=1
#--------------------rand-
for i in range(8):
gag=random.randint(0,7)
ass[a]+=b[gag]
i+=1
a+=1
return(ass)
#----------------------------begin-
if (len(argv)==1):
print """
##############################################
#use pg[ver].py file(or 'NO') num_of_pass #
# -by xN #
##############################################
"""
if (len(argv)<=2):
ass=gen()
ass=ass[0]
else:
ass=gen(int(argv[2]))
ass='\n'.join(ass)
#--------------------------------fw-
if (len(argv)>1):
fn=argv[1]#file to w
if (fn<>'NO'):
fw=open(fn,"w")
fw.writelines(ass)
print "writed to %s" % fn
fw.close()
else:
print(ass)
################################################-end#