Skip to content

Commit 62562e4

Browse files
Update main.py
1 parent f19b8e8 commit 62562e4

File tree

1 file changed

+55
-35
lines changed

1 file changed

+55
-35
lines changed

Couteau/main.py

Lines changed: 55 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
COUTEAU
1212
WORDLIST GENERATOR FOR BRUTE FORCE.
1313
DICTIONNARY FOR BRUTE FORCE
14+
@version 0.0.8
1415
"""
1516

1617
print("""
@@ -53,6 +54,7 @@ def help(self):
5354
5455
e or exit => quit command
5556
c or cls or clear => clear command
57+
s or start => start the programm
5658
5759
""")
5860
time.sleep(0.5)
@@ -69,7 +71,7 @@ def Checking(self):
6971
def choice(self):
7072
command = input("> ")
7173
#beta command
72-
if command == "g":
74+
if command == "s":
7375
self.Confirmation()
7476
#beta command
7577
if command == "help":
@@ -89,39 +91,43 @@ def choice(self):
8991

9092

9193
def Confirmation(self):
92-
confirm = input("Are you sure you want to start the process? Y/N: ")
93-
if confirm == "Y":
94-
self.Process()
95-
else:
96-
exit()
97-
94+
self.bday = input("Enter the birthday like this 22/09/1987 if you dont have just enter n: ")
95+
if self.bday == "n" or self.bday == "N":
96+
self.bday = False
97+
print(self.bday)
98+
self.Process()
9899

99-
def bday(self):
100+
def birthday(self):
100101
#delete /
101102
self.bday.replace("/", "")
102103

103-
with open("bday.txt", "w", encoding='utf-8') as filebday:
104+
with open("bday.txt", "a", encoding='utf-8') as filebday:
104105
#bday all changment adding to password of 1 to 5
105106
filebday.write(self.bday+ '\n')
106107
#4last digits
107108
filebday.write(self.bday[4:8]+ '\n')
108109
#4digits + years
109110
filebday.write(self.bday[4:8] + self.bday[2:4]+ '\n')
110-
111111
inverse = self.bday[4:8]
112112
filebday.write(inverse[::-1]+ '\n')
113113
filebday.write(self.bday[6:8]+self.bday[4:6]+ '\n')
114-
count += 6
115114
self.bday == False
116-
with open("{self.file_name},.,{render}", "w", encoding="utf-8") as file:
117-
file.write(filebday)
118-
os.remove("bday.txt")
115+
116+
117+
print("stop")
118+
with open(f"{self.file_name}{self.render}", "a", encoding="utf-8") as file:
119+
shutil.copyfile('bday.txt',f"{self.file_name}{self.render}")
120+
121+
filebday.close()
122+
os.remove("bday.txt")
119123

120124

121125

122126
def Process(self):
123127
count = 0
124128
self.words = input("Enter commonly used word, separated by a space: ")
129+
self.depth = int(input("Enter the depth [default:5]: "))
130+
125131
with open(f"{self.file_name}{self.render}", "a", encoding="utf-8") as file:
126132
if self.depth == 1:
127133
sys.stdout.write('\rloading [--------------------] 0%')
@@ -131,7 +137,7 @@ def Process(self):
131137
pass
132138

133139
else:
134-
self.bday()
140+
self.birthday()
135141

136142

137143
time.sleep(0.2)
@@ -191,7 +197,7 @@ def Process(self):
191197
pass
192198

193199
else:
194-
self.bday()
200+
self.birthday()
195201

196202
sys.stdout.write('\rloading [--------------------] 0%')
197203
sys.stdout.flush()
@@ -247,7 +253,7 @@ def Process(self):
247253
pass
248254

249255
else:
250-
self.bday()
256+
self.birthday()
251257

252258
#common root password
253259
shutil.copyfile(f"{self.file_name}{self.render}", 'pswd/common-pswd3.txt')
@@ -299,7 +305,7 @@ def Process(self):
299305
if self.bday == False:
300306
pass
301307
else:
302-
self.bday()
308+
self.birthday()
303309
#common root password/ more complicated password
304310
#leak db password are getting stronger with the depth argument
305311
shutil.copyfile(f"{self.file_name}{self.render}", 'pswd/common-pswd4.txt')
@@ -360,31 +366,46 @@ def Process(self):
360366
pass
361367

362368
else:
363-
self.bday()
364-
for word in self.words:
369+
self.birthday()
370+
file.write("debut"+ '\n')
371+
372+
word2 = []
373+
temp = ""
374+
self.words = self.words + " "
375+
#print(repr(self.words))
376+
self.bday = str(self.bday).replace("/", "")
377+
print(self.bday)
378+
379+
for l in self.words:
380+
if l == " ":
381+
word2.append(temp)
382+
temp = ""
383+
else:
384+
temp += l
385+
for i in word2:
365386
#year
366-
file.write(word + self.bday[5:8])
387+
file.write(i + self.bday[5:8]+ '\n')
367388
#2last digits year
368-
file.write(word + self.bday[6:8])
389+
file.write(i + self.bday[6:8]+ '\n')
369390
#month + 2last digits year
370-
file.write(word + self.bday[2:4] + self.bday[6:8])
391+
file.write(i + self.bday[2:4] + self.bday[6:8]+ '\n')
371392

372-
file.write(word + self.bday[2:4] + self.bday[0:2] + self.bday[6:8])
373-
file.write(word + self.bday[0:2] + self.bday[6:8])
374-
file.write(word + self.bday[0:2])
375-
file.write(word + self.bday[0:2] + self.bday[2:4])
393+
file.write(i + self.bday[2:4] + self.bday[0:2] + self.bday[6:8]+ '\n')
394+
file.write(i + self.bday[0:2] + self.bday[6:8]+ '\n')
395+
file.write(i + self.bday[0:2]+ '\n')
396+
file.write(i + self.bday[0:2] + self.bday[2:4]+ '\n')
376397

377398

378-
file.write((word + self.bday[5:8]).capitalize())
399+
file.write((i + self.bday[5:8]+ '\n').capitalize())
379400
#2last digits year
380-
file.write((word + self.bday[6:8]).capitalize())
401+
file.write((i + self.bday[6:8]+ '\n').capitalize())
381402
#month + 2last digits year
382-
file.write((word + self.bday[2:4] + self.bday[6:8]).capitalize())
403+
file.write((i + self.bday[2:4] + self.bday[6:8]+ '\n').capitalize())
383404

384-
file.write((word + self.bday[2:4] + self.bday[0:2] + self.bday[6:8]).capitalize())
385-
file.write((word + self.bday[0:2] + self.bday[6:8]).capitalize())
386-
file.write((word + self.bday[0:2]).capitalize())
387-
file.write((word + self.bday[0:2] + self.bday[2:4]).capitalize())
405+
file.write((i + self.bday[2:4] + self.bday[0:2] + self.bday[6:8]+ '\n').capitalize())
406+
file.write((i + self.bday[0:2] + self.bday[6:8]+ '\n').capitalize())
407+
file.write((i + self.bday[0:2]+ '\n').capitalize())
408+
file.write((i + self.bday[0:2] + self.bday[2:4]+ '\n').capitalize())
388409

389410

390411

@@ -539,5 +560,4 @@ def finish(self):
539560
begin.choice()
540561

541562

542-
543563

0 commit comments

Comments
 (0)