Skip to content

Instantly share code, notes, and snippets.

@sidartaoliveira
Last active December 19, 2016 01:21
Show Gist options
  • Save sidartaoliveira/1ebf036e7a2e4b854e0163504791c9e2 to your computer and use it in GitHub Desktop.
Save sidartaoliveira/1ebf036e7a2e4b854e0163504791c9e2 to your computer and use it in GitHub Desktop.
#!/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'))
#!/usr/bin/python
from serial import Serial
from time import sleep
ser = Serial("/dev/ttyUSB0")
ser.write(open("/etc/hosts","rb").read())
ser.close()
@sidartaoliveira
Copy link
Author

sidartaoliveira commented Dec 19, 2016

$ base64 /dev/urandom | head -c 1024000 > file.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment