[framework] REX usage
Jerome Athias
jerome.athias at free.fr
Wed Apr 11 04:50:06 CDT 2007
This is an example:
ruby "C:\Program
Files\Metasploit\Framework3\framework\tools\pattern_create.rb" 1000
pleaseedit this file: pattern_create.rb
You will see:
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'rex'
and then:
puts Rex::Text.pattern_create(length.to_i, sets)
Hope this helps
/JA
Jipe a écrit :
> Hi list,
>
> I'm trying to use the REX method pattern_create but I get the
> following error, I think this is a kind of "include/require" mistake.
>
> jipe at gadabou ~ $ cd trunk/lib/
> jipe at gadabou ~/trunk/lib $ cat test.rb
>
> #!/usr/bin/ruby
> require "rex.rb"
> print Rex::Text::pattern_create(15, Rex::Text::Numerals)
>
> jipe at gadabou ~/trunk/lib $ ./test.rb
> ./rex/text.rb:759:in `converge_sets': undefined method `length' for
> 57:Fixnum (NoMethodError)
> from ./rex/text.rb:755:in `converge_sets'
> from ./rex/text.rb:593:in `pattern_create'
> from ./test.rb:3
> jipe at gadabou ~/trunk/lib $
>
>
> Thanks for your help
>
More information about the framework
mailing list