-
Notifications
You must be signed in to change notification settings - Fork 29
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
Serial interface implementation #1
base: master
Are you sure you want to change the base?
Conversation
Thanks for your contribution, actually I would prefer not to add any required dependency to the project (only PythonForWindows). |
I am slightly confused. You want to improve the pull request or you don't want the serial implementation entirely ? The former I'm happy to do, but the latter would be somewhat sad, because, as crazy as it is, there is no good Python implementation for serial interface i/o |
…ts to some of them (min used in original pwntools; I use max for timeout since it makes more sense). Minor optimisations
Sorry, I want to improve and merge the pull request but I prefer not to impose a new dependency. Can you remove pyserial dependency from requirements.txt and setup.py? Like this: class SerialTube(object): # you don't need serial.Serial parent since you use conn
def __init__(
self, port = None, baudrate = 115200,
convert_newlines = True,
bytesize = 8, parity='N', stopbits=1, xonxoff = False,
rtscts = False, dsrdtr = False, *a, **kw):
# you don't need super too
try:
import serial
except ImportError:
raise(ImportError("pyserial module not found :: Please pip install pyserial==3.0.1")) It's a bit dirty, if you have a better idea feel free to implement it :) |
Hey! Sorry for the delay, life's been busy for some months. I'll see if I can fix this |
@masthoon I think I fixed it? Let me know if I can do anything else P.S. You may also wanna check out the script at https://github.com/TAbdiukov/pwintools-samples |
Serial interface implementation