SHOW:
|
|
- or go back to the newest paste.
1 | #!/usr/bin/env python | |
2 | ||
3 | import httplib | |
4 | import string | |
5 | ||
6 | def exists(username): | |
7 | c = httplib.HTTPConnection("www.reddit.com") | |
8 | c.request("HEAD", "/user/" + username) | |
9 | r = c.getresponse().status | |
10 | assert r in [200, 404], "WTF just happened?" | |
11 | return r == 200 | |
12 | ||
13 | cc = string.ascii_lowercase + string.digits + "-_" | |
14 | - | all_3ch = set(x + y + y for x in cc for y in cc for z in cc) |
14 | + | all_3ch = set(x + y + z for x in cc for y in cc for z in cc) |
15 | ||
16 | for user in all_3ch: | |
17 | if not exists(user): | |
18 | print user |