ronin-rb / ronin-support

A support library for Ronin. Like activesupport, but for hacking!
https://ronin-rb.dev
GNU Lesser General Public License v3.0
27 stars 9 forks source link

0.5.0.rc1 Ronin::Wordlist#save failure #35

Closed evoltech closed 12 years ago

evoltech commented 12 years ago
require 'ronin/wordlist'
words = %w[foo bar baz]
wl = Ronin::Wordlist.new(words, 'o' => ['0', '()'])
wl.save('wlmutate')

results in:

<path>/.rvm/gems/ruby-1.9.3-p194/gems/ronin-support-0.5.0.rc1/lib/ronin/fuzzing/extensions/string.rb:339:in `block in mutate': uninitialized constant String::StringScanner (NameError)
    from <path>/.rvm/gems/ruby-1.9.3-p194/gems/ronin-support-0.5.0.rc1/lib/ronin/fuzzing/extensions/string.rb:318:in `each'
    from <path>/.rvm/gems/ruby-1.9.3-p194/gems/ronin-support-0.5.0.rc1/lib/ronin/fuzzing/extensions/string.rb:318:in `mutate'
    from <path>/.rvm/gems/ruby-1.9.3-p194/gems/ronin-support-0.5.0.rc1/lib/ronin/wordlist.rb:232:in `block in each'
    from <path>/.rvm/gems/ruby-1.9.3-p194/gems/ronin-support-0.5.0.rc1/lib/ronin/wordlist.rb:206:in `each'
    from <path>/.rvm/gems/ruby-1.9.3-p194/gems/ronin-support-0.5.0.rc1/lib/ronin/wordlist.rb:206:in `each_word'
    from <path>/.rvm/gems/ruby-1.9.3-p194/gems/ronin-support-0.5.0.rc1/lib/ronin/wordlist.rb:227:in `each'
    from <path>/.rvm/gems/ruby-1.9.3-p194/gems/ronin-support-0.5.0.rc1/lib/ronin/wordlist.rb:275:in `block in save'
    from <path>/.rvm/gems/ruby-1.9.3-p194/gems/ronin-support-0.5.0.rc1/lib/ronin/wordlist.rb:274:in `open'
    from <path>/.rvm/gems/ruby-1.9.3-p194/gems/ronin-support-0.5.0.rc1/lib/ronin/wordlist.rb:274:in `save'
evoltech commented 12 years ago

I didn't know have time (cause I am not quick at it yet) to write a test case for this otherwise I would have.

postmodern commented 12 years ago

Good catch. Fixed in the 0.5.0 branch.