fixes #259. pass in badchars properly
git-svn-id: file:///home/svn/framework3/trunk@5957 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
2f049269d6
commit
cfbb600304
|
@ -39,11 +39,23 @@ class PayloadsController < ApplicationController
|
|||
payload_opts += "#{$1}=#{v} "
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
|
||||
badchars_buff = ""
|
||||
badchars.split(/,|\s+/).each do |c|
|
||||
c.strip!
|
||||
next if c.length == 0
|
||||
if(c =~ /^0x/)
|
||||
badchars_buff << c.hex.chr
|
||||
else
|
||||
badchars_buff << c.to_i.chr
|
||||
end
|
||||
end
|
||||
|
||||
begin
|
||||
@generation = modinst.generate_simple(
|
||||
'Encoder' => (pencoder == '__default') ? nil : pencoder,
|
||||
'BadChars' => badchars,
|
||||
'BadChars' => badchars_buff,
|
||||
'Format' => pformat || 'c',
|
||||
'OptionStr' => payload_opts,
|
||||
'MaxSize' => (max_size == 0) ? nil : max_size)
|
||||
|
|
Loading…
Reference in New Issue