1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-05 14:57:30 +01:00
metasploit-framework/tools/pattern_create.rb
Joshua Drake 0e72894e58 more cleanups
git-svn-id: file:///home/svn/framework3/trunk@9212 4d416f70-5f16-0410-b530-b9f4589650da
2010-05-03 17:13:09 +00:00

21 lines
432 B
Ruby
Executable File

#!/usr/bin/env ruby
#
# $Id$
# $Revision$
#
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'rex'
if (!(length = ARGV.shift))
$stderr.puts("Usage: #{File.basename($0)} length [set a] [set b] [set c]\n")
exit
end
# If the user supplied custom sets, use those. Otherwise, use the default
# sets.
sets = ARGV.length > 0 ? ARGV : Rex::Text::DefaultPatternSets
puts Rex::Text.pattern_create(length.to_i, sets)