Sha256: 17741c12feb5e65f190093cd238e0505e67884ef669bcce0088fd83f61223501
Contents?: true
Size: 718 Bytes
Versions: 27
Compression:
Stored size: 718 Bytes
Contents
#!/usr/bin/ruby require 'bundler/setup' require 'optparse' require 'ruby_smb' # we just need *a* default encoding to handle the strings from the NTLM messages Encoding.default_internal = 'UTF-8' if Encoding.default_internal.nil? options = RubySMB::Server::Cli.parse(defaults: { share_path: '.' }) do |options, parser| parser.banner = "Usage: #{File.basename(__FILE__)} [options]" parser.on("--share-path SHARE_PATH", "The path to share (default: #{options[:share_path]})") do |path| options[:share_path] = path end end server = RubySMB::Server::Cli.build(options) server.add_share(RubySMB::Server::Share::Provider::Disk.new(options[:share_name], options[:share_path])) RubySMB::Server::Cli.run(server)
Version data entries
27 entries across 27 versions & 1 rubygems