ronys / pypwsafe Goto Github PK
View Code? Open in Web Editor NEWA pure-Python library that can read and write Password Safe v3 files, originally by Paulson McIntyre
Home Page: http://pwsafe.org
License: Other
A pure-Python library that can read and write Password Safe v3 files, originally by Paulson McIntyre
Home Page: http://pwsafe.org
License: Other
Due to the fact that python2 is obsolete now package name was changed for python2-mcrypt.
Requirements in setup.py need to be updated.
install_requires = [ 'distribute', 'python2-mcrypt', 'hashlib', 'pycrypto', ]
README.md also need to be updated
Trying to run psafedump, but getting this error:
psafedump -f passwordfile.psafe3 -p password --display
2013-10-23 11:48:22,957 DEBUG initing
Traceback (most recent call last):
File "/usr/bin/psafedump", line 299, in
mode = mode,
File "/usr/lib/python2.7/site-packages/pypwsafe/init.py", line 211, in init
self.load()
File "/usr/lib/python2.7/site-packages/pypwsafe/init.py", line 389, in load
hdr = Create_Header(self._fetch_block)
File "/usr/lib/python2.7/site-packages/pypwsafe/PWSafeV3Headers.py", line 957, in Create_Header
return headers[rtype](rtype, rlen, data)
File "/usr/lib/python2.7/site-packages/pypwsafe/PWSafeV3Headers.py", line 396, in init
Header.init(self, htype, hlen, raw_data)
File "/usr/lib/python2.7/site-packages/pypwsafe/PWSafeV3Headers.py", line 75, in init
self.parse()
File "/usr/lib/python2.7/site-packages/pypwsafe/PWSafeV3Headers.py", line 404, in parse
time_data = unhexlify(time_data)
TypeError: Non-hexadecimal digit found
Following procedure is legit (checked on Monterey)
Hi,
When I try to update .psafe3 file using below command
$python pwsafecli.py get --uuid "" --password "" --file OperationsSafe2018.psafe3 2>updatePwsafe.err
then OperationsSafe2018.psafe3 got corrupted and unable to get record again.
Please help. Thank you
No handlers could be found for logger "psafe.lib.record"
[
Group: ['Infra Servers', 'Test Servers']
Title: myserver
Username: root
Password: test123
UUID: ****
Note:
Created: 2015-08-23 01:15:28
PasswordModified: 2017-05-19 14:42:33
EntryModified: 2018-02-22 06:40:28
LastAccess: 2018-02-22 06:40:28
Expires: 1970-01-01 00:00:00
Email:
URL:
AutoType:
]
No handlers could be found for logger "psafe.lib.record"
[
Group: ['Infra Servers', 'Test Servers']
Title: myserver
Username: root
Password: test123
UUID: ****
Note:
Created: 2015-08-23 01:15:28
PasswordModified: 2017-05-19 14:42:33
EntryModified: 2018-02-22 06:40:54
LastAccess: 2018-02-22 06:40:54
Expires: 1970-01-01 00:00:00
Email:
URL:
AutoType:
]
No handlers could be found for logger "psafe.lib.record"
No handlers could be found for logger "psafe.lib.record"
Traceback (most recent call last):
File "pwsafecli.py", line 421, in
main(options)
File "pwsafecli.py", line 403, in main
func(options)
File "pwsafecli.py", line 251, in get_action
safe = get_safe(options.filename, options.safe_password)
File "pwsafecli.py", line 164, in get_safe
mode = "RW")
File "/opt/Python/2.7.14/lib/python2.7/site-packages/pypwsafe/init.py", line 211, in init
self.load()
File "/opt/Python/2.7.14/lib/python2.7/site-packages/pypwsafe/init.py", line 389, in load
hdr = Create_Header(self._fetch_block)
File "/opt/Python/2.7.14/lib/python2.7/site-packages/pypwsafe/PWSafeV3Headers.py", line 964, in Create_Header
return headers[rtype](rtype, rlen, data)
File "/opt/Python/2.7.14/lib/python2.7/site-packages/pypwsafe/PWSafeV3Headers.py", line 852, in init
Header.init(self, htype, hlen, raw_data)
File "/opt/Python/2.7.14/lib/python2.7/site-packages/pypwsafe/PWSafeV3Headers.py", line 75, in init
self.parse()
File "/opt/Python/2.7.14/lib/python2.7/site-packages/pypwsafe/PWSafeV3Headers.py", line 860, in parse
assert len(left) % LEN == 2
AssertionError
pypwsafe/pwsafecli/pwsafecli.py
Line 283 in 1264bf5
Should be add_or_update_record
A setup.py needs to be added so that the library can auto install.
I belive migrating code to python3.x is one of the first thing, that has to be done, before any other improvements can happen.
./pwsafecli.py get -f ~/hasla_gorilla.psafe3 --username "foobar"
[
Group: ['WWW']
Title: Znak sklep
Username: foobar
Password: ****
UUID: ca518748-f5ee-430c-4a6e-ced087907170
Note:
Created: 2022-08-06 14:09:05
PasswordModified: 2022-10-03 19:56:20
EntryModified: 2022-10-03 19:56:20
LastAccess: 2022-10-03 19:56:20
Expires: 1970-01-01 00:00:00
Email:
URL: znak.pl
AutoType:
]
./pwsafecli.py update -f ~/hasla_gorilla.psafe3 --uuid "ca518748-f5ee-430c-4a6e-ced087907170" --password "****"
[
Group: ['WWW']
Title: Znak sklep
Username: foobar
Password: ****
UUID: ca518748-f5ee-430c-4a6e-ced087907170
Note:
Created: 2022-08-06 14:09:05
PasswordModified: 2022-10-03 19:56:20
EntryModified: 2022-10-03 19:56:20
LastAccess: 2022-10-03 19:56:20
Expires: 1970-01-01 00:00:00
Email:
URL: znak.pl
AutoType:
]
[
Group: ['WWW']
Title: Znak sklep
Username: foobar
Password: ****
UUID: ca518748-f5ee-430c-4a6e-ced087907170
Note:
Created: 2022-08-06 14:09:05
PasswordModified: 2022-10-03 19:56:20
EntryModified: 2022-10-03 19:56:20
LastAccess: 2022-10-03 19:56:20
Expires: 1970-01-01 00:00:00
Email:
URL: znak.pl
AutoType:
]
Update PasswordExpiryIntervalRecordProp so that it supports both two byte and four byte values per the PSafeV3 spec update below.
http://sourceforge.net/p/passwordsafe/git-code/ci/7488e042083970f178df58de9d0ec63205074595/
Note: The current implementation should work with all versions of the actual app but other libs/tools written according to the spec may use two bytes.
I am currently using the old pwsafe
CLI (from http://sf.net/projects/pwsafe) with version control and a wrapper script to maintain a shared repository of passwords with my team of sys admins. The CLI supports 2-way merging with interactive confirmation, which results in an almost-workable solution, but in order to be really seamless 3-way merge is needed: Then it could be used as a custom/external diff3/merge with most of the
major SCMs. (Interactive merging for conflict resolution would be nice too.)
Currently the various database-level setters off of PWSafe3 will sliently accept string inputs that are Unicode. Later parts of PyPWSafe will error out when they try to seralize these strings.
For example:
[2013-02-04 00:47:23,812: DEBUG/MainProcess] Adding hmac data u'some random unicode string' from 'DBNameHeader' ... [2013-02-04 00:47:23,814: DEBUG/MainProcess] Adding hmac data 'Y\xf0-5&\xaaA\x9c\x91m\xfc\x10l\xba\x88\x0f' from 'UUIDHeader' [2013-02-04 00:47:23,835: ERROR/MainProcess] Task psafefe.psafe.tasks.write.newSafe[3479fca0-4728-4b4a-a63e-d3b6c88342c6] raised exception: UnicodeDecodeError('ascii', 'Y\xf0-5&\xaaA\x9c\x91m\xfc\x10l\xba\x88\x0f', 1, 2, 'ordinal not in range(128)') Traceback (most recent call last): ... File ".../pypwsafe-web/src/psafefe/psafe/tasks/write.py", line 72, in newSafe pypwsafe.save() File ".../pypwsafe/src/pypwsafe/__init__.py", line 258, in save self.serialiaze() File ".../pypwsafe/src/pypwsafe/__init__.py", line 277, in serialiaze self.hmac = self.current_hmac() File ".../pypwsafe/src/pypwsafe/__init__.py", line 453, in current_hmac data += i.hmac_data() UnicodeDecodeError: 'ascii' codec can't decode byte 0xf0 in position 1: ordinal not in range(128)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.