[GH-ISSUE #1057] Python helpers overhaul #652

Closed
opened 2026-10-14 03:17:59 +07:00 by bsakaguchi · 9 comments
Owner

Originally created by @magnumripper on GitHub (Feb 18, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1057

Quoting @psypanda in https://github.com/magnumripper/JohnTheRipper/pull/1056#issuecomment-74917401

Please also note that some python scripts still use the deprecated optparse for parsing command line options. It might be a good idea to move from optparse to argparse in the near future.
Here is a list of .py files that still got optparse code in them:

  • aix2john.py
  • bitcoin2john.py
  • blockchain2john.py
  • efs2john.py
  • openssl2john.py
Originally created by @magnumripper on GitHub (Feb 18, 2015). Original GitHub issue: https://github.com/openwall/john/issues/1057 Quoting @psypanda in https://github.com/magnumripper/JohnTheRipper/pull/1056#issuecomment-74917401 > Please also note that some python scripts still use the [deprecated optparse ](https://docs.python.org/2/library/optparse.html) for parsing command line options. It might be a good idea to move from optparse to [argparse](https://docs.python.org/2.7/library/argparse.html) in the near future. > Here is a list of .py files that still got optparse code in them: > - aix2john.py > - bitcoin2john.py > - blockchain2john.py > - efs2john.py > - openssl2john.py
bsakaguchi 2026-10-14 03:17:59 +07:00
Author
Owner

@kholia commented on GitHub (Feb 20, 2015):

@magnumripper Solar cares about supporting super old Python versions. So, we need to do something clever here, I think.

<!-- gh-comment-id:75193788 --> @kholia commented on GitHub (Feb 20, 2015): @magnumripper Solar cares about supporting super old Python versions. So, we need to do something clever here, I think.
Author
Owner

@magnumripper commented on GitHub (Feb 20, 2015):

I guess we'll just do the try-catch dance, or is it harder this time? Or we could throw python to h3ll and use something that doesn't change the rules as you are typing.

<!-- gh-comment-id:75214044 --> @magnumripper commented on GitHub (Feb 20, 2015): I guess we'll just do the try-catch dance, or is it harder this time? Or we could throw python to h3ll and use something that doesn't change the rules as you are typing.
Author
Owner

@psypanda commented on GitHub (Feb 20, 2015):

Well supporting python >= v2.5 and >= v3.0 makes sense for me, but why such old versions as v2.2 (release December 2001)? What would be the benefit?

<!-- gh-comment-id:75215332 --> @psypanda commented on GitHub (Feb 20, 2015): Well supporting python >= v2.5 and >= v3.0 makes sense for me, but why such old versions as v2.2 _(release December 2001)_? What would be the benefit?
Author
Owner

@magnumripper commented on GitHub (Feb 24, 2015):

Let's concentrate on 3.x while trying to keep compatibility with last 2.7. On the other hand, there's no need to drop existing code for older versions - we can just add try/catch kludges. Solar is welcome to contribute kludges for Python 1.0 if he wants to.

<!-- gh-comment-id:75850009 --> @magnumripper commented on GitHub (Feb 24, 2015): Let's concentrate on 3.x while trying to keep compatibility with last 2.7. On the other hand, there's no need to drop _existing_ code for older versions - we can just add try/catch kludges. Solar is welcome to contribute kludges for Python 1.0 if he wants to.
Author
Owner

@magnumripper commented on GitHub (Feb 24, 2015):

we need to do something clever here

You can't do anything clever with a language this stupid.

<!-- gh-comment-id:75850645 --> @magnumripper commented on GitHub (Feb 24, 2015): > we need to do something clever here You can't do anything clever with a language this stupid.
Author
Owner

@kholia commented on GitHub (Feb 27, 2015):

I made a mistake when I said "v2.2". Supporting Python >=2.4 should be good enough (TM).

I also agree with magnum's suggestions. Patches are welcome ;)

<!-- gh-comment-id:76370295 --> @kholia commented on GitHub (Feb 27, 2015): I made a mistake when I said "v2.2". Supporting Python >=2.4 should be good enough (TM). I also agree with magnum's suggestions. Patches are welcome ;)
Author
Owner

@campeador commented on GitHub (Apr 24, 2015):

Hello, how can i push this files with modifications ?

<!-- gh-comment-id:96040940 --> @campeador commented on GitHub (Apr 24, 2015): Hello, how can i push this files with modifications ?
Author
Owner

@magnumripper commented on GitHub (Apr 24, 2015):

It's "Fork & Pull": https://help.github.com/articles/using-pull-requests/

Thanks in advance!

<!-- gh-comment-id:96042363 --> @magnumripper commented on GitHub (Apr 24, 2015): It's "Fork & Pull": https://help.github.com/articles/using-pull-requests/ Thanks in advance!
Author
Owner

@magnumripper commented on GitHub (Dec 4, 2015):

Reviewing last couple of comments I guess this is fixed.

<!-- gh-comment-id:161860572 --> @magnumripper commented on GitHub (Dec 4, 2015): Reviewing last couple of comments I guess this is fixed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#652
No description provided.