def compileToTemp(language, payloadSource):
 if (language == 'cs'):
  tempExeName = (settings.TEMP_DIR + '/temp.exe')
  tempSourceName = (settings.TEMP_DIR + '/temp.cs')
  f = open((settings.TEMP_DIR + '/temp.cs'), 'w')
  f.write(payloadSource)
  f.close()
  os.system(((('mcs -platform:x86 -target:winexe ' + tempSourceName) + ' -out:') + tempExeName))
  return tempExeName

def compileToTemp ( language , payloadSource ) : if ( language == 'cs' ) : tempExeName = ( settings . TEMP_DIR + '/temp.exe' ) tempSourceName = ( settings . TEMP_DIR + '/temp.cs' ) f = open ( ( settings . TEMP_DIR + '/temp.cs' ) , 'w' ) f . write ( payloadSource ) f . close ( ) os . system ( ( ( ( 'mcs -platform:x86 -target:winexe ' + tempSourceName ) + ' -out:' ) + tempExeName ) ) return tempExeName
compiles payload code to a temporary location and returns the path .