metasploit-framework/lib/rex/exploitation/powershell/param.rb

28 lines
367 B
Ruby
Raw Normal View History

# -*- coding: binary -*-
module Rex
module Exploitation
module Powershell
class Param
attr_accessor :klass, :name
def initialize(klass,name)
2014-05-05 19:53:36 +00:00
@klass = klass.strip
@name = name.strip.gsub(/\s|,/,'')
end
#
# To String
#
# @return [String] Powershell param
def to_s
"[#{klass}]$#{name}"
end
end
end
end
end