Skip to content

Commit

Permalink
Update dev.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jarivankaam authored Jul 18, 2022
1 parent cfa1d5f commit 9d2a30e
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import random
import argparse

path = cfg.path["path"]


#call parser
# call parser
parser = argparse.ArgumentParser()


Expand Down Expand Up @@ -46,7 +46,7 @@

# main function with args passed in
def main(args):
#if statement tree to call functions based on args passed in
# if statement tree to call functions based on args passed in
if args.url:
if args.url == " ":
print("please provide a word")
Expand Down Expand Up @@ -85,47 +85,50 @@ def generate_urls(args):
Time = time.strftime("%H:%M:%S")
dateAndTIme = date + " " + Time
word = args
f = open("url.links", "a")
f = open(f"{path}/url.links", "a")
f.write(dateAndTIme)
f.write("\n")
list = all_perms(word)
os.system("clear")

for word in list:
print(f"{urlPart1}{word}{urlPart2}")
count = count + 1

f.write(f"{urlPart1}{word}{urlPart2}\n")
if count == 10:
break
#open url.links and append to file

# open url.links and append to file


# function to generate a random password
def generate_password():
password = ""
f = open("url.links", "a")
f = open(f"{path}/url.links", "a")
for i in range(20):
password = password + random.choice(string.ascii_letters + string.digits)
print(f"your password is: {password}")
f.write(f"your password is: {password}\n")
return password


# function to generate a random username
def generate_username():
username = ""
f = open("url.links", "a")
f = open(f"{path}/url.links", "a")
for i in range(8):
username = username + random.choice(string.ascii_letters + string.digits)
print(f"your username is: {username}")
f.write(f"your username is: {username}\n")
return username


#append new line function
# append new line function
def new_line():
f = open("url.links", "a")
f = open(f"{path}/url.links", "a")
f.write("\n\n")
f.close()


# call main function with parsed args passed in
main(parser.parse_args())

0 comments on commit 9d2a30e

Please sign in to comment.