PasswordMaker Forums
Other Editions => Other Editions - Feature Requests / Enhancements => Topic started by: richbeales on November 12, 2008, 07:29:49 AM
-
Hi All,
This is my first post on the forums, I really like the project and the firefox extension is excellent, however I'm more interested in getting a Python port up to date and more functional for everyday usage.
To that end I'm submitting this patch in the hope that it's useful to others and can be committed to the project. This is the product of a couple of hours yesterday, and although i'm a developer I'm still learning Python so please forgive any non-pythonisms! Hopefully if I have time it'll be the first patch of many.
The main changes are:
1) file split into two modules - passwordmaker.py and pwmlib.py
2) settings class added with initial support for saving/retrieving
settings to a file (pwm.settings) (in gui mode only)
3) a few minor typos fixed
This has been tested with Python 2.4/Windows, Python 2.6/Windows and Python 2.6/Linux.
Files located at: http://www.richbeales.net/passwordmaker-patch20081112.zip
Regards,
Rich.
-
Rich,
Thanks very much for the patch. I had a look through it briefly, and it looks good. I'll need to generate a diff/patch file so it can be submitted to Subversion, though. Miquel, have you had a look at it? Tanstaafl?
Eric
-
Actually, a diff is not really needed. I took a quick peak at it already, just waiting until I have time to check on one thing, if we need to include the setting file or not.
-
Hi,
The settings file will be generated automatically if it is not found.
Regards,
Rich.
-
miquel, feel free to commit this before me if you agree the changes are OK. I still haven't gotten a diff to see more precisely what's changed. My SVN client is hosed, gotta find 15 spare minutes to figure out why and/or reinstall.
-
The diff would basically show most of the code leaving passwordmaker.py and being put into pwmlib.py, which happens to cause it to have the same config setup as the PHP version now. Then there's the saving of the changes as well.
It's committed now.
-
Thanks, Miquel. Rich, we look forward to more contributions.
Eric
-
Thanks very much for the patch. I had a look through it briefly, and it looks good. I'll need to generate a diff/patch file so it can be submitted to Subversion, though. Miquel, have you had a look at it? Tanstaafl?
Looks good to me... but since I'm not a programmer, any code looks 'good' to me... ;)
-
Thanks very much for the patch. I had a look through it briefly, and it looks good. I'll need to generate a diff/patch file so it can be submitted to Subversion, though. Miquel, have you had a look at it? Tanstaafl?
Looks good to me... but since I'm not a programmer, any code looks 'good' to me... ;)
How's this (http://www0.us.ioccc.org/2004/omoikane.c) look then?
-
How's this (http://www0.us.ioccc.org/2004/omoikane.c) look then?
Wow!
-
Do we need to issue a new python release now?
-
How's this (http://www0.us.ioccc.org/2004/omoikane.c) look then?
Ha! 'tis a thing of beauty...
-
Do we need to issue a new python release now?
Never had an official release to begin with actually.
-
Sorry to drag this one up, but I had an email appear in my inbox asking for improvements to the UI of the python port, so being a glutton for punishment, I agreed, and have opened a git repository with my new changes at https://github.com/richbeales/passwordmaker-python
However in doing so, the user has discovered an issue in the underlying implementation, which was (I believe) ported straight from the PHP version, and other than refactoring I haven't touched this code. I would be grateful if anyone could answer why the python version starts getting passwords "wrong" when the length requested is > 19 characters?
-
The length before the password is wrong depends on the algorithm and character set actually.
But if that is the case, then the code to make passwords long enough need to be double checked against one of the JS based versions at least.
-
BTW, fixed the PHP version (Just need someone to version bump it in SVN, as I don't know how to do it in command line, as I don't have TSVN installed).
Ignore the var_dump lines, didn't save the file before commiting: http://passwordmaker.svn.sourceforge.net/viewvc/passwordmaker/trunk/php/passwordmaker_class.php?r1=429&r2=487&view=patch
Note: Might want to test a few more characters in your tests, as I found an issue in which the 20th character was correct but the 21st was wrong. Add a test for 22 characters.