Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
slips
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DeStream-public
slips
Commits
d9efc929
Unverified
Commit
d9efc929
authored
Aug 21, 2017
by
Pavol Rusnak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slip0016: use urlparse in pwdreader proof of concept
parent
f3aa073c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
pwdreader.py
slip-0016/pwdreader.py
+8
-2
No files found.
slip-0016/pwdreader.py
View file @
d9efc929
...
...
@@ -9,6 +9,7 @@ import hmac
import
hashlib
import
json
import
os
from
urlparse
import
urlparse
# Return path by BIP-32
def
getPath
():
...
...
@@ -81,9 +82,14 @@ def getDecryptedNonce(entry):
print
'Waiting for TREZOR input ...'
print
if
'item'
in
entry
:
item
=
entry
[
'item'
]
.
replace
(
'http://'
,
''
)
.
replace
(
'https://'
,
''
)
item
=
entry
[
'item'
]
else
:
item
=
entry
[
'title'
]
.
replace
(
'http://'
,
''
)
.
replace
(
'https://'
,
''
)
item
=
entry
[
'title'
]
pr
=
urlparse
(
item
)
if
pr
.
scheme
and
pr
.
netloc
:
item
=
pr
.
netloc
ENC_KEY
=
'Unlock
%
s for user
%
s?'
%
(
item
,
entry
[
'username'
])
ENC_VALUE
=
entry
[
'nonce'
]
decrypted_nonce
=
hexlify
(
client
.
decrypt_keyvalue
(
...
...
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