blob: 48754b4639a22794b1253b2c1fd7b332548533b1 [file] [log] [blame]
class ExploitableBackDoor
def exploited?
@exploited_through_setter || @exploited_through_init_with || @exploited_through_ivars
end
def exploited_through_setter?
@exploited_through_setter
end
def exploited_through_init_with?
@exploited_through_init_with
end
def exploited_through_ivars?
self.instance_variables.any?
end
def init_with(command)
# Note: this is how bad this COULD be.
# system("#{command}")
@exploited_through_init_with = true
end
def []=(command, arguments)
# Note: this is how bad this COULD be.
# system("#{command} #{arguments}")
@exploited_through_setter = true
end
end