Skip to content

Instantly share code, notes, and snippets.

@kanru
Created March 4, 2012 14:54
Show Gist options
  • Save kanru/1973378 to your computer and use it in GitHub Desktop.
Save kanru/1973378 to your computer and use it in GitHub Desktop.
Generate password lookup table
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
+----------------------------------------------------
A| U C " S a K n v } n : A n + s # ? @ _ d | 1 E { g J
B| W [ > F ^ i R k M N E < 3 d & L B s [ r l o u / w n
C| k c ] G G F ; Q O \ T G t X G = V 2 b ~ N [ 1 3 ^ O
D| x G A 0 ` Y v 6 2 y 3 w ~ ] b N ) 0 q ' ? J y + u Y
E| V j = c ^ ! R P z N c s R ? Z / K k c F J z \ ' J u
F| c 5 E q . K 6 F } z 9 = ( B = I 7 ( K H = \ + ' 0 Q
G| C ' : p % ~ q # 2 f { 7 | { { + [ z } p T 2 % l ( K
H| r v Z w m @ + k w S 0 ) J 7 + } ^ H ) t G ( f 9 A 3
I| R m 2 Q < r } } A + T z ^ I + ] U 5 | S J ( Z < L v
J| _ Q * 7 _ m _ L 2 S ^ q e ; { p 2 F 6 ' j y y = N D
K| 9 : d ; { 5 D . @ 7 b { o : ' f w l s b Q Z 1 . U 4
L| f % z n 4 _ o J # | ] 6 d | o ' $ = } J z 4 5 ) I ,
M| g - t L V | h t V 7 T x x ] B s # 9 e < g N $ Z z 6
N| _ Q ) d / * 2 j d V P ) Y $ 5 ' P $ - [ v s f n : *
O| s r 4 n " J k & e r 0 t l ] y 7 G h - ? ) E B % _ @
P| w X ^ ) q _ n p _ p / m 1 r @ , K 4 a { & O c d ; &
Q| | r p r r t + D l > ~ I y V 9 + a d | R N 4 5 C } "
R| $ & 6 * C s t u q 1 5 ] P 1 4 L ' l 1 ` p 1 W % D ?
S| @ ! ; j ! F 9 Y O 1 > . 2 y 3 2 % L E . s > 5 a U 9
T| H 0 < M J x d 5 s 6 c B O X 1 0 4 _ Y Y - < ~ M # &
U| P h R ~ e h p " ( & * p g ' ~ U v 7 v j 1 t f $ d -
V| v " s M 1 W K r | T : k P i ] F { K Q : B L 0 : i S
W| s e @ s l w e w h X o 1 / } D + b 4 r H z p | t x %
X| M k D d 5 s q < o N n Z 5 - F H C E q z ! F \ P 9 o
Y| _ D T + T o P " 9 s n # q w G } g # z W 3 Z , " 1 T
Z| e p f Y b + 4 n F a ! x ; U g 7 T ! o n 4 K e f r q
#!/usr/bin/python
#
# Copyright (C) Kan-Ru Chen <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# Generate password lookup table
# Use Randomdotorg from http://pypi.python.org/pypi/randomdotorg
#
import string
from randomdotorg import RandomDotOrg
random = RandomDotOrg()
print " ",
for i in string.uppercase:
print "%s" % i,
print " "
print " +" + "-"*52
for i in string.uppercase:
print "%s|" % i,
for x in range(0,26):
print random.choice(string.letters+string.digits+string.punctuation),
print " "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment