digininja / RSMangler

RSMangler will take a wordlist and perform various manipulations on it similar to those done by John the Ripper with a few extras.
216 stars 32 forks source link

Getting head of a mangle result in exception #8

Open Mister-X- opened 6 years ago

Mister-X- commented 6 years ago

Running something like rsmangler.rb --file wordlist.txt | head on a simple 2 word file will work as expected and output first 10 lines but it will throw an exception at Line 174:

cat
dog
catdog
dogcat
cd
catcat
tac
Cat
CAT
cated
Traceback (most recent call last):
    6: from ./rsmangler.rb:360:in `<main>'
    5: from ./rsmangler.rb:360:in `each'
    4: from ./rsmangler.rb:428:in `block in <main>'
    3: from ./rsmangler.rb:428:in `each'
    2: from ./rsmangler.rb:429:in `block (2 levels) in <main>'
    1: from ./rsmangler.rb:174:in `puts_if_allowed'
./rsmangler.rb:174:in `flush': Broken pipe (Errno::EPIPE)

It doesn't happen with less or without piping. Commenting out that line solves the issue but there may be other side effects