Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
Smash_pass
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Smashpass
Smash_pass
Commits
3a54f1f1
Commit
3a54f1f1
authored
Dec 23, 2024
by
Benjamin REED
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made dictionary work
parent
0590504d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
main.py
main.py
+12
-1
No files found.
main.py
View file @
3a54f1f1
...
@@ -340,7 +340,18 @@ def generate_password(length, charset, words: bool = False):
...
@@ -340,7 +340,18 @@ def generate_password(length, charset, words: bool = False):
s
=
[]
s
=
[]
dic
=
open
(
DICTIONARY_PATH
)
dic
=
open
(
DICTIONARY_PATH
)
lines
=
dic
.
read
()
.
split
(
'
\n
'
)
# 2 MEGABYTES by the way
lines
=
dic
.
read
()
.
split
(
'
\n
'
)
# 2 MEGABYTES by the way
for
line
in
lines
:
skipped
=
0
i
=
random
.
randint
(
100
,
3000
)
while
True
:
if
i
>=
len
(
lines
):
i
=
random
.
randint
(
100
,
3000
)
line
=
lines
[
i
]
if
random
.
randint
(
0
,
50
)
!=
12
and
skipped
<
40
:
skipped
+=
1
i
=
random
.
randint
(
400
+
skipped
,
3000
+
skipped
*
8000
)
continue
skipped
=
0
if
'/'
not
in
line
:
continue
word
=
line
.
split
(
'/'
)[
0
]
word
=
line
.
split
(
'/'
)[
0
]
if
len
(
word
)
>=
length
:
continue
if
len
(
word
)
>=
length
:
continue
if
len
(
s
)
+
len
(
word
)
>=
length
:
if
len
(
s
)
+
len
(
word
)
>=
length
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment