<s> """<STR_LIT>""" <EOL> def injectmex86 ( pid , shellcode ) : <EOL> from sys import platform <EOL> if platform . startswith ( '<STR_LIT>' ) : <EOL> print ( "<STR_LIT>" ) <EOL> return False <EOL> else : <EOL> try : <EOL> from ptrace . debugger . debugger import PtraceDebugger <EOL> from ptrace . debugger . debugger import PtraceProcess <EOL> except ImportError : <EOL> print ( "<STR_LIT>" ) <EOL> return False <EOL> else : <EOL> try : <EOL> dbg = PtraceDebugger ( ) <EOL> process = dbg . addProcess ( int ( pid ) , False ) <EOL> eip = process . getInstrPointer ( ) <EOL> bytes = process . writeBytes ( eip , shellcode . replace ( "<STR_LIT>" , "<STR_LIT>" ) . decode ( "<STR_LIT>" ) ) <EOL> process . setreg ( "<STR_LIT>" , <NUM_LIT:0> ) <EOL> process . cont ( ) <EOL> except Exception as error : <EOL> print ( error ) <EOL> print ( "<STR_LIT>" ) <EOL> else : <EOL> print ( "<STR_LIT>" ) </s>
