Skip to content

Commit

Permalink
Memoize
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Jan 23, 2013
1 parent 78394b8 commit 6797cb4
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/ronin/exploits/sqli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ class SQLi < Web
# The place-holder Object.
#
def place_holder
case self.escape.to_sym
when :integer then url_query_param_value.to_i
when :string then url_query_param_value.to_s
when :list
case url_query_param_value
when /^\d+$/ then [url_query_param_value.to_i]
else [url_query_param_value.to_s]
end
when :column then url_query_param_value.to_sym
end
@place_holder ||= case self.escape.to_sym
when :integer then url_query_param_value.to_i
when :string then url_query_param_value.to_s
when :list
case url_query_param_value
when /^\d+$/ then [url_query_param_value.to_i]
else [url_query_param_value.to_s]
end
when :column then url_query_param_value.to_sym
end
end

#
Expand Down

0 comments on commit 6797cb4

Please sign in to comment.