Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Convert all python code to python3. Fixes #12506. #12524
This is a breaking change that removes support for python2. Not every file in the change has been fully tested because of limited access to the exploit target environments, but running with
2to3 is the recommended utility for auto translation for python 2 -> 3. I also manually edited some files where 2to3 performed unexpectedly.
acammack-r7 left a comment
Thanks for your work on this! I think we will want a somewhat different approach from this, though. First, the output of 2to3 is a bit quirky and there are some things, like extra calls to
On the shebangs, files that can run under 2 and 3 should be allowed to do so. Also, as I understand it, the encoding can now taken from the operating system's
Thanks again for submitting this, there are definitely a couple places you caught that I wouldn't have thought to check!
- Change executable in shebang from python3 to python - Revert changes to files that will only run as python2 Co-Authored-By: acammack-r7 <email@example.com>
- Revert files that will only run as python2. - Remove superfluous calls to list() - Other minor cleanup
When I was testing the windows shellcode builders, I encountered 2 errors on master.
According to this, you can just remove the
Should I add this change to this PR?
Here is the change required to fix the error:
Should I add that change to this PR? Similar to above, I diff-ed the results from master and this branch after the edit was made, and the results were identical.
I think the first checkbox can be checked.
If you could give me some help for testing the other ones that would be great.
In Metasploit the verification steps are mostly for the person landing the PR to verify all the proposed changes have their expected result. Verifying the rest of the changes will require a Metasploit development environment and a working knowledge of how to use
I'll try to set aside some time to look at this since I have most of this software set up already, but the code looks good and any the team members that want to take this on can.