From 0b8eebcacef03bbd0b20c9f4d7e635dfced08987 Mon Sep 17 00:00:00 2001 From: James Lee Date: Fri, 3 Sep 2010 23:48:46 +0000 Subject: [PATCH] make sure sets has something in it. lib/msf/core/exploit.rb sends this a nil if the user didn't specify anything git-svn-id: file:///home/svn/framework3/trunk@10235 4d416f70-5f16-0410-b530-b9f4589650da --- lib/rex/text.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/rex/text.rb b/lib/rex/text.rb index 755ca62d17..a7d12bd6ad 100644 --- a/lib/rex/text.rb +++ b/lib/rex/text.rb @@ -756,6 +756,8 @@ module Text buf = '' idx = 0 offsets = [] + # Make sure there's something in sets even if we were given an explicit nil + sets ||= [ UpperAlpha, LowerAlpha, Numerals ] sets.length.times { offsets << 0 }