von / PerProxy

A python-based proxy that uses Perspectives to detect and thwart SSL MITM attacks.
7 stars 2 forks source link

Python version issues in code requiring Python 2.7 or 3.2 #9

Closed von closed 13 years ago

von commented 13 years ago

The code uses several aspects of Python that are version dependent and require the latest major versions of Python (2.7 and 3.2 at this time). All these aspects should be supported by newer versions of Python, so will just cause problems with older versions (i.e. 2.6 and 3.0).

The particular issues are:

1) The use of argparse

2) Using format() with without argument names or positions, e.g. "{}".format(a) instead of "{0}.format(a)

Both of these are rather prevalent through the code and I'm not sure at this time if I'm going to fix this or just make 2.7/3.2+ a requirement.

von commented 13 years ago

argparse can be installed in Python 2.6, at least, from https://code.google.com/p/argparse/

von commented 13 years ago

Dan W. has a fix for the format() issue: 66e541c65910783bc91d6d6ef160254f852a829a

von commented 13 years ago

Looks like non-blocking recv() on ssl.socket are broken in Python prior to 2.6.6: http://bugs.python.org/issue3890

von commented 13 years ago

With installation of argparse, the branch python-2.6 is now working with Python 2.6