<s> from pwn import * <EOL> import os , signal <EOL> context . log_level = <NUM_LIT:1000> <EOL> with tempfile . NamedTemporaryFile ( ) as fd : <EOL> s = randoms ( <NUM_LIT:12> ) <EOL> fd . write ( s ) <EOL> fd . flush ( ) <EOL> try : <EOL> l = listen ( <NUM_LIT:0> ) <EOL> l . spawn_process ( '<STR_LIT>' ) <EOL> p = process ( [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" + str ( l . lport ) ] ) <EOL> p . sendline ( "<STR_LIT>" + fd . name ) <EOL> if p . recvline ( timeout = <NUM_LIT:10> ) . strip ( ) == b64e ( s ) : <EOL> print "<STR_LIT>" <EOL> else : <EOL> print "<STR_LIT>" <EOL> finally : <EOL> p . close ( ) <EOL> os . kill ( l . proc . pid , signal . SIGKILL ) </s>
