Core: Resolve many Rubocop violations (#2282)
This commit is contained in:
@@ -4,33 +4,31 @@
|
||||
# See the file 'doc/COPYING' for copying permission
|
||||
#
|
||||
module BeEF
|
||||
module API
|
||||
module NetworkStack
|
||||
module Handlers
|
||||
module AssetHandler
|
||||
module API
|
||||
module NetworkStack
|
||||
module Handlers
|
||||
module AssetHandler
|
||||
# Binds a file to be accessible by the hooked browser
|
||||
# @param [String] file file to be served
|
||||
# @param [String] path URL path to be bound, if no path is specified a randomly generated one will be used
|
||||
# @param [String] extension to be used in the URL
|
||||
# @param [Integer] count amount of times the file can be accessed before being automatically unbound. (-1 = no limit)
|
||||
# @return [String] URL bound to the specified file
|
||||
# @todo Add hooked browser parameter to only allow specified hooked browsers access to the bound URL. Waiting on Issue #336
|
||||
# @note This is a direct API call and does not have to be registered to be used
|
||||
def self.bind(file, path = nil, extension = nil, count = -1)
|
||||
BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind(file, path, extension, count)
|
||||
end
|
||||
|
||||
# Binds a file to be accessible by the hooked browser
|
||||
# @param [String] file file to be served
|
||||
# @param [String] path URL path to be bound, if no path is specified a randomly generated one will be used
|
||||
# @param [String] extension to be used in the URL
|
||||
# @param [Integer] count amount of times the file can be accessed before being automatically unbound. (-1 = no limit)
|
||||
# @return [String] URL bound to the specified file
|
||||
# @todo Add hooked browser parameter to only allow specified hooked browsers access to the bound URL. Waiting on Issue #336
|
||||
# @note This is a direct API call and does not have to be registered to be used
|
||||
def self.bind(file, path=nil, extension=nil, count=-1)
|
||||
return BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind(file, path, extension, count)
|
||||
# Unbinds a file made accessible to hooked browsers
|
||||
# @param [String] url the bound URL
|
||||
# @todo Add hooked browser parameter to only unbind specified hooked browsers binds. Waiting on Issue #336
|
||||
# @note This is a direct API call and does not have to be registered to be used
|
||||
def self.unbind(url)
|
||||
BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.unbind(url)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Unbinds a file made accessible to hooked browsers
|
||||
# @param [String] url the bound URL
|
||||
# @todo Add hooked browser parameter to only unbind specified hooked browsers binds. Waiting on Issue #336
|
||||
# @note This is a direct API call and does not have to be registered to be used
|
||||
def self.unbind(url)
|
||||
BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.unbind(url)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user