Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
lib /
ruby /
vendor_ruby /
openid /
[ HOME SHELL ]
Name
Size
Permission
Action
consumer
[ DIR ]
drwxr-xr-x
extensions
[ DIR ]
drwxr-xr-x
store
[ DIR ]
drwxr-xr-x
yadis
[ DIR ]
drwxr-xr-x
association.rb
7.36
KB
-rw-r--r--
consumer.rb
15.62
KB
-rw-r--r--
cryptutil.rb
2.99
KB
-rw-r--r--
dh.rb
2.66
KB
-rw-r--r--
extension.rb
1.12
KB
-rw-r--r--
fetchers.rb
7.46
KB
-rw-r--r--
kvform.rb
3.26
KB
-rw-r--r--
kvpost.rb
1.62
KB
-rw-r--r--
message.rb
16.13
KB
-rw-r--r--
protocolerror.rb
120
B
-rw-r--r--
server.rb
49.72
KB
-rw-r--r--
trustroot.rb
10.65
KB
-rw-r--r--
urinorm.rb
1.77
KB
-rw-r--r--
util.rb
2.74
KB
-rw-r--r--
version.rb
38
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : cryptutil.rb
require "openid/util" require "digest/sha1" require "digest/sha2" begin require "openssl" rescue LoadError begin # Try loading the ruby-hmac files if they exist require "hmac-sha1" require "hmac-sha2" rescue LoadError # Nothing exists use included hmac files require "hmac/sha1" require "hmac/sha2" end end module OpenID # This module contains everything needed to perform low-level # cryptograph and data manipulation tasks. module CryptUtil # Generate a random number, doing a little extra work to make it # more likely that it's suitable for cryptography. If your system # doesn't have /dev/urandom then this number is not # cryptographically safe. See # <http://www.cosine.org/2007/08/07/security-ruby-kernel-rand/> # for more information. max is the largest possible value of such # a random number, where the result will be less than max. def CryptUtil.rand(max) Kernel.srand() return Kernel.rand(max) end def CryptUtil.sha1(text) return Digest::SHA1.digest(text) end def CryptUtil.hmac_sha1(key, text) if defined? OpenSSL OpenSSL::HMAC.digest(OpenSSL::Digest::SHA1.new, key, text) else return HMAC::SHA1.digest(key, text) end end def CryptUtil.sha256(text) return Digest::SHA256.digest(text) end def CryptUtil.hmac_sha256(key, text) if defined? OpenSSL OpenSSL::HMAC.digest(OpenSSL::Digest::SHA256.new, key, text) else return HMAC::SHA256.digest(key, text) end end # Generate a random string of the given length, composed of the # specified characters. If chars is nil, generate a string # composed of characters in the range 0..255. def CryptUtil.random_string(length, chars=nil) s = "" unless chars.nil? length.times { s << chars[rand(chars.length)] } else length.times { s << rand(256).chr } end return s end # Convert a number to its binary representation; return a string # of bytes. def CryptUtil.num_to_binary(n) bits = n.to_s(2) prepend = (8 - bits.length % 8) bits = ('0' * prepend) + bits return [bits].pack('B*') end # Convert a string of bytes into a number. def CryptUtil.binary_to_num(s) # taken from openid-ruby 0.0.1 s = "\000" * (4 - (s.length % 4)) + s num = 0 s.unpack('N*').each do |x| num <<= 32 num |= x end return num end # Encode a number as a base64-encoded byte string. def CryptUtil.num_to_base64(l) return OpenID::Util.to_base64(num_to_binary(l)) end # Decode a base64 byte string to a number. def CryptUtil.base64_to_num(s) return binary_to_num(OpenID::Util.from_base64(s)) end def CryptUtil.const_eq(s1, s2) if s1.length != s2.length return false end result = true s1.length.times do |i| result &= (s1[i] == s2[i]) end return result end end end
Close