Don't you need to escape those characters?
http://steve-parker.org/sh/escape.shtml
Hey guys,
I have been going nuts trying to get something to work, for the life of me I can't figure out what I am doing wrong.
I am working with the BT3F version of crunch, and am trying to get a simple wordlist with special characters.
I have not had any difficulties using crunch before, but was then basically only using alpha-numeric.
Code I was trying was similar to the below but including more special characters;
so tried with "Code:pentest/password/crunch 4 4 0123456789!@#$%^&*() &> test.txt result; -bash:!@#$%^: event not found
alasCode:pentest/password/crunch 4 4 "0123456789!@#$%^&*()" &> test.txt result; -bash:!@#$%^: event not found
Removed the !
Success.Code:pentest/password/crunch 4 4 "0123456789@#$%^&*()" &> test.txt
Removing the inverted commas resulted in
-bash: syntax error near unexpected token '&>'
So basically would appreciate some pointers on what I am missing to be able to include the characters ! + "
I am sure its something silly however after looking through the posts on crunch on the forums and finding bitterly little info on the net..
turning to the pro's once more !
Don't you need to escape those characters?
http://steve-parker.org/sh/escape.shtml
A third party security audit is the IT equivalent of a colonoscopy. It's long, intrusive, very uncomfortable, and when it's done, you'll have seen things you really didn't want to see, and you'll never forget that you've had one.
Ahh...
I shall have another go
Thanks for the info Streaker !
This worked for me.
Code:# crunch 4 4 '0123456789!@#$%^&*()' &> test.txt
Thanks your reply larry,
I had managed to sort out all other characters with the ' as well, but then unable to use the ' in the charset..
After trying various combos I decided to leave it for a day and try a bit harder today !
Thanks for the info though and if you manage to get all chars. in there, pls lemme know !
Well I was playing around with crunch for a few minutes. I was able to get crunch to output the text file with all of the characters using the double quotes. You are right that the exclamation point "!" was the problem character. Using streaker69's advice I was able to escape the exclamation point "!" character with the backslash key "\". I also added the single quote (ie "'") character.
However, this produced a text file with the unwanted backslash "\" character. Using a simple sed statement I was able to get rid of all lines that contained the backslash character "\" in them. Try this to get the desired result.Code:# crunch 4 4 "0123456789\!'@#$%^&*()" &> test.txt
It looks like the shell bash and the program crunch interpret the backslash differently. Bash ignores the backslash and interprets the exclamation point as a literal character. But crunch interprets the backslash as a literal characther and includes it in its output.Code:# crunch 4 4 "0123456789\!'@#$%^&*()" &> test.txt && sed -i '/\\/d' test.txt
larry, thanks again for your reply and help.
Think its sorted !
Basically I was starting off just wanting a simply 7 character list with a fixed "!" and was then later just trying to get
all special characters in a wordlist as I didnt quite get why I was having so much trouble !
When using the " or ' I has having trouble including them in the actual charset.
So following yours and Streakers, think it is sorted with the following for including all special characters;
edit, forgot the ` ~
Code:# crunch 4 4 "\!@$%^&*()-_=+[{]};:'\",<.>/?\~\`" > test.txt
And for using the -t filter with ! as follows ;
Thanks again, and now looking forward to the final version of crunch in BT4F !Code:# crunch 4 4 "\!@$%^&*()-_=+[{]};:'\",<.>/?\~\`" -t '@!@@' > test.txt
I added support for reading a charset.lst into crunch so you can pass the name of a character set in the file to crunch instead of the character set directly. That version should be in the BT4 final.
I like the bleeding edge, but I don't like blood loss
Looking forward to the release in BT4F !
Will there be a different way to include fixed characters which require an escape ?
For example if creating a 6 character numeric list requiring " & ' & \ as fixed, the code in current version would be
which is getting kinda cluttered.. but still do-able.Code:/pentest/password/crunch 6 6 1234567890 -t "@@'\"\\"
Or perhaps I should just shut up and be grateful for what's been done so far![]()