Linux premium155.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
LiteSpeed
: 162.0.235.200 | : 3.139.98.10
Cant Read [ /etc/named.conf ]
7.4.33
varifktc
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
opt /
alt /
ruby33 /
share /
ruby /
syntax_suggest /
[ HOME SHELL ]
Name
Size
Permission
Action
capture
[ DIR ]
drwxr-xr-x
api.rb
6.07
KB
-rw-r--r--
around_block_scan.rb
6.9
KB
-rw-r--r--
block_expand.rb
4.87
KB
-rw-r--r--
capture_code_context.rb
6.67
KB
-rw-r--r--
clean_document.rb
8.73
KB
-rw-r--r--
cli.rb
3.12
KB
-rw-r--r--
code_block.rb
2.13
KB
-rw-r--r--
code_frontier.rb
5.61
KB
-rw-r--r--
code_line.rb
6.62
KB
-rw-r--r--
code_search.rb
3.81
KB
-rw-r--r--
core_ext.rb
3.02
KB
-rw-r--r--
display_code_with_line_numbers...
1.77
KB
-rw-r--r--
display_invalid_blocks.rb
1.75
KB
-rw-r--r--
explain_syntax.rb
2.69
KB
-rw-r--r--
left_right_lex_count.rb
4.06
KB
-rw-r--r--
lex_all.rb
1.66
KB
-rw-r--r--
lex_value.rb
1.5
KB
-rw-r--r--
parse_blocks_from_indent_line....
1.5
KB
-rw-r--r--
pathname_from_message.rb
1.42
KB
-rw-r--r--
priority_engulf_queue.rb
1.26
KB
-rw-r--r--
priority_queue.rb
2
KB
-rw-r--r--
ripper_errors.rb
960
B
-rw-r--r--
scan_history.rb
2.92
KB
-rw-r--r--
unvisited_lines.rb
705
B
-rw-r--r--
version.rb
76
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : left_right_lex_count.rb
# frozen_string_literal: true module SyntaxSuggest # Find mis-matched syntax based on lexical count # # Used for detecting missing pairs of elements # each keyword needs an end, each '{' needs a '}' # etc. # # Example: # # left_right = LeftRightLexCount.new # left_right.count_kw # left_right.missing.first # # => "end" # # left_right = LeftRightLexCount.new # source = "{ a: b, c: d" # Note missing '}' # LexAll.new(source: source).each do |lex| # left_right.count_lex(lex) # end # left_right.missing.first # # => "}" class LeftRightLexCount def initialize @kw_count = 0 @end_count = 0 @count_for_char = { "{" => 0, "}" => 0, "[" => 0, "]" => 0, "(" => 0, ")" => 0, "|" => 0 } end def count_kw @kw_count += 1 end def count_end @end_count += 1 end # Count source code characters # # Example: # # left_right = LeftRightLexCount.new # left_right.count_lex(LexValue.new(1, :on_lbrace, "{", Ripper::EXPR_BEG)) # left_right.count_for_char("{") # # => 1 # left_right.count_for_char("}") # # => 0 def count_lex(lex) case lex.type when :on_tstring_content # ^^^ # Means it's a string or a symbol `"{"` rather than being # part of a data structure (like a hash) `{ a: b }` # ignore it. when :on_words_beg, :on_symbos_beg, :on_qwords_beg, :on_qsymbols_beg, :on_regexp_beg, :on_tstring_beg # ^^^ # Handle shorthand syntaxes like `%Q{ i am a string }` # # The start token will be the full thing `%Q{` but we # need to count it as if it's a `{`. Any token # can be used char = lex.token[-1] @count_for_char[char] += 1 if @count_for_char.key?(char) when :on_embexpr_beg # ^^^ # Embedded string expressions like `"#{foo} <-embed"` # are parsed with chars: # # `#{` as :on_embexpr_beg # `}` as :on_embexpr_end # # We cannot ignore both :on_emb_expr_beg and :on_embexpr_end # because sometimes the lexer thinks something is an embed # string end, when it is not like `lol = }` (no clue why). # # When we see `#{` count it as a `{` or we will # have a mis-match count. # case lex.token when "\#{" @count_for_char["{"] += 1 end else @end_count += 1 if lex.is_end? @kw_count += 1 if lex.is_kw? @count_for_char[lex.token] += 1 if @count_for_char.key?(lex.token) end end def count_for_char(char) @count_for_char[char] end # Returns an array of missing syntax characters # or `"end"` or `"keyword"` # # left_right.missing # # => ["}"] def missing out = missing_pairs out << missing_pipe out << missing_keyword_end out.compact! out end PAIRS = { "{" => "}", "[" => "]", "(" => ")" }.freeze # Opening characters like `{` need closing characters # like `}`. # # When a mis-match count is detected, suggest the # missing member. # # For example if there are 3 `}` and only two `{` # return `"{"` private def missing_pairs PAIRS.map do |(left, right)| case @count_for_char[left] <=> @count_for_char[right] when 1 right when 0 nil when -1 left end end end # Keywords need ends and ends need keywords # # If we have more keywords, there's a missing `end` # if we have more `end`-s, there's a missing keyword private def missing_keyword_end case @kw_count <=> @end_count when 1 "end" when 0 nil when -1 "keyword" end end # Pipes come in pairs. # If there's an odd number of pipes then we # are missing one private def missing_pipe if @count_for_char["|"].odd? "|" end end end end
Close