Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../opt/alt/ruby18/lib64/ruby/1.8
File: digest.rb
require 'digest.so'
[0] Fix | Delete
[1] Fix | Delete
module Digest
[2] Fix | Delete
def self.const_missing(name)
[3] Fix | Delete
case name
[4] Fix | Delete
when :SHA256, :SHA384, :SHA512
[5] Fix | Delete
lib = 'digest/sha2.so'
[6] Fix | Delete
else
[7] Fix | Delete
lib = File.join('digest', name.to_s.downcase)
[8] Fix | Delete
end
[9] Fix | Delete
[10] Fix | Delete
begin
[11] Fix | Delete
require lib
[12] Fix | Delete
rescue LoadError => e
[13] Fix | Delete
raise LoadError, "library not found for class Digest::#{name} -- #{lib}", caller(1)
[14] Fix | Delete
end
[15] Fix | Delete
unless Digest.const_defined?(name)
[16] Fix | Delete
raise NameError, "uninitialized constant Digest::#{name}", caller(1)
[17] Fix | Delete
end
[18] Fix | Delete
Digest.const_get(name)
[19] Fix | Delete
end
[20] Fix | Delete
[21] Fix | Delete
class ::Digest::Class
[22] Fix | Delete
# creates a digest object and reads a given file, _name_.
[23] Fix | Delete
#
[24] Fix | Delete
# p Digest::SHA256.file("X11R6.8.2-src.tar.bz2").hexdigest
[25] Fix | Delete
# # => "f02e3c85572dc9ad7cb77c2a638e3be24cc1b5bea9fdbb0b0299c9668475c534"
[26] Fix | Delete
def self.file(name)
[27] Fix | Delete
new.file(name)
[28] Fix | Delete
end
[29] Fix | Delete
end
[30] Fix | Delete
[31] Fix | Delete
module Instance
[32] Fix | Delete
# updates the digest with the contents of a given file _name_ and
[33] Fix | Delete
# returns self.
[34] Fix | Delete
def file(name)
[35] Fix | Delete
File.open(name, "rb") {|f|
[36] Fix | Delete
buf = ""
[37] Fix | Delete
while f.read(16384, buf)
[38] Fix | Delete
update buf
[39] Fix | Delete
end
[40] Fix | Delete
}
[41] Fix | Delete
self
[42] Fix | Delete
end
[43] Fix | Delete
end
[44] Fix | Delete
end
[45] Fix | Delete
[46] Fix | Delete
def Digest(name)
[47] Fix | Delete
Digest.const_get(name)
[48] Fix | Delete
end
[49] Fix | Delete
[50] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function