mirror of
https://github.com/phooky/Apple-410.git
synced 2024-10-31 21:07:02 +00:00
21 lines
360 B
Python
Executable File
21 lines
360 B
Python
Executable File
#!/usr/bin/python3
|
|
import sys
|
|
|
|
st_start = 0x94b
|
|
|
|
assert len(sys.stdin.buffer.read(st_start)) == st_start
|
|
|
|
while 1:
|
|
cmdlen = ord(sys.stdin.buffer.read(1))
|
|
if cmdlen == 0:
|
|
break
|
|
cmd = sys.stdin.buffer.read(cmdlen)
|
|
if cmd[-1] != 3:
|
|
print("Invalid entry")
|
|
break
|
|
else:
|
|
print(cmd[0:-1].decode('ascii'))
|
|
|
|
|
|
|