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
2230e7d0
Commit
2230e7d0
authored
Dec 20, 2024
by
Benjamin REED
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working build, smoothed out edges.
parent
eba69816
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
main.py
main.py
+9
-5
No files found.
main.py
View file @
2230e7d0
...
@@ -2,6 +2,7 @@ import sys
...
@@ -2,6 +2,7 @@ import sys
import
getpass
import
getpass
import
secrets
import
secrets
import
os
import
os
import
os.path
import
random
import
random
from
cryptography.fernet
import
Fernet
from
cryptography.fernet
import
Fernet
from
base64
import
urlsafe_b64encode
as
b64e
,
urlsafe_b64decode
as
b64d
from
base64
import
urlsafe_b64encode
as
b64e
,
urlsafe_b64decode
as
b64d
...
@@ -138,6 +139,8 @@ class Password:
...
@@ -138,6 +139,8 @@ class Password:
class
State
:
class
State
:
def
__init__
(
self
,
filepath
,
password
):
def
__init__
(
self
,
filepath
,
password
):
if
not
os
.
path
.
isfile
(
filepath
):
raise
FileNotFoundError
self
.
filepath
=
filepath
self
.
filepath
=
filepath
try
:
try
:
file
=
open
(
filepath
,
'r'
)
file
=
open
(
filepath
,
'r'
)
...
@@ -156,7 +159,6 @@ class State:
...
@@ -156,7 +159,6 @@ class State:
tail
=
lines
[
1
]
tail
=
lines
[
1
]
s
=
tail
.
split
(
":"
)
s
=
tail
.
split
(
":"
)
print
(
s
)
self
.
rsa_key
=
RsaKey
(
eval
(
s
[
0
]),
eval
(
s
[
1
]))
self
.
rsa_key
=
RsaKey
(
eval
(
s
[
0
]),
eval
(
s
[
1
]))
self
.
passwords
=
{}
self
.
passwords
=
{}
...
@@ -293,8 +295,11 @@ def main():
...
@@ -293,8 +295,11 @@ def main():
filepath
=
sys
.
argv
[
1
]
filepath
=
sys
.
argv
[
1
]
if
len
(
sys
.
argv
)
<
3
:
if
len
(
sys
.
argv
)
<
3
:
print
(
f
"No password supplied. Usage: {sys.argv[0]} <database path> <password>"
)
if
os
.
path
.
isfile
(
filepath
):
return
print
(
f
"No password supplied. Usage: {sys.argv[0]} <database path> <password>"
)
return
else
:
password
=
"???"
else
:
else
:
password
=
sys
.
argv
[
2
]
password
=
sys
.
argv
[
2
]
...
@@ -331,11 +336,10 @@ def main():
...
@@ -331,11 +336,10 @@ def main():
keysha
=
password_encrypt
(
"super secret hihi >_>"
.
encode
(),
password
)
keysha
=
password_encrypt
(
"super secret hihi >_>"
.
encode
(),
password
)
file
.
write
(
keysha
)
file
.
write
(
keysha
)
file
.
write
(
'
\n
'
.
encode
())
file
.
write
(
'
\n
'
.
encode
())
print
(
repr
(
key
))
file
.
write
(
f
"{key}"
.
encode
())
file
.
write
(
f
"{key}"
.
encode
())
file
.
write
(
'
\n
'
.
encode
())
file
.
write
(
'
\n
'
.
encode
())
file
.
close
()
file
.
close
()
return
main
()
return
else
:
else
:
return
return
except
Exception
as
e
:
except
Exception
as
e
:
...
...
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