PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /proc/self/root/opt/alt/ruby18/lib64/ruby/gems/1.8/gems/ruby-lsapi-5.6/scripts/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //proc/self/root/opt/alt/ruby18/lib64/ruby/gems/1.8/gems/ruby-lsapi-5.6/scripts/lsruby_runner.rb

#!/opt/alt/ruby18/bin/ruby

require 'lsapi'

class CodeCache
    def [](filename)
		mtime = File.mtime( filename )		
		
		entry = @cache[filename];
		if entry != nil 
			return entry
						
		end
		code = compile(filename)
		#entry = CodeEntry.new( filename, mtime, code )
		@cache[filename] = code
		return code
    end

    private

    def initialize
      @cache = {}
    end

    def compile(filename)
		open(filename) do |f|
			s = f.read
			s.untaint
			binding = eval_string_wrap("binding")
			return eval(format("Proc.new {\n%s\n}", s), binding, filename, 0)
		end
    end
end


$count = 0;

$cache = CodeCache.new


while true
	$req = LSAPI.accept 
	break if $req == nil 
	
	filename = ENV['SCRIPT_FILENAME']
	filename.untaint

	filename =~ %r{^(\/.*?)\/*([^\/]+)$}
	path   = $1
	Dir.chdir( path )
	#load( filename, true )	
    code = $cache[filename]
    code.call
	
end

class CodeEntry
	public :path, :name, :mtime, :opcode 
	
	def initizlize( filename, mtime, opcode )
		filename =~ %r{^(\/.*?)\/*([^\/]+)$}
		@path   = $1
		@name   = $2
		@mtime  = mtime
		@opcode = opcode
	end

end