diff --git a/LICENSE b/LICENSE
index 56d4e96..9708083 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,21 +1,21 @@
-MIT License
-
-Copyright (c) 2019 N17R0
-
-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.
+MIT License
+
+Copyright (c) 2019 N17R0
+
+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.
diff --git a/README.md b/README.md
index 21f8fe4..f919797 100644
--- a/README.md
+++ b/README.md
@@ -1,108 +1,108 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-## ABOUT TOOL :
-
-Lazybee tool is a python based script from which you can generate random wordlist for brutefocre attacks. This tool has a unique features like wordlist generating time calculation and direct .txt saving in current directory. This tool works on both rooted Android device and Non-rooted Android device.
-
-
-
-
-## AVAILABLE ON :
-
-* Termux
-
-### TESTED ON :
-
-* Termux
-
-### REQUIREMENTS :
-* internet
-* python
-* storage 400 MB
-
-## FEATURES :
-* [+] Real wordlist for tools !
-* [+] Updated maintainence !
-* [+] Best for creating lists
-* [+] Easy for Beginners !
-
-## INSTALLATION [Termux] :
-
-* `apt-get update -y`
-* `apt-get upgrade -y`
-* `pkg install python -y`
-* `pkg install python2 -y`
-* `pkg install git -y`
-* `pip install lolcat`
-* `git clone https://github.com/noob-hackers/lazybee`
-* `cd $HOME`
-* `ls`
-* `cd lazybee`
-* `ls`
-* `python2 lazybee.py`
-
-```
-[+]--ex:- Enter the number of characters: 8
-
-Name your wordlist wit (.txt) extensions: pass.txt
-```
-## USAGE OPTIONS [Termux] :
-
-__GENERATE LIST__ :
-- From this option you can generate instantly pass list.
-
-## SCREEN SHOTS [Termux]
-
-
-
-
-
-
-
-## WATCH VIDEO [Termux]
-
-[](https://rebrand.ly/rcentvideo)
-
-## CONNECT WITH US :
-
-[](https://rebrand.ly/fbmsnger)
-
-[](https://rebrand.ly/insgrm)
-[](https://rebrand.ly/noobwebs)
-[](https://rebrand.ly/linkedinprof)
-[](https://rebrand.ly/fsbpage)
-[](https://rebrand.ly/telegramchnl)
-[](https://rebrand.ly/hckrgroups)
-[](https://rebrand.ly/nhforums)
-
-
-## BUY ME A COFFEE :
-
-
-
-
-
-## WARNING :
-***This tool is only for educational purpose. If you use this tool for other purposes except education we will not be responsible in such cases.***
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## ABOUT TOOL :
+
+Lazybee tool is a python based script from which you can generate random wordlist for brutefocre attacks. This tool has a unique features like wordlist generating time calculation and direct .txt saving in current directory. This tool works on both rooted Android device and Non-rooted Android device.
+
+
+
+
+## AVAILABLE ON :
+
+* Termux
+
+### TESTED ON :
+
+* Termux
+
+### REQUIREMENTS :
+* internet
+* python
+* storage 400 MB
+
+## FEATURES :
+* [+] Real wordlist for tools !
+* [+] Updated maintainence !
+* [+] Best for creating lists
+* [+] Easy for Beginners !
+
+## INSTALLATION [Termux] :
+
+* `apt-get update -y`
+* `apt-get upgrade -y`
+* `pkg install python -y`
+* `pkg install python2 -y`
+* `pkg install git -y`
+* `pip install lolcat`
+* `git clone https://github.com/noob-hackers/lazybee`
+* `cd $HOME`
+* `ls`
+* `cd lazybee`
+* `ls`
+* `python2 lazybee.py`
+
+```
+[+]--ex:- Enter the number of characters: 8
+
+Name your wordlist wit (.txt) extensions: pass.txt
+```
+## USAGE OPTIONS [Termux] :
+
+__GENERATE LIST__ :
+- From this option you can generate instantly pass list.
+
+## SCREEN SHOTS [Termux]
+
+
+
+
+
+
+
+## WATCH VIDEO [Termux]
+
+[](https://rebrand.ly/rcentvideo)
+
+## CONNECT WITH US :
+
+[](https://rebrand.ly/fbmsnger)
+
+[](https://rebrand.ly/insgrm)
+[](https://rebrand.ly/noobwebs)
+[](https://rebrand.ly/linkedinprof)
+[](https://rebrand.ly/fsbpage)
+[](https://rebrand.ly/telegramchnl)
+[](https://rebrand.ly/hckrgroups)
+[](https://rebrand.ly/nhforums)
+
+
+## BUY ME A COFFEE :
+
+
+
+
+
+## WARNING :
+***This tool is only for educational purpose. If you use this tool for other purposes except education we will not be responsible in such cases.***
diff --git a/lazybee.py b/lazybee.py
index 764a5fc..fa634ea 100644
--- a/lazybee.py
+++ b/lazybee.py
@@ -1,73 +1,186 @@
-import time
-
-#colors
-red='\033[91m'
-b='\033[21m'
-gren='\033[92m'
-yellow='\033[93m'
-cyan='\033[96m'
-blue='\033[94m'
-
-print (red+b+"""
- _
- /_/- .'''.
- =O(_))))...' `.
- \_\-
- __, ____,___,_ _, ____ ____,____,
- (-| (-/_|(- /(-\_/ (-|__|-|_,(-|_,
- _|__,_/ |,_/__,_|, _|__)_|__,_|__,
- ( ( ( ( ( ( (
-
-"""+b+red)
-
-print (gren+b+" <===[[ coded by N17R0 ]]===>"+b+gren)
-print (" ")
-print (yellow+b+" <---( search on youtube noob hackers)--->"+b+yellow)
-print (" ")
-
-length=int(raw_input(cyan+b+"Enter the number of characters: "+b+cyan))
-print (" ")
-name=raw_input(cyan+b+"Name your wordlist wit (.txt) extension: "+b+cyan)
-tic = time.clock()
-print (" ")
-print (blue+b+"<><><><><><><><><><><><><><><><><><><><><>"+b+blue)
-print (" ")
-print (yellow+b+"Wordlist Generating Please Wait!"+b+yellow)
-print (" ")
-print (blue+b+"<><><><><><><><><><><><><><><><><><><><><>"+b+blue)
-print (" ")
-lista=[0 for x in xrange(length)]
-x=length-1
-string="abcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*"
-list_of_results=[]
-file1=file(name,"w")
-while(x>-1):
- result=""
- if lista[x]==len(string)-1:
- for z in xrange (length):
- result+=string[lista[z]]
- lista[x]=0
- x-=1
- elif x==length-1:
- for z in xrange(length):
- result+=string[lista[z]]
- lista[x]+=1
- else:
- for z in xrange(length):
- result+=string[lista[z]]
- lista[x]+=1
- if x>0:
- x+=1
- else:
- x=length-1
- file1.write(result+"\n")
-toc = time.clock()
-ttn = toc - tic
-print (red+b+"<<<========================================>>>"+b+red)
-print (" ")
-print (gren+b+"Completed in "+str(ttn)+" seconds."+b+gren)
-print (" ")
-print (gren+b+"Please check "+str(name)+" in your lazy bee directoy"+b+gren)
-print (" ")
-print (red+b+"<<<========================================>>>"+b+red)
-print (" ")
\ No newline at end of file
+import secrets
+import sys
+import time
+
+
+try:
+ # colors
+ red = "\033[91m"
+ b = "\033[21m"
+ gren = "\033[92m"
+ yellow = "\033[93m"
+ cyan = "\033[96m"
+ blue = "\033[94m"
+
+ print(
+ red
+ + b
+ + """
+ _
+ /_/- .'''.
+ =O(_))))...' `.
+ \_\-
+ __, ____,___,_ _, ____ ____,____,
+ (-| (-/_|(- /(-\_/ (-|__|-|_,(-|_,
+ _|__,_/ |,_/__,_|, _|__)_|__,_|__,
+ ( ( ( ( ( ( (
+
+ """
+ + b
+ + red
+ )
+
+ print(
+ gren
+ + b
+ + " <===[[ coded by N17R0 and fixed by Touti-Sudo ]]===>"
+ + b
+ + gren
+ )
+ print(" ")
+ print(yellow + b + " <---( search on youtube noob hackers)--->" + b + yellow)
+ print(" ")
+ try:
+ length = int(
+ input(
+ cyan
+ + b
+ + "Enter the number of characters(the length of each password): "
+ + b
+ + cyan
+ )
+ )
+ print(" ")
+ passwords_number = int(
+ input(
+ cyan
+ + b
+ + "Enter the number of passwords you want to generate: "
+ + cyan
+ + b
+ )
+ )
+ except ValueError:
+ print("\nEnter a valid number")
+ sys.exit()
+
+ try:
+ print(" ")
+ name = str(
+ input(cyan + b + "Name your wordlist with (.txt) extension: " + b + cyan)
+ )
+ invalid_chr = [
+ "?",
+ ",",
+ "_",
+ "-",
+ "*",
+ "§",
+ ";",
+ "/",
+ "!",
+ "ù",
+ "^",
+ "$",
+ ":",
+ "+",
+ "²",
+ "&",
+ '"',
+ "'",
+ "(",
+ ")",
+ "{}",
+ "[]",
+ "|",
+ "``",
+ ]
+ while ".txt" not in name or any(i in name for i in invalid_chr):
+ print("Enter a Valid name")
+ name = str(
+ input(cyan + b + "Name your wordlist wit (.txt) extension: " + b + cyan)
+ )
+ except ValueError:
+ print("Enter a Valid name")
+ sys.exit()
+ tic = time.perf_counter()
+ print(" ")
+ print(blue + b + "<><><><><><><><><><><><><><><><><><><><><>" + b + blue)
+ print(" ")
+ print(yellow + b + "Wordlist Generating Please Wait!" + b + yellow)
+ print(" ")
+ print(blue + b + "<><><><><><><><><><><><><><><><><><><><><>" + b + blue)
+ print(" ")
+ string = [
+ "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",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9",
+ "0",
+ "!",
+ "@",
+ "#",
+ "$",
+ "%",
+ "^",
+ "&",
+ "*",
+ ]
+ list_of_results = []
+ start = time.perf_counter()
+ with open(name, "w", encoding="utf-8") as file:
+ for i in range(passwords_number):
+ password = "".join(
+ secrets.choice(
+ string,
+ )
+ for _ in range(length)
+ )
+ password = password.split(".", 1)[-1].strip()
+ file.write(password + "\n")
+
+ end = time.perf_counter()
+
+ print(red + b + "<<<========================================>>>" + b + red)
+ print(" ")
+ print(f"Completed in {end - start:.2f} seconds")
+ print(" ")
+ print(
+ gren + b + "Please check " + str(name) + " in your lazy bee directoy" + b + gren
+ )
+ print(" ")
+ print(red + b + "<<<========================================>>>" + b + red)
+ print(" ")
+except KeyboardInterrupt:
+ print(red + b + "\n\nTask interrupted with a CTRL+C" + red + b)