Finding the right Command Line Arguments

Status
Not open for further replies.

netsider

Limp Gawd
Joined
Oct 12, 2004
Messages
466
I didn't know where to post this, but decided to put it under security.

I lost one of my passwords, and I'm trying to retrieve it by generating a list of the different words its composed of, by using Crunch (in Linux). I'm finding this program to be extremely flexible... but extremely hard to generate certain types of combinations, and seems like it requires a tedious amount of trial-and-error (for me, anyway).

I'm using the following command to generate all the different combinations possible, of the different words:

crunch 5 5 -o word1.txt -t ppppp -p dog cat fish bird kangaroo

I also used a command *similar* (this may be wrong) to this one:

crunch 8 8 -o word2.txt + + + !@# -t ppppp^^^ -p dog cat fish bird kangaroo

Both of them worked well, but the problem I'm having is that I want to add special characters to it, but I don't want it to generate every possible combination (like the 2nd command above). I'd like to specify it manually, like so:

crunch 6 6 -o word2.txt -t pppppp -p dog cat fish bird kangaroo !@#$% (This is incorrect and returns an error, but it's what I'd like to do).

I tried using the "-l" (lowercase-L) option to specify literals, but it also returns an error. I also tried specifying "-t pppppppp" and "-t ppppp!@#", as well as "-t ppppp^^^".. but they all produce errors also.

Is there anyway to do what I'm describing? I just want to specify the special characters like I did everything else.. as a word.

Thanks to anyone who can help me.. this is getting kinda nerve-wacking.. especially since I've lost my password. I know it's a combination of these words (the above are fake, however), so if I can get it to do this.. I'll be good (This password didn't make it into Keepass, obviously).

Take care.

:eek:
 
Not sure if this is the best way, but it works for me for other purposes.
First create /tmp/special-chars file containing "!@#$%". Then you'll set a variable to be read from the contents of the text file containing the special characters, and use that variable in place of the special characters in your command.

I'm not familiar with the syntax of crunch, and didn't spend any time analyzing it, so this is just a quick example based on what you wrote:
Code:
$ cat /tmp/special-chars
!@#$%
$
$ chars="$(cat /tmp/special-chars)"
$ crunch 6 6 -o word2.txt -t pppppp -p dog cat fish bird kangaroo $chars
 
Last edited:
Status
Not open for further replies.
Back
Top