home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume23 / crack / part01 / Scripts / do_dicts < prev    next >
Encoding:
Text File  |  1991-09-22  |  1.1 KB  |  73 lines

  1. #!/bin/sh 
  2.  
  3. ###
  4. # This program written by ADE Muffett (aem@aber.ac.uk), August 1991,
  5. # as part of the 'Crack' password cracking package.
  6. ###
  7.  
  8. ###
  9. # These operations have been abstracted out so that they may be done on
  10. # the most powerful machine so that the weakest machine doesn't wind up
  11. # making the dictionaries
  12. ###
  13.  
  14. crack_arch=$1
  15. shift
  16.  
  17. ###
  18. # Go home
  19. ###
  20.  
  21. cd $CRACK_HOME || exit 1
  22.  
  23. ###
  24. # Go make the preprocessor
  25. ###
  26.  
  27. echo "$0: Checking preprocessor $crack_arch/crack-pp."
  28.  
  29. if [ ! -d $crack_arch ]
  30. then
  31.     Scripts/do_install $crack_arch || exit 1
  32. fi
  33.  
  34. cd $crack_arch || exit 1
  35.  
  36. make crack-pp || exit 1
  37.  
  38. cd $CRACK_HOME || exit 1
  39.  
  40. ###
  41. # Double check the processed dictionary directory
  42. ###
  43.  
  44. if [ ! -d Dicts ]
  45. then
  46.     echo "Crack: error: There is no directory or file Dicts."
  47.     echo "Crack: warning: Creating directory Dicts"
  48.     mkdir Dicts || exit 1
  49. else
  50.     rm -f Dicts/dict*
  51. fi
  52.  
  53. ###
  54. # Run the preprocessor
  55. ###
  56.  
  57. $crack_arch/crack-pp $*
  58.  
  59. ###
  60. # Tidy this up a bit
  61. ###
  62.  
  63. echo "Compacting. This may take some time..."
  64.  
  65. for i in dict.*
  66. do
  67.     sort -r $i | uniq > Dicts/$i
  68.     rm -f $i
  69.     echo Done $i
  70. done
  71.  
  72. exit 0
  73.