Keygen list maker

This is the place to post any code that you want to share with the community. Only completed scripts should be posted here.
Note: posts here are not necessarily endorsed by the community, and may represent amateur or even bad practices.

Keygen list maker

Postby felceyboy » Tue Jun 04, 2013 12:06 am

This is my little keygen program you name the file at the start then it starts to create a list of keys with in the file you made
Just a little note that it needs clearing up a bit but hope it comes of use to anyone.
Code: Select all

import string
import random
import sys
import time
import os

print "enter the name of the file to hold all the keys:"
filenam = raw_input("Name Of File ::")

temp = sys.stdout

sys.stdout = open(filenam, 'a')
print "Do Not Edit"
sys.stdout = temp
data = open(filenam, 'r')
lines = data.readlines()

data = open(filenam, 'w')
print "Generating random keys from uppercase"
print "and lowercase with numbers..."
print "Please close terminal with the x button"
print "top right of terminal as this is on a loop."
print "\n \n WARNING may generate the same key twice WARNING \n"
t = raw_input("Enter char length :")
a = int(t)
raw_input("If You Wish To Continue Press Any Key.....")

print "\n \n \n Generating........"
k = 3

x = 1
clearscr = 1000000

while x:
    def lowerchar(size=a,chars=string.ascii_lowercase +      string.digits):
        return ''.join(random.choice(chars) for x in range(size))
    def upperchar(size=a,chars=string.ascii_uppercase +      string.digits):
        return ''.join(random.choice(chars) for x in range(size))
    def allchar(size=a,chars=string.ascii_uppercase+string.ascii_lowercase +      string.digits):
        return ''.join(random.choice(chars) for x in range(size))
    lines[+0] = lowerchar()+"\n"+upperchar()+"\n"+allchar()+"\n"

    v = 3 * x
    tim = x
    mb = os.path.getsize(filenam)
    filesiz = ""
    if tim == clearscr:
      if mb >= 1048576:
         mb = mb / 1048576
         filesiz = " MB's"
      elif mb >= 1073741824:
         mb = mb / 1073741824
         filesiz = " GB's"
      elif mb >= 1099511627776:
         mb = mb / 1099511627776
         filesiz = " TB's"
      print "Processed Keys:: "+str(v)+"      "+"File Size ::"+str(mb)+filesiz
      clearscr = clearscr + 1000000
      mb = mb
    x += 1
User avatar
Posts: 2
Joined: Mon Jun 03, 2013 11:45 pm

Re: Keygen list maker

Postby micseydel » Tue Jun 04, 2013 4:39 pm

Were you looking for advice or feedback on this code?
Join the #python-forum IRC channel on for off-topic chat!

Please prefer not to PM members. The point of the forum is so that anyone can benefit. We don't want to help you over PMs/emails/Skype chats that others can't benefit from :)
User avatar
Posts: 2916
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: Keygen list maker

Postby felceyboy » Fri Jun 07, 2013 8:20 am

feed back
User avatar
Posts: 2
Joined: Mon Jun 03, 2013 11:45 pm

Return to Completed Scripts

Who is online

Users browsing this forum: No registered users and 2 guests