Linux server1.dn-server.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
LiteSpeed
Server IP : 195.201.204.189 & Your IP : 216.73.216.198
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
ruby34 /
share /
ruby /
irb /
Delete
Unzip
Name
Size
Permission
Date
Action
cmd
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
command
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
debug
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
ext
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
helper_method
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
lc
[ DIR ]
drwxr-xr-x
2026-05-05 23:08
color.rb
9.18
KB
-rw-r--r--
2026-04-07 16:51
color_printer.rb
1.29
KB
-rw-r--r--
2026-04-07 16:51
command.rb
484
B
-rw-r--r--
2026-04-07 16:51
completion.rb
14.6
KB
-rw-r--r--
2026-04-07 16:51
context.rb
21.61
KB
-rw-r--r--
2026-04-07 16:51
debug.rb
4.47
KB
-rw-r--r--
2026-04-07 16:51
default_commands.rb
7.98
KB
-rw-r--r--
2026-04-07 16:51
easter-egg.rb
4.19
KB
-rw-r--r--
2026-04-07 16:51
frame.rb
1.92
KB
-rw-r--r--
2026-04-07 16:51
help.rb
612
B
-rw-r--r--
2026-04-07 16:51
helper_method.rb
657
B
-rw-r--r--
2026-04-07 16:51
history.rb
3.15
KB
-rw-r--r--
2026-04-07 16:51
init.rb
14.64
KB
-rw-r--r--
2026-04-07 16:51
input-method.rb
14.04
KB
-rw-r--r--
2026-04-07 16:51
inspector.rb
3.99
KB
-rw-r--r--
2026-04-07 16:51
locale.rb
3.96
KB
-rw-r--r--
2026-04-07 16:51
nesting_parser.rb
8.69
KB
-rw-r--r--
2026-04-07 16:51
notifier.rb
7.18
KB
-rw-r--r--
2026-04-07 16:51
output-method.rb
2.24
KB
-rw-r--r--
2026-04-07 16:51
pager.rb
2.82
KB
-rw-r--r--
2026-04-07 16:51
ruby-lex.rb
15.94
KB
-rw-r--r--
2026-04-07 16:51
ruby_logo.aa
9.39
KB
-rw-r--r--
2026-04-07 16:51
source_finder.rb
4.22
KB
-rw-r--r--
2026-04-07 16:51
statement.rb
1.4
KB
-rw-r--r--
2026-04-07 16:51
version.rb
239
B
-rw-r--r--
2026-04-07 16:51
workspace.rb
5.37
KB
-rw-r--r--
2026-04-07 16:51
ws-for-case-2.rb
160
B
-rw-r--r--
2026-04-07 16:51
xmp.rb
3.99
KB
-rw-r--r--
2026-04-07 16:51
Save
Rename
# frozen_string_literal: true module IRB # The implementation of this class is borrowed from RDoc's lib/rdoc/ri/driver.rb. # Please do NOT use this class directly outside of IRB. class Pager PAGE_COMMANDS = [ENV['RI_PAGER'], ENV['PAGER'], 'less', 'more'].compact.uniq class << self def page_content(content, **options) if content_exceeds_screen_height?(content) page(**options) do |io| io.puts content end else $stdout.puts content end end def page(retain_content: false) if should_page? && pager = setup_pager(retain_content: retain_content) begin pid = pager.pid yield pager ensure pager.close end else yield $stdout end # When user presses Ctrl-C, IRB would raise `IRB::Abort` # But since Pager is implemented by running paging commands like `less` in another process with `IO.popen`, # the `IRB::Abort` exception only interrupts IRB's execution but doesn't affect the pager # So to properly terminate the pager with Ctrl-C, we need to catch `IRB::Abort` and kill the pager process rescue IRB::Abort begin begin Process.kill("TERM", pid) if pid rescue Errno::EINVAL # SIGTERM not supported (windows) Process.kill("KILL", pid) end rescue Errno::ESRCH # Pager process already terminated end nil rescue Errno::EPIPE end private def should_page? IRB.conf[:USE_PAGER] && STDIN.tty? && (ENV.key?("TERM") && ENV["TERM"] != "dumb") end def content_exceeds_screen_height?(content) screen_height, screen_width = begin Reline.get_screen_size rescue Errno::EINVAL [24, 80] end pageable_height = screen_height - 3 # leave some space for previous and the current prompt # If the content has more lines than the pageable height content.lines.count > pageable_height || # Or if the content is a few long lines pageable_height * screen_width < Reline::Unicode.calculate_width(content, true) end def setup_pager(retain_content:) require 'shellwords' PAGE_COMMANDS.each do |pager_cmd| cmd = Shellwords.split(pager_cmd) next if cmd.empty? if cmd.first == 'less' cmd << '-R' unless cmd.include?('-R') cmd << '-X' if retain_content && !cmd.include?('-X') end begin io = IO.popen(cmd, 'w') rescue next end if $? && $?.pid == io.pid && $?.exited? # pager didn't work next end return io end nil end end end end