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

2to3 #14

Merged
merged 4 commits into from Jan 4, 2021
Merged

2to3 #14

merged 4 commits into from Jan 4, 2021

Conversation

MKDonnelly
Copy link

@MKDonnelly MKDonnelly commented Jan 13, 2020

This set of commits covers the following:

  • Convert OMSI from using Python 2 to Python 3
  • Log everything displayed to the log file so that the script command is not needed.
  • Fix the remote shell vulnerability

Matthew Donnelly added 4 commits November 25, 2019 19:43
Ran the 2to3 utility to perform syntatic transformation of
Python 2 to Python 3. The code does not work at this stage,
but I wanted to separate out each step.
This part deals with the difference in sockets between Python 2 and 3.
In python 2, it is perfectly fine to send a string via a socket like so.
However, sockets in Python 3 can only send byte strings.  To handle this,
the only change I made was to encode a string before it was sent, and decode
the string just after it is received.
Instead of using the script command to record output from the server,
everything that is displayed to the screen is also sent to the logfile.
@MKDonnelly
Copy link
Author

MKDonnelly commented Jan 3, 2021

@matloff You can either merge this PR in or manually merge with https://github.com/MKDonnelly/omsi/tree/2to3 to pull in the Python 3 changes.

@matloff matloff merged commit 4525575 into matloff:master Jan 4, 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

Successfully merging this pull request may close these issues.

None yet

2 participants