Author Topic: Python version  (Read 8349 times)

Offline gauret

  • Normal Members
  • *
  • Posts: 3
Python version
« on: April 09, 2007, 08:31:07 AM »
Hey there,

I needed a PM version I could run on my Windows Mobile phone without having internet access, and the Javascript version wouldn't run on the included IE or in minimo, so I thought I'd just port the PHP version available here.

Since I know python and there's a version of python for Windows Mobile, that's what I used. It uses TK as a graphical toolkit, but can also be run on the command line (the command line interface is only tested on my Linux PC, Windows Mobile does not have that AFAIK)

Depending on whether you have python 2.4, python 2.5, and/or the python-crypto extention, it will enable more or less hashes. At the moment, it does not support l33t conversion (because I don't use it). Just use "--help" to list the command-line switches.

I've tested quite a few hashes, and it seems to always return the same password as the PHP version, but I did not test it thoroughly. It would need more tests (or even better: a testsuite). The "convert any string to the required charset" function is close to black magic to me, but that's because I'm a very inexperienced programmer

Anyway, here it is, if you want to look at it of if you think it could be useful to you: http://gauret.free.fr/fichiers/passwordmaker.py
It can work with python 2.4 or python 2.5, the python-crypto module, and uses Tkinter (TK) for the graphical interface.
Python for Windows Mobile : http://pythonce.sourceforge.net
How to install TK on WM: http://pythonce.sourceforge.net/Wikka/Tkinter
python-crypto: http://www.amk.ca/python/code/crypto (should be already packaged by your favorite distro)
It should work on plain Windows too, but I didn't try it.

By the way, any idea when the java version would be available ? I tried to compile it from SVN on my Linux PC and failed (but then, I don't know java...)

Thanks !

Offline Eric H. Jung

  • grimholtz
  • Administrator
  • *****
  • Posts: 3353
Python version
« Reply #1 on: April 20, 2007, 02:46:28 PM »
Interesting stuff! You didn't even put your name in the source file. Should I post this to SourceForge for general download with other passwordmaker editions?

Offline Miquel 'Fire' Burns

  • Administrator
  • *****
  • Posts: 1157
  • Programmer
Python version
« Reply #2 on: April 20, 2007, 03:41:22 PM »
Quote
 Written by Miquel Burns and Eric H. Jung

  PHP version written by Pedro Gimeno Fortea
      <http://www.formauri.es/personal/pgimeno/>
  and updated by Miquel Matthew 'Fire' Burns
      <[email protected]>
  Ported to Python by Aurelien Bompard
      <http://aurelien.bompard.org>

He did put his name there, and it's dual licenced (LGPL and Public Domain it seems...  )

[edit] Just tested it, and it's a good start. A few things need to be done to work like the online edition (before the multi account thing, if that was set public anyway)
« Last Edit: April 20, 2007, 03:43:28 PM by miquelfire »
"I'm not drunk, just sleep deprived."

Offline gauret

  • Normal Members
  • *
  • Posts: 3
Python version
« Reply #3 on: April 20, 2007, 05:08:56 PM »
Thanks. Concerning the license, it's the same as the PHP version, since it's basically a port of it.
When you consider it correct, feel free to add it to sourceforge.

Offline Miquel 'Fire' Burns

  • Administrator
  • *****
  • Posts: 1157
  • Programmer
Python version
« Reply #4 on: April 20, 2007, 05:49:47 PM »
I added it to the SVN. Since I know too little about Python (and even less about TK), I can't do any more than that.
"I'm not drunk, just sleep deprived."

Offline Eric H. Jung

  • grimholtz
  • Administrator
  • *****
  • Posts: 3353
Python version
« Reply #5 on: April 26, 2007, 01:32:54 AM »
Quote
A few things need to be done to work like the online edition
Like what? This will give me the excuse I've needed to learn Python.

Offline Miquel 'Fire' Burns

  • Administrator
  • *****
  • Posts: 1157
  • Programmer
Python version
« Reply #6 on: April 27, 2007, 02:18:21 AM »
The input url thing is the only thing I can think of. And maybe a way to not require the use of hitting the generate button?

And it seems my Gentoo box doesn't have TK installed or something.
"I'm not drunk, just sleep deprived."

Offline gauret

  • Normal Members
  • *
  • Posts: 3
Python version
« Reply #7 on: April 27, 2007, 05:23:07 AM »
It also does not have l33t support at all

Offline Miquel 'Fire' Burns

  • Administrator
  • *****
  • Posts: 1157
  • Programmer
Python version
« Reply #8 on: April 27, 2007, 01:40:16 PM »
That too.
"I'm not drunk, just sleep deprived."

PasswordMaker Forums

Python version
« Reply #8 on: April 27, 2007, 01:40:16 PM »