module BeEF
module Renderers
module HTML
module Basic
#renders basic string
def self.string(d)
return '
'+d.to_s+'
'
end
#renders list of strings from an array
def self.array(d)
if d.kind_of?(Array)
html = ''
d.each{|v|
html += "- #{v.to_s}
"
}
return html+'
'
end
print_debug "BeEF::Renderers::HTML::Basic.array encountered a non-array data type"
return self.string(d)
end
#renders list of strings from a hash with key values
def self.hash(d)
if d.kind_of?(Hash)
html = ''
d.each{|k,v|
html += "- #{k.to_s}: #{v.to_s}
"
}
return html+'
'
end
print_debug "BeEF::Renderers::HTML::Basic.hash encountered a non-hash data type"
return self.string(d)
end
end
end
end
end