from pwn import *

args = ['./LCARS', 'init.sys', 'loader.sys', 'echo.sys',
        'crypto.sys', 'svc.papp', 'root.key', 'flag1.papp', 'flag22.txt',
        'flag333.txt']
# args = ['strace', '-f'] + args
r = process(args)

def download(app):
    with open(app) as f:
        blob = f.read()
        r.sendline('download %s %d' % (app, len(blob)))
        r.send(blob)

#'''
download('perm.uapp')
download('perm.papp')
download('perm.sapp')
r.sendline('run perm.uapp')
r.sendline('run perm.papp')
r.sendline('run perm.sapp')
#'''

r.interactive()

941774be15545dff6f8cbdf11712d9610583ef1d
<mask token>


def download(app):
    with open(app) as f:
        blob = f.read()
        r.sendline('download %s %d' % (app, len(blob)))
        r.send(blob)


<mask token>

<mask token>


def download(app):
    with open(app) as f:
        blob = f.read()
        r.sendline('download %s %d' % (app, len(blob)))
        r.send(blob)


download('perm.uapp')
download('perm.papp')
download('perm.sapp')
r.sendline('run perm.uapp')
r.sendline('run perm.papp')
r.sendline('run perm.sapp')
r.interactive()

<mask token>
args = ['./LCARS', 'init.sys', 'loader.sys', 'echo.sys', 'crypto.sys',
    'svc.papp', 'root.key', 'flag1.papp', 'flag22.txt', 'flag333.txt']
r = process(args)


def download(app):
    with open(app) as f:
        blob = f.read()
        r.sendline('download %s %d' % (app, len(blob)))
        r.send(blob)


download('perm.uapp')
download('perm.papp')
download('perm.sapp')
r.sendline('run perm.uapp')
r.sendline('run perm.papp')
r.sendline('run perm.sapp')
r.interactive()

from pwn import *
args = ['./LCARS', 'init.sys', 'loader.sys', 'echo.sys', 'crypto.sys',
    'svc.papp', 'root.key', 'flag1.papp', 'flag22.txt', 'flag333.txt']
r = process(args)


def download(app):
    with open(app) as f:
        blob = f.read()
        r.sendline('download %s %d' % (app, len(blob)))
        r.send(blob)


download('perm.uapp')
download('perm.papp')
download('perm.sapp')
r.sendline('run perm.uapp')
r.sendline('run perm.papp')
r.sendline('run perm.sapp')
r.interactive()

from pwn import *

args = ['./LCARS', 'init.sys', 'loader.sys', 'echo.sys',
        'crypto.sys', 'svc.papp', 'root.key', 'flag1.papp', 'flag22.txt',
        'flag333.txt']
# args = ['strace', '-f'] + args
r = process(args)

def download(app):
    with open(app) as f:
        blob = f.read()
        r.sendline('download %s %d' % (app, len(blob)))
        r.send(blob)

#'''
download('perm.uapp')
download('perm.papp')
download('perm.sapp')
r.sendline('run perm.uapp')
r.sendline('run perm.papp')
r.sendline('run perm.sapp')
#'''

r.interactive()
