LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 01-05-2008, 03:59 PM   #1
musther
Member
 
Registered: Sep 2007
Posts: 36

Rep: Reputation: 15
bash script - progressive world list generator


I used a brute force perl script recently, for getting into an old zip file, and it started me thinking about word list generation.

Now I know bash scripting isn't a very good way to brute force or generate word lists because it would be slow. But the reason I want to get one working is more as a bash programming exercise really, and because when I get something stuck in my head....

So, my question is simply how I would go about creating a script which would generate words (lets just output each one on its own line for now) in a progressive fashion (a, b, c..... aa, ab, ac....) from a list of specified characters.

Thanks
 
Old 01-10-2008, 03:47 PM   #2
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Puppy
Posts: 3,048

Rep: Reputation: 95
i can do it in perl:

perl -e 'map {print "$_ "} ('a'..'zz');'
 
Old 01-10-2008, 04:22 PM   #3
jozyba
Member
 
Registered: Sep 2007
Distribution: Debian Etch, Lenny, Lenny/Sid
Posts: 31

Rep: Reputation: 15
I don't think there's anything as concise as that in bash, the nearest equivalent would be:

echo {a..z}; echo {a..z}{a..z} #etc...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need bash script to list files, drop extension and dump to file talwar_ Programming 10 06-03-2011 09:18 AM
Bash script: how do I select second-to-last argument in a list Robert S Linux - Software 2 11-23-2007 03:06 PM
.Xresource builder generator script? lqorg Linux - Software 0 05-09-2005 08:46 PM
Bash script - mailing list haze Programming 3 05-05-2005 12:03 AM
list of the world wide user of firewalls satishsalve Linux - Networking 1 09-13-2004 06:02 PM


All times are GMT -5. The time now is 11:13 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration