pypwsafe
pypwsafe copied to clipboard
issue with update option in pwsafecli.py
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
python pwsafecli.py get --title "myserver" --username "root" --file temp.psafe3
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: ]
python pwsafecli.py get --uuid "****" --file temp.psafe3
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: ]
python pwsafecli.py update --uuid "****" --password "abcd1234" --file temp.psafe3
No handlers could be found for logger "psafe.lib.record"
python pwsafecli.py get --uuid "****" --file temp.psafe3
No handlers could be found for logger "psafe.lib.record"
Traceback (most recent call last):
File "pwsafecli.py", line 421, in
Hmm,
I look at it, and i faced completly different issue. The functon responsible for updating is missing. There is no add_or_update_records
anywhere in the code?
Traceback (most recent call last): File "/Users/krzysztof.grzempa/Projects/pypwsafe/pwsafecli/pwsafecli.py", line 422, in <module> main(options) File "/Users/krzysztof.grzempa/Projects/pypwsafe/pwsafecli/pwsafecli.py", line 404, in main func(options) File "/Users/krzysztof.grzempa/Projects/pypwsafe/pwsafecli/pwsafecli.py", line 283, in update_action add_or_update_records(safe, records[0], options) NameError: global name 'add_or_update_records' is not defined
Is it ever been created ?
Oh, there is a typo in 283 line
add_or_update_records(safe, records[0], options)
New issue for that #17
I found other problems in updating like #17 o #18 but cannot reproduce your bug presented in this issue. The assertion error is related to parsing data in PWSafeV3Headers.py:
https://github.com/ronys/pypwsafe/blob/1264bf5d33d2546dd3ca0e02937321facd6f572a/src/pypwsafe/PWSafeV3Headers.py#L860
so somehow it has get corrupted data that doesnt meet lenght criteria, but i dont know why at the moment