Last active
December 19, 2016 01:21
-
-
Save sidartaoliveira/1ebf036e7a2e4b854e0163504791c9e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import serial | |
ser = serial.Serial('/dev/ttyUSB1') | |
ser.flushInput() | |
ser.flushOutput() | |
while True: | |
data_raw = ser.readline() | |
print(data_raw.rstrip('\n')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from serial import Serial | |
from time import sleep | |
ser = Serial("/dev/ttyUSB0") | |
ser.write(open("/etc/hosts","rb").read()) | |
ser.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$ base64 /dev/urandom | head -c 1024000 > file.txt