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 | : 18.188.59.124
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 /
ruby31 /
share /
ruby /
did_you_mean /
[ HOME SHELL ]
Name
Size
Permission
Action
core_ext
[ DIR ]
drwxr-xr-x
formatters
[ DIR ]
drwxr-xr-x
spell_checkers
[ DIR ]
drwxr-xr-x
experimental.rb
139
B
-rw-r--r--
formatter.rb
1.27
KB
-rw-r--r--
jaro_winkler.rb
1.79
KB
-rw-r--r--
levenshtein.rb
1.34
KB
-rw-r--r--
spell_checker.rb
1.27
KB
-rw-r--r--
tree_spell_checker.rb
2.81
KB
-rw-r--r--
verbose.rb
137
B
-rw-r--r--
version.rb
49
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : tree_spell_checker.rb
# frozen_string_literal: true module DidYouMean # spell checker for a dictionary that has a tree # structure, see doc/tree_spell_checker_api.md class TreeSpellChecker attr_reader :dictionary, :separator, :augment def initialize(dictionary:, separator: '/', augment: nil) @dictionary = dictionary @separator = separator @augment = augment end def correct(input) plausibles = plausible_dimensions(input) return fall_back_to_normal_spell_check(input) if plausibles.empty? suggestions = find_suggestions(input, plausibles) return fall_back_to_normal_spell_check(input) if suggestions.empty? suggestions end def dictionary_without_leaves @dictionary_without_leaves ||= dictionary.map { |word| word.split(separator)[0..-2] }.uniq end def tree_depth @tree_depth ||= dictionary_without_leaves.max { |a, b| a.size <=> b.size }.size end def dimensions @dimensions ||= tree_depth.times.map do |index| dictionary_without_leaves.map { |element| element[index] }.compact.uniq end end def find_leaves(path) path_with_separator = "#{path}#{separator}" dictionary .select {|str| str.include?(path_with_separator) } .map {|str| str.gsub(path_with_separator, '') } end def plausible_dimensions(input) input.split(separator)[0..-2] .map .with_index { |element, index| correct_element(dimensions[index], element) if dimensions[index] } .compact end def possible_paths(states) states.map { |state| state.join(separator) } end private def find_suggestions(input, plausibles) states = plausibles[0].product(*plausibles[1..-1]) paths = possible_paths(states) leaf = input.split(separator).last find_ideas(paths, leaf) end def fall_back_to_normal_spell_check(input) return [] unless augment ::DidYouMean::SpellChecker.new(dictionary: dictionary).correct(input) end def find_ideas(paths, leaf) paths.flat_map do |path| names = find_leaves(path) ideas = correct_element(names, leaf) ideas_to_paths(ideas, leaf, names, path) end.compact end def ideas_to_paths(ideas, leaf, names, path) if ideas.empty? nil elsif names.include?(leaf) ["#{path}#{separator}#{leaf}"] else ideas.map {|str| "#{path}#{separator}#{str}" } end end def correct_element(names, element) return names if names.size == 1 str = normalize(element) return [str] if names.include?(str) ::DidYouMean::SpellChecker.new(dictionary: names).correct(str) end def normalize(str) str.downcase! str.tr!('@', ' ') if str.include?('@') str end end end
Close