digininja / CeWL

CeWL is a Custom Word List Generator
1.9k stars 255 forks source link

[Feature Request] add include/exclude spaces to -g #84

Closed Shooter3k closed 3 years ago

Shooter3k commented 3 years ago

Could you add an option to include/exclude spaces to the -g option (or even both)?

Maybe it could work like:

-s , --spaces : must be used with -g. Option: 1- include spaces, 2- exclude spaces, 3- include both. Default 1

so the results would look like: 1- so the the results results would would look look like

2- sothe theresults resultswould wouldlook looklike

3- so the the results results would would look look like sothe theresults resultswould wouldlook looklike

digininja commented 3 years ago

Check the grouping branch, I've just added a new parameter which lets you specify as many separators as you want, e.g.

/cewl.rb --groupseparators ", -" cewl.test -g 2

The only problem is I can't see an easy way to also say you want no separator with this method, any suggestions?

Shooter3k commented 3 years ago

ideally, it's just to save the person from running the entire process twice, right? What if the person put the parameter on twice to do that? would that be possible?

/cewl.rb --groupseparators ", -" --groupseparators "" cewl.test -g 2 /cewl.rb --groupseparators "" --groupseparators ", -" cewl.test -g 2

digininja commented 3 years ago

Would work, I'll see how ruby handles duplicate options

On Wed, 4 Aug 2021, 21:44 Shooter3k, @.***> wrote:

ideally, it's just to save the person from running the entire process twice, right? What if the person put the parameter on twice to do that? would that be possible?

/cewl.rb --groupseparators ", -" --groupseparators "" cewl.test -g 2 /cewl.rb --groupseparators "" --groupseparators ", -" cewl.test -g 2

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/digininja/CeWL/issues/84#issuecomment-892961513, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA4SWJJIGOQXPTEABMXEJTT3GRDNANCNFSM5BEPBL4A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

digininja commented 3 years ago

That doesn't work, if the same parameter is passed twice the last one is used and the others ignored.

On Thu, 5 Aug 2021 at 13:17, Robin Wood @.***> wrote:

Would work, I'll see how ruby handles duplicate options

On Wed, 4 Aug 2021, 21:44 Shooter3k, @.***> wrote:

ideally, it's just to save the person from running the entire process twice, right? What if the person put the parameter on twice to do that? would that be possible?

/cewl.rb --groupseparators ", -" --groupseparators "" cewl.test -g 2 /cewl.rb --groupseparators "" --groupseparators ", -" cewl.test -g 2

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/digininja/CeWL/issues/84#issuecomment-892961513, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA4SWJJIGOQXPTEABMXEJTT3GRDNANCNFSM5BEPBL4A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

Shooter3k commented 3 years ago

The biggest issue I see right now is not being able to create/use the original. It would really suck to have to crawl sites more than once, just to get multiple combinations. So, how about the option to just leave the original punctuation instead?

Then if someone wanted multiple combinations, they could just parse the original and create them.

So something like this....Original text: "this, is my quote on the internet!"

/cewl.rb --usepunc "Y" cewl.test -g 2

results (with punctuation like double quotes included in results): "this, is is my my quote quote on on the the internet!"

digininja commented 3 years ago

Try the new --keep-original and see if that does what you want.

Shooter3k commented 3 years ago

This is working wonderfully! Thanks for making this change.

FYI - the --groupseparators parameter may not make a whole lot of sense any more and could just be removed? If not, it might be helpful to provide an example command because using "" did not allow for no separator (either that, or it doesn't work with the new -g group function)

--groupseparators : A list of separators for groups, default

digininja commented 3 years ago

I couldn't get it to work with an empty string as that was taken as no argument by the Ruby library. My suggestion would be to use a character you don't expect to be in the list and then use sed to remove it. I'll update the README

On Wed, 8 Sept 2021 at 03:57, Shooter3k @.***> wrote:

This is working wonderfully! Thanks for making this change.

FYI - the --groupseparators parameter may not make a whole lot of sense any more and could just be removed? If not, it might be helpful to provide an example command because using "" did not allow for no separator (either that, or it doesn't work with the new -g group function)

--groupseparators : A list of separators for groups, default

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/digininja/CeWL/issues/84#issuecomment-914865736, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA4SWJJLGVRATXE5XIEQZ3UA3GLLANCNFSM5BEPBL4A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.