Results 1 to 10 of 10

Thread: Help building Crunch on 11.10?

Hybrid View

  1. #1
    Join Date
    Jun 2010
    Location
    Sacramento, CA
    Beans
    196
    Distro
    Xubuntu 11.04 Natty Narwhal

    Help building Crunch on 11.10?

    Has anyone else come across problems building Crunch wordlist generator on *buntu 11.10? Or has anyone had any success? I'm following the generic "tar, cd, make, make install" dance and here's what I get when I attempt the "make":
    Code:
    [root:/pentest/wordlists/crunch3.1]# ls -lh
    total 132K
    -rw-r--r-- 1 root root 5.5K 2011-04-06 17:13 charset.lst
    -rw-r--r-- 1 root root  16K 2011-07-19 16:42 crunch.1
    -rw-r--r-- 1 root root  77K 2011-07-19 17:39 crunch.c
    -rw-r--r-- 1 root root  18K 2011-04-06 17:13 GPL.TXT
    -rw-r--r-- 1 root root 2.5K 2011-07-19 16:45 Makefile
    
    [root:/pentest/wordlists/crunch3.1]# make
    Building binary...
    /usr/bin/gcc -Wall -lm -pthread -std=c99  crunch.c -o crunch
    crunch.c: In function ‘PrintPercentage’:
    crunch.c:541:20: warning: variable ‘finall’ set but not used [-Wunused-but-set-variable]
    crunch.c: In function ‘renamefile’:
    crunch.c:567:12: warning: variable ‘pidret’ set but not used [-Wunused-but-set-variable]
    crunch.c: In function ‘main’:
    crunch.c:1310:8: warning: variable ‘loaded’ set but not used [-Wunused-but-set-variable]
    crunch.c:1308:8: warning: variable ‘flag4’ set but not used [-Wunused-but-set-variable]
    /tmp/ccOLPNq0.o: In function `main':
    crunch.c:(.text+0x6511): undefined reference to `pow'
    crunch.c:(.text+0x662b): undefined reference to `pow'
    crunch.c:(.text+0x6934): undefined reference to `pow'
    crunch.c:(.text+0x6a84): undefined reference to `pow'
    collect2: ld returned 1 exit status
    make: *** [crunch] Error 1
    [root:/pentest/wordlists/crunch3.1]#

  2. #2

    Re: Help building Crunch on 11.10?

    try adjusting your makefile to put source first, maybe like

    Code:
    build: crunch
    
    
    
    val:    crunch.c
    
    	@echo "Building valgrind compatible binary..."
    
    	$(CC) $? $(VCFLAGS) $(LFS)  -o crunch 
    
    	@echo "valgrind --leak-check=yes crunch ..."
    
    	@echo ""
    
    
    
    crunch: crunch.c
    
    	@echo "Building binary..."
    
    	$(CC) $? $(CFLAGS) $(LFS)  -o $@
    
    	@echo ""

  3. #3
    Join Date
    Jun 2010
    Location
    Sacramento, CA
    Beans
    196
    Distro
    Xubuntu 11.04 Natty Narwhal

    Re: Help building Crunch on 11.10?

    Hrm, I will try that! Thanks! I will report back when I'm finally done. I'm have tried wget'ing crunch again since I rm'd it - but the ETA is saying over 12hrs? Wtf?! Eventually I'll get it. Nothing else online is lagging. Weird.

  4. #4
    Join Date
    Jun 2010
    Location
    Sacramento, CA
    Beans
    196
    Distro
    Xubuntu 11.04 Natty Narwhal

    Re: Help building Crunch on 11.10?

    For now I have followed the instructions to get a binary build from the BackBox Linux repositories from the BackBox Wiki here: http://wiki.backbox.org/index.php/Ho...Debian_systems in the "other systems" section of that page - just in case anyone else wanted a quick-fix solution. I'm using Oneiric (11.10) even though BackBox (and the repo) is for Natty (11.04) but following the instructions works just fine. Although it installs Crunch 3.0.1 and not the latest 3.1 - but this is still fantastic IMO.

  5. #5
    Join Date
    Jun 2010
    Location
    Sacramento, CA
    Beans
    196
    Distro
    Xubuntu 11.04 Natty Narwhal

    Re: Help building Crunch on 11.10?

    Okay, got it finally. Here's what's going on now:
    Code:
    [root:/pentest/wordlists/crunch3.1]# ls -lh
    total 128K
    -rw-r--r-- 1 root root 5.5K 2011-04-06 17:13 charset.lst
    -rw-r--r-- 1 root root  16K 2011-07-19 16:42 crunch.1
    -rw-r--r-- 1 root root  77K 2011-07-19 17:39 crunch.c
    -rw-r--r-- 1 root root  18K 2011-04-06 17:13 GPL.TXT
    -rw-r--r-- 1 root root 2.5K 2011-10-31 19:37 Makefile
    
    [root:/pentest/wordlists/crunch3.1]# make
    Building binary...
    /usr/bin/gcc crunch.c -Wall -lm -pthread -std=c99  -o crunch
    crunch.c: In function ‘PrintPercentage’:
    crunch.c:541:20: warning: variable ‘finall’ set but not used [-Wunused-but-set-variable]
    crunch.c: In function ‘renamefile’:
    crunch.c:567:12: warning: variable ‘pidret’ set but not used [-Wunused-but-set-variable]
    crunch.c: In function ‘main’:
    crunch.c:1310:8: warning: variable ‘loaded’ set but not used [-Wunused-but-set-variable]
    crunch.c:1308:8: warning: variable ‘flag4’ set but not used [-Wunused-but-set-variable]
    
    [root:/pentest/wordlists/crunch3.1]# ls -lh
    total 176K
    -rw-r--r-- 1 root root 5.5K 2011-04-06 17:13 charset.lst
    -rwxr-xr-x 1 root root  48K 2011-10-31 19:41 crunch
    -rw-r--r-- 1 root root  16K 2011-07-19 16:42 crunch.1
    -rw-r--r-- 1 root root  77K 2011-07-19 17:39 crunch.c
    -rw-r--r-- 1 root root  18K 2011-04-06 17:13 GPL.TXT
    -rw-r--r-- 1 root root 2.5K 2011-10-31 19:37 Makefile
    
    [root:/pentest/wordlists/crunch3.1]# make install
    Creating directories...
    /usr/bin/install -d -m 755 -o root -g root /pentest/passwords//crunch
    /usr/bin/install -d -m 755 -o root -g root /usr/local/share/man/man1
    Copying binary...
    /usr/bin/install crunch -m 755 -o root -g root /pentest/passwords//crunch
    Copying charset.lst...
    /usr/bin/install charset.lst -m 644 -o root -g root /pentest/passwords//crunch
    Installing man page...
    /usr/bin/install crunch.1 -m 644 -o root -g root /usr/local/share/man/man1
    
    [root:/pentest/wordlists/crunch3.1]# crunch
    crunch: command not found
    So it seems to build fine, as you can see above. And looks like it installs fine, but the command isn't found (and "tab-autocompletion" with "crun" produced nothing).

    However "man crunch" produces Crunch help - so the man pages installs fine.

  6. #6
    Join Date
    Sep 2009
    Beans
    1,293

    Re: Help building Crunch on 11.10?

    It's not installed to a system bin directory, you can use the full path
    Code:
     $ /pentest/passwords/crunch
    to run it. Probably fixing up the makefile to install to standard locations is a good idea though, hardcoding a makefile to install to /usr/local/ is a little messy

Tags for this Thread

Bookmarks

Posting Permissions

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