Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.35
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
ruby /
vendor_ruby /
phusion_passenger /
Delete
Unzip
Name
Size
Permission
Date
Action
admin_tools
[ DIR ]
drwxrwxrwx
2020-08-24 23:49
apache2
[ DIR ]
drwxrwxrwx
2020-08-24 23:49
config
[ DIR ]
drwxrwxrwx
2020-08-24 23:49
nginx
[ DIR ]
drwxrwxrwx
2020-08-24 23:49
platform_info
[ DIR ]
drwxrwxrwx
2020-08-24 23:49
rack
[ DIR ]
drwxrwxrwx
2020-08-24 23:49
request_handler
[ DIR ]
drwxrwxrwx
2020-08-24 23:49
standalone
[ DIR ]
drwxrwxrwx
2020-08-24 23:49
utils
[ DIR ]
drwxrwxrwx
2020-08-24 23:49
vendor
[ DIR ]
drwxrwxrwx
2020-08-24 23:49
abstract_installer.rb
13.22
KB
-rwxrwxrwx
2019-03-17 19:40
admin_tools.rb
1.78
KB
-rwxrwxrwx
2019-03-17 19:40
common_library.rb
9.99
KB
-rwxrwxrwx
2019-03-17 19:40
console_text_template.rb
2.11
KB
-rwxrwxrwx
2019-03-17 19:40
constants.rb
5.55
KB
-rwxrwxrwx
2019-03-17 19:40
debug_logging.rb
3.85
KB
-rwxrwxrwx
2019-03-17 19:40
loader_shared_helpers.rb
21.52
KB
-rwxrwxrwx
2019-03-17 19:40
locations.ini
576
B
-rwxrwxrwx
2019-03-17 19:40
message_channel.rb
10.6
KB
-rwxrwxrwx
2019-03-17 19:40
message_client.rb
3.87
KB
-rwxrwxrwx
2019-03-17 19:40
native_support.rb
15.67
KB
-rwxrwxrwx
2019-03-17 19:40
packaging.rb
4.19
KB
-rwxrwxrwx
2019-03-17 19:40
platform_info.rb
16.19
KB
-rwxrwxrwx
2019-03-17 19:40
plugin.rb
2.92
KB
-rwxrwxrwx
2019-03-17 19:40
preloader_shared_helpers.rb
5.44
KB
-rwxrwxrwx
2019-03-17 19:40
public_api.rb
3.15
KB
-rwxrwxrwx
2019-03-17 19:40
rack_handler.rb
3.02
KB
-rwxrwxrwx
2019-03-17 19:40
request_handler.rb
21.13
KB
-rwxrwxrwx
2019-03-17 19:40
ruby_core_enhancements.rb
5.25
KB
-rwxrwxrwx
2019-03-17 19:40
ruby_core_io_enhancements.rb
3.54
KB
-rwxrwxrwx
2019-03-17 19:40
simple_benchmarking.rb
1.9
KB
-rwxrwxrwx
2019-03-17 19:40
utils.rb
7.75
KB
-rwxrwxrwx
2019-03-17 19:40
Save
Rename
# encoding: binary # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2011-2014 Phusion Holding B.V. # # "Passenger", "Phusion Passenger" and "Union Station" are registered # trademarks of Phusion Holding B.V. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'socket' require 'tmpdir' PhusionPassenger.require_passenger_lib 'utils' PhusionPassenger.require_passenger_lib 'native_support' module PhusionPassenger # Provides shared functions for preloader apps. module PreloaderSharedHelpers extend self def init(options) if !Kernel.respond_to?(:fork) message = "Smart spawning is not available on this Ruby " + "implementation because it does not support `Kernel.fork`. " if ENV['SERVER_SOFTWARE'].to_s =~ /nginx/i message << "Please set `passenger_spawn_method` to `direct`." else message << "Please set `PassengerSpawnMethod` to `direct`." end raise(message) end return options end def accept_and_process_next_client(server_socket) original_pid = Process.pid client = server_socket.accept client.binmode begin command = client.readline rescue EOFError return nil end if command !~ /\n\Z/ STDERR.puts "Command must end with a newline" elsif command == "spawn\n" while client.readline != "\n" # Do nothing. end # Improve copy-on-write friendliness. GC.start pid = fork if pid.nil? $0 = "#{$0} (forking...)" client.puts "OK" client.puts Process.pid client.flush client.sync = true return [:forked, client] elsif defined?(NativeSupport) NativeSupport.detach_process(pid) else Process.detach(pid) end else STDERR.puts "Unknown command '#{command.inspect}'" end return nil ensure if client && Process.pid == original_pid begin client.close rescue Errno::EINVAL # Work around OS X bug. # https://code.google.com/p/phusion-passenger/issues/detail?id=854 end end end def run_main_loop(options) $0 = "Passenger AppPreloader: #{options['app_root']}" client = nil original_pid = Process.pid if defined?(NativeSupport) unix_path_max = NativeSupport::UNIX_PATH_MAX else unix_path_max = options.fetch('UNIX_PATH_MAX', 100).to_i end if options['socket_dir'] socket_dir = options['socket_dir'] socket_prefix = "preloader" else socket_dir = Dir.tmpdir socket_prefix = "PsgPreloader" end socket_filename = nil server = nil Utils.retry_at_most(128, Errno::EADDRINUSE) do socket_filename = "#{socket_dir}/#{socket_prefix}.#{rand(0xFFFFFFFF).to_s(36)}" socket_filename = socket_filename.slice(0, unix_path_max - 10) server = UNIXServer.new(socket_filename) end server.close_on_exec! File.chmod(0600, socket_filename) # Update the dump information just before telling the preloader that we're # ready because the Passenger core will read and memorize this information. LoaderSharedHelpers.dump_all_information(options) puts "!> Ready" puts "!> socket: unix:#{socket_filename}" puts "!> " while true # We call ::select just in case someone overwrites the global select() # function by including ActionView::Helpers in the wrong place. # https://code.google.com/p/phusion-passenger/issues/detail?id=915 ios = Kernel.select([server, STDIN])[0] if ios.include?(server) result, client = accept_and_process_next_client(server) if result == :forked STDIN.reopen(client) STDOUT.reopen(client) STDOUT.sync = true client.close return :forked end end if ios.include?(STDIN) if STDIN.tty? begin # Prevent bash from exiting when we press Ctrl-D. STDIN.read_nonblock(1) rescue Errno::EAGAIN # Do nothing. end end break end end return nil ensure server.close if server if original_pid == Process.pid File.unlink(socket_filename) rescue nil end end end end # module PhusionPassenger