From ca5da765c54c50c19083e8471bb2d58f1537426a Mon Sep 17 00:00:00 2001 From: bmc <> Date: Wed, 29 Mar 2006 18:40:15 +0000 Subject: [PATCH] * fix oddball bug with newlines thanks to using Regexp to split chars git-svn-id: file:///home/svn/incoming/trunk@3576 4d416f70-5f16-0410-b530-b9f4589650da --- lib/rex/text.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rex/text.rb b/lib/rex/text.rb index 970b6f3ce8..5f117efdef 100644 --- a/lib/rex/text.rb +++ b/lib/rex/text.rb @@ -117,7 +117,7 @@ module Text # the regex the first time it is used and never check again. Since we # want to know how many to capture on every instance, we do it this # way. - return str.gsub(Regexp.new(".{#{count}}")) { |s| prefix + s.unpack('H*')[0] } + return str.unpack('H*')[0].gsub(Regexp.new(".{#{count * 2}}")) { |s| prefix + s } end #