incompatible encoding regexp match error
opened this issue · comments
While running pipal against the passwords included in the newseasims.com dump, I ran into an error:
$ ./pipal.rb -o 2013.04.20-newseasims_com-pipal 2013.04.20-newseasims_com-pwd
Generating stats, hit CTRL-C to finish early and dump stats on words already processed.
Please wait...
Something went wrong, please report it to robin@digininja.org along with these messages:
incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string)
Encoding::CompatibilityError
Backtrace:
./pipal.rb:401:in `=~'
./pipal.rb:401:in `block (3 levels) in <main>'
./pipal.rb:331:in `each_line'
./pipal.rb:331:in `block (2 levels) in <main>'
./pipal.rb:329:in `catch'
./pipal.rb:329:in `block in <main>'
/Users/adamcaudill/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/benchmark.rb:281:in `measure'
./pipal.rb:45:in `<main>'
I was able to correct the error by changing line pipal.rb:340 from
line.force_encoding("ASCII-8BIT")
to:
line.force_encoding("UTF-8")
Running on OSX:
$ ruby -v
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.2.1]
Not sure if it's because I'm running Ruby 2, or something about my setup, I know the ASCII vs UTF8 issue with Ruby can be a nightmare to get right.
Can you send me the dump so I can test it? There was a reason I did it like I did after a lot of testing and messing but I can't remember what it was.
I've uploaded a copy here:
http://adamcaudill.com/files/2013.04.20-newseasims_com-pwd.zip
I'll get it looked at when I get back from BSidesLondon.
On 22 April 2013 18:54, Adam Caudill notifications@github.com wrote:
I've uploaded a copy here:
http://adamcaudill.com/files/2013.04.20-newseasims_com-pwd.zip
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-16807319
.
Couldn't reproduce so closing