Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop python 2 support #370

Closed
hackathi opened this issue Jan 16, 2020 · 11 comments
Closed

Drop python 2 support #370

hackathi opened this issue Jan 16, 2020 · 11 comments

Comments

@hackathi
Copy link
Contributor

So, the Python 2 End of Life is now finally around the corner and happens on April 2020. A number of famous projects already stopped supporting py2 in new releases; and even though boofuzz' support for Python 3 is relatively new, I feel we should discuss about dropping python 2 support with some future version.

Dropping python 2 would enable us to use new Python 3 exclusive features such as Typehints, keyword-only-arguments (looking at you, Target and Session), Pathlib, and others.

Now, I know that this is a somewhat big deal so it would probably make sense to make a road map and decide which version would be the last to support Python 2.

@hackathi
Copy link
Contributor Author

Also, at least one dependency (Tornado) already dropped python 2 support.

@SR4ven SR4ven mentioned this issue Jan 19, 2020
2 tasks
@jtpereyda
Copy link
Owner

Advantages of moving to Py 3:

  1. Use all the helpful language features from Py 3.

Disadvantages:

  1. Limit compatibility on some systems (since boofuzz is a research tool rather than an on-target exploit tool, I don't think this matters much TBH).
  2. Unable to use more obscure dependencies.

Any others?

If that's it and we could get rid of disadvantage 2, I'd say let's go for it. I suspect these two more-obscure Windows dependencies haven't been tested on Python 3:

  1. pydbg
  2. pydasm

Has anybody tried these with Python 3? Or know of any replacements?

@hackathi
Copy link
Contributor Author

Couldn't pydasm be replaced by capstone? Additional benefits include support for x86_64 and a boatload of other architectures like ARM.

I don't know of a replacement for pydbg, that is something that someone shoud look into.

@jtpereyda
Copy link
Owner

Now that I look, boofuzz only uses pydbg directly, and pydbg uses pydasm.

I've received in-person feedback about boofuzz not supporting 64-bit applications on Windows due to pydbg's status, so switching to something modern would be a big plus. I'm sure there is something newer out there, but I don't know what.

Back to upgrading: I believe pydb is only used by the procmon app, so I guess we could isolate Py2 compatibility there. That leads to a bit of a messy situation though.

@SR4ven SR4ven added this to the v1.0.0 milestone Feb 16, 2020
@SR4ven SR4ven removed this from the v1.0.0 milestone Feb 21, 2020
@keisentraut
Copy link
Contributor

I can tell you my personal feedback about the monitors: I never got it to work, maybe because I only tested with 64bit applications :) However, I had a few Python2 vs. 3 annoyances with boofuzz, so dropping support for Python2 and removing the monitors for now would increase my user experience.

@jtpereyda
Copy link
Owner

As mentioned in #505, looks like it will be harder to continue supporting Python 2.7 on Windows. But Windows with libdasm was the only use case for which we don't have Python 3 support so... I think we might as well drop support. Right?

If somebody wants to use libdasm with boofuzz they can go through the necessary footwork (using on old boofuzz version or making it Py3 compatible).

@SR4ven
Copy link
Collaborator

SR4ven commented Apr 23, 2021

Currently Windows Python 2.7 tests are failing because Microsoft doesn't provide vcpython27 downloads any longer. Hence the choco package is broken which will also be marked deprecated.
I don't see a way to work around this, so I suggest disabling the said test environment. (I'd also be happy removing the linux build too so we can get rid of python 2.7 entirely)

Additionally the docs build is failing because of a broken link, related to the same issue. In the Install docs we state it's required to download and install pydasm. This seems to require vcpython27 too.
Does this make the whole Windows process_monitor unusable?
Anyway, we'll have to update the docs.

If somebody wants to use libdasm with boofuzz they can go through the necessary footwork (using on old boofuzz version or making it Py3 compatible).

Agreed, if someone needs these feature they'll have to work a way out to get a working Python2 environment themselves.

@jtpereyda if I got you right you'd be fine with dropping Python 2 support entirely too?

@jtpereyda
Copy link
Owner

@SR4ven Yes, let's go ahead and drop it.

The only thing will be to make sure we have some kind of procmon on Windows. I think it may indeed require pydasm right now as the docs suggest. If so, we could take any option that gets us mostly working (e.g., modifying how the procmon works, or perhaps even using the simple debugger on Windows).

@jtpereyda
Copy link
Owner

But let's try to do something quick rather than perfect-- I guess users won't be able to follow the instructions as written now, which is lame.

@SR4ven
Copy link
Collaborator

SR4ven commented Apr 24, 2021

Sounds good, I'll see if I can put something together today or tomorrow.

@SR4ven
Copy link
Collaborator

SR4ven commented May 31, 2021

Python 2 support was dropped in #506

@SR4ven SR4ven closed this as completed May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants