Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- import random
- namepart1 = ['Adventuring', 'Baking', 'Chasing', 'Dancing', 'Evolving', 'Fluctuating', 'Glimmering', 'Humming', 'Imaging', 'Juggling', 'Kicking', 'Leaping', 'Moving', 'Nurturing', 'Opening', 'Pondering', 'Quivering', 'Rising', 'Singing', 'Tinkering', 'Unfolding', 'Vibrating', 'Wandering', 'X-raying', 'Yearning', 'Zoning', 'Absorbing', 'Bouncing', 'Crawling', 'Dreaming', 'Escaping', 'Fading', 'Gazing', 'Hovering', 'Inspiring', 'Jumping', 'Kneeling', 'Lurking', 'Murmuring', 'Nestling', 'Observing', 'Paddling', 'Questing', 'Reaching', 'Sinking', 'Twirling', 'Unraveling', 'Venting', 'Whispering', 'X-raying', 'Yelling', 'Zipping', 'Asking', 'Bringing', 'Caring', 'Dreading', 'Engaging', 'Filling', 'Gliding', 'Hoping', 'Immersing', 'Jostling', 'Kissing', 'Leaking', 'Mimicking', 'Navigating', 'Opening', 'Pushing', 'Quenching', 'Reeling', 'Spinning', 'Throbbing', 'Unveiling', 'Vowing', 'Weaving', 'Xploring', 'Yearning', 'Zapping', 'Awakening', 'Bending', 'Creeping', 'Daring', 'Echoing', 'Flickering', 'Grinning', 'Holding', 'Infiltrating', 'Jumping', 'Kicking', 'Listening', 'Murmuring', 'Nurturing', 'Opening', 'Peering', 'Quenching', 'Reverberating', 'Swirling', 'Tugging', 'Unleashing', 'Veiling', 'Waving', 'X-ing', 'Yearning', 'Zipping', 'Accusing', 'Breaking', 'Craving', 'Dawning', 'Engulfing', 'Fading', 'Growing', 'Hiding', 'Interpreting']
- namepart2 = ['Ethereal', 'Luminous', 'Mystical', 'Resplendent', 'Serene', 'Vibrant', 'Whimsical', 'Majestic', 'Quaint', 'Enigmatic', 'Opulent', 'Radiant', 'Sublime', 'Nostalgic', 'Elusive', 'Fleeting', 'Celestial', 'Timeless', 'Transcendent', 'Velvety', 'Peculiar', 'Charming', 'Graceful', 'Infinite', 'Eloquent', 'Lustrous', 'Sparks', 'Ebullient', 'Lush', 'Glorious', 'Dazzling', 'Breathtaking', 'Reverent', 'Sculptural', 'Vast', 'Tranquil', 'Quixotic', 'Uplifting', 'Idyllic', 'Iridescent', 'Heavenly', 'Piquant', 'Soothing', 'Euphoric', 'Timid', 'Robust', 'Tantalizing', 'Delicate', 'Dreamlike', 'Magnetic', 'Exquisite', 'Harmonious', 'Spirited', 'Gossamer', 'Seraphic', 'Breezy', 'Whispering', 'Chimeric', 'Turbulent', 'Gleaming', 'Wistful', 'Fanciful', 'Mysterious', 'Opalescent', 'Vivid', 'Languid', 'Resilient', 'Chimerical', 'Lucid', 'Boisterous', 'Immaculate', 'Dramatic', 'Translucent', 'Playful', 'Frosted', 'Vivacious', 'Abstract', 'Gentle', 'Delightful', 'Breathtaking', 'Sovereign', 'Epic', 'Flawless', 'Vibrating', 'Frostbitten', 'Incandescent', 'Fierce', 'Enchanted', 'Unfathomable', 'Crisp', 'Endearing', 'Dazzling', 'Majestic', 'Bubbly', 'Seraphic', 'Mellow', 'Restorative', 'Illustrious', 'Bold', 'Gleaming']
- namepart3 = ['Acorn', 'Bamboo', 'Candelabra', 'Dragonfly', 'Eclipse', 'Feather', 'Geode', 'Hologram', 'Igloo', 'Jellyfish', 'Kaleidoscope', 'Lantern', 'Meteor', 'Nautilus', 'Ocarina', 'Pyramid', 'Quicksilver', 'Raven', 'Seashell', 'Telescope', 'Umbrella', 'Vortex', 'Wagonwheel', 'Xenon', 'Yarn', 'Zeppelin', 'Albatross', 'Brassica', 'Cicada', 'Djembe', 'Ewer', 'Fossil', 'Geyser', 'Hermit crab', 'Icicle', 'Jukebox', 'Koi', 'Lighthouse', 'Moonstone', 'Ninja star', 'Octopus', 'Parchment', 'Quartz', 'Rattle', 'Sundial', 'Tarantula', 'Ukelele', 'Volcano', 'Whirlpool', 'Xylograph', 'Yew', 'Ziggurat', 'Anemone', 'Birch', 'Chalice', 'Dune', 'Elderflower', 'Fresco', 'Glacier', 'Howler monkey', 'Iris', 'Jaguar', 'Kite', 'Lyre', 'Mannequin', 'Nebula', 'Ostrich', 'Pinecone', 'Quill', 'Rook', 'Stalactite', 'Topaz', 'Urn', 'Vinegaroon', 'Windmill', 'Xylophone', 'Yen', 'Zephyr', 'Amethyst', 'Bumblebee', 'Cairn', 'Driftwood', 'Eagle', 'Fern', 'Gale', 'Hornet', 'Ivory', 'Jade', 'Kraken', 'Lava lamp', 'Mushroom', 'Nymph', 'Obelisk', 'Penny', 'Quartzite', 'Rocket', 'Starfish', 'Treehouse', 'Urchin', 'Violet', 'Woodpecker', 'Xenomorph', 'Yggdrasil', 'Ziggurat', 'Abyss', 'Bellflower', 'Cedar', 'Dandelion', 'Eruption', 'Fungi', 'Giraffe', 'Helix', 'Iguana', 'Jigsaw', 'Kingfisher', 'Labyrinth', 'Meteorite', 'Neptune', 'Orchid', 'Pineapple', 'Quicksand', 'Raven', 'Sapphire', 'Turtle', 'Uproar', 'Vortex', 'Willow', 'Xerox', 'Yarn', 'Zebra', 'Astronaut', 'Basilisk', 'Comet', 'Dolphin', 'Ember', 'Fungi', 'Glimmer', 'Hydra', 'Inkblot', 'Jetstream', 'Kettle', 'Lobster', 'Manta ray', 'Nautilus', 'Oasis', 'Plumeria', 'Quartz', 'Raspberry', 'Shimmer', 'Tornado', 'Urchin', 'Viper', 'Wormhole', 'Xylocarp', 'Yeti', 'Zodiac', 'Admiral', 'Beetle', 'Caravel', 'Dagger', 'Echo', 'Fur', 'Goblet', 'Harlequin', 'Icicle', 'Jewel', 'Kangaroo', 'Lotus', 'Magma', 'Nightingale', 'Onyx', 'Petrichor', 'Quiver', 'Ravine', 'Sundew', 'Trophy', 'Umbra', 'Vulture', 'Wisp', 'Xerophyte', 'Yew tree', 'Zinnia']
- lower = ['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']
- upper = ['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']
- special_chars = [
- "!", "\"", "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/",
- ":", ";", "<", "=", ">", "?", "@", "[", "]", "^", "_", "`", "{", "|", "}", "~",
- ]
- numbers = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0']
- name = namepart1[random.randint(0, len(namepart1) - 1)] +namepart2[random.randint(0, len(namepart2) - 1)] + namepart3[random.randint(0, len(namepart3) - 1)]
- print(name)
- root = Tk()
- root.geometry('400x125')
- root.resizable(0,0)
- root.title("accounmt generator")
- Text = ''
- def Check1():
- print(":)")
- SettingsRead = open('Settings.txt', 'r+')
- A = str(Special.get())
- B = str(Lower1.get())
- C = str(Numbers.get())
- D = str(Upper.get())
- N = A + B + C + D
- SettingsRead.write(N)
- SettingsRead.close()
- def changeName():
- name = namepart1[random.randint(0, len(namepart1) - 1)] +namepart2[random.randint(0, len(namepart2) - 1)] + namepart3[random.randint(0, len(namepart3) - 1)]
- displayedName1.config(text=name)
- root.update()
- button1.place(x=displayedName1.winfo_width(), y=25)
- root.update()
- print('Clicked', name)
- def Entrytext():
- Text = e1.get()
- Text = str(Text)
- print(Text)
- def enterLength():
- root.update()
- password = []
- Text1 = e2.get()
- if Text1 == '':
- Text1=10
- Text1 = int(Text1)
- for i in range(Text1):
- if Special.get()==1:
- password.append(special_chars[random.randint(1, len(special_chars)-1)])
- if Lower1.get()==1:
- password.append(lower[random.randint(1, len(lower)-1)])
- if Upper.get()==1:
- password.append(upper[random.randint(1, len(upper)-1)])
- if Numbers.get()==1:
- password.append(numbers[random.randint(1, len(numbers)-1)])
- random.shuffle(password)
- if len(password) != Text1:
- X = len(password) - Text1
- for i in range(X):
- password.pop()
- password1 = ''
- password1 = password1.join(password)
- passwordLabel.config(text=password1)
- changePassword.place(y=75, x=label1.winfo_width()+ passwordLabel.winfo_width()+3)
- root.update()
- print(password1)
- X = Label(root, text='Application =')
- X.place(x=1, y=3)
- e1=Entry(root, width=25)
- e1.place(x=80, y=3)
- button = Button(root, text="Enter",
- command=Entrytext)
- button.place(x=235, y=0)
- displayedName1 = Label(root, text=name)
- displayedName1.place(x=0, y=25)
- button1 = Button(root, text="Change Name", command=changeName)
- root.update()
- button1.place(x=displayedName1.winfo_width()+3, y=25)
- print(displayedName1.winfo_width())
- root.update()
- #password
- Y = Label(root, text='Length Of Password =')
- Y.place(x=1, y=52)
- root.update()
- e2=Entry(root, width=5)
- e2.place(x=Y.winfo_width(), y=52)
- root.update()
- button2 = Button(root, text="Enter", command=enterLength)
- button2.place(y=52, x=e2.winfo_width()+Y.winfo_width()+4)
- Text1 = 10
- password = []
- SettingsRead = open('Settings.txt', 'r')
- if SettingsRead.read(1) != '':
- SettingsRead.close()
- SettingsRead = open('Settings.txt', 'r')
- Q = SettingsRead.read(1)
- W = SettingsRead.read(1)
- E = SettingsRead.read(1)
- R = SettingsRead.read(1)
- print('Value =',Q,W,E)
- SettingsRead.close()
- Special = IntVar(value=int(Q))
- checkbox1 = Checkbutton(root, text='Special Charicters', variable=Special, onvalue=1, offvalue=0, command=Check1)
- checkbox1.place(x= 3, y=100)
- root.update()
- Lower1 = IntVar(value=int(W))
- checkbox2 = Checkbutton(root, text='Lower Case', variable=Lower1, onvalue=1, offvalue=0, command=Check1)
- checkbox2.place(x= checkbox1.winfo_width(), y=100)
- root.update()
- Upper = IntVar(value=int(E))
- checkbox3 = Checkbutton(root, text='Upper Case', variable=Upper, onvalue=1, offvalue=0, command=Check1)
- checkbox3.place(x= checkbox2.winfo_width()+checkbox1.winfo_width() , y=100)
- root.update()
- Numbers = IntVar(value=int(R))
- checkbox4 = Checkbutton(root, text='Numbers', variable=Numbers, onvalue=1, offvalue=0, command=Check1)
- checkbox4.place(x= checkbox2.winfo_width()+checkbox1.winfo_width()+checkbox3.winfo_width(), y=100)
- root.update()
- SettingsRead = open('Settings.txt', 'r')
- if SettingsRead.read(1) == '':
- A = str(Special.get())
- B = str(Lower1.get())
- C = str(Numbers.get())
- D = str(Upper.get())
- N = A + B + C + D
- SettingsWrite = open('Settings.txt', 'r+')
- SettingsWrite.write(N)
- SettingsWrite.close()
- SettingsRead.close()
- for i in range(Text1):
- if Special.get()==1:
- password.append(special_chars[random.randint(1, len(special_chars)-1)])
- if Lower1.get()==1:
- password.append(lower[random.randint(1, len(lower)-1)])
- if Upper.get()==1:
- password.append(upper[random.randint(1, len(upper)-1)])
- if Numbers.get()==1:
- password.append(numbers[random.randint(1, len(numbers)-1)])
- random.shuffle(password)
- print(password)
- if len(password) != Text1:
- X = len(password) - Text1
- for i in range(X):
- password.pop()
- password1 = ''
- password1 = password1.join(password)
- print(password1, len(password1))
- root.update()
- passwordLabel = Label(root, text=password1)
- label1 = Label(root, text='Password = ')
- changePassword = Button(root, text='Change password', command=enterLength)
- label1.place(y= 75, x=3)
- root.update()
- passwordLabel.place(y=75, x=label1.winfo_width())
- root.update()
- changePassword.place(y=75, x=label1.winfo_width()+ passwordLabel.winfo_width()+3)
- #Savinging Data
- def Save():
- root.update()
- Aplication = str(e1.get())
- Aplication = Aplication + ' '
- print(Aplication)
- Name = displayedName1['text']
- Name = Name + ' '
- print(Name)
- Pass = passwordLabel['text']
- Pass = Pass + ' '
- print(Pass)
- SaveData = Aplication + Name + Pass + '\n'
- print(SaveData)
- P = open('Accounts.txt', 'a')
- P.write(SaveData)
- P.close()
- Save = Button(root, text='Save', command=Save)
- Save.place(x=50, y=50)
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment