Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Crunch dictgen + Special characters (namely ! ")

  1. #1
    Very good friend of the forum TAPE's Avatar
    Join Date
    Jan 2010
    Location
    Europe
    Posts
    599

    Default Crunch dictgen + Special characters (namely ! ")

    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;

    Code:
    pentest/password/crunch 4 4 0123456789!@#$%^&*() &> test.txt
    result;
    -bash:!@#$%^: event not found
    
    so tried with "
    Code:
    pentest/password/crunch 4 4 "0123456789!@#$%^&*()" &> test.txt
    result;
    -bash:!@#$%^: event not found
    
    alas

    Removed the !
    Code:
    pentest/password/crunch 4 4 "0123456789@#$%^&*()" &> test.txt
    Success.

    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 !

  2. #2
    Senior Member streaker69's Avatar
    Join Date
    Jan 2010
    Location
    Virginville, BlueBall, Bird In Hand, Intercourse, Paradise, PA
    Posts
    3,535

    Default

    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.

  3. #3
    Very good friend of the forum TAPE's Avatar
    Join Date
    Jan 2010
    Location
    Europe
    Posts
    599

    Default

    Ahh...

    I shall have another go

    Thanks for the info Streaker !

  4. #4
    Member
    Join Date
    Jan 2010
    Posts
    140

    Default

    This worked for me.
    Code:
    # crunch 4 4 '0123456789!@#$%^&*()' &> test.txt

  5. #5
    Very good friend of the forum TAPE's Avatar
    Join Date
    Jan 2010
    Location
    Europe
    Posts
    599

    Default

    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 !

  6. #6
    Member
    Join Date
    Jan 2010
    Posts
    140

    Default

    Quote Originally Posted by =TAPE= View Post
    I had managed to sort out all other characters with the ' as well, but then unable to use the ' in the charset..
    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.
    Code:
    # crunch 4 4 "0123456789\!'@#$%^&*()" &> test.txt
    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 && sed -i '/\\/d' 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.

  7. #7
    Very good friend of the forum TAPE's Avatar
    Join Date
    Jan 2010
    Location
    Europe
    Posts
    599

    Default

    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 ;

    Code:
    # crunch 4 4 "\!@$%^&*()-_=+[{]};:'\",<.>/?\~\`" -t '@!@@' > test.txt
    Thanks again, and now looking forward to the final version of crunch in BT4F !

  8. #8
    Good friend of the forums
    Join Date
    Jan 2010
    Location
    outside chicago, il
    Posts
    442

    Default

    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

  9. #9
    Developer
    Join Date
    Mar 2007
    Posts
    6,126

    Default

    Quote Originally Posted by bofh28 View Post
    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.
    It will be

  10. #10
    Very good friend of the forum TAPE's Avatar
    Join Date
    Jan 2010
    Location
    Europe
    Posts
    599

    Default

    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
    Code:
    /pentest/password/crunch 6 6 1234567890 -t "@@'\"\\"
    which is getting kinda cluttered.. but still do-able.

    Or perhaps I should just shut up and be grateful for what's been done so far

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •