home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3920 / local-diffs next >
Text File  |  1991-08-28  |  9KB  |  358 lines

  1. diff -cr crack3.2.virgin/Crack crack3.2a/Crack
  2. *** crack3.2.virgin/Crack    Tue Aug 27 11:02:38 1991
  3. --- crack3.2a/Crack    Tue Aug 27 11:04:58 1991
  4. ***************
  5. *** 9,19 ****
  6.   # You must put DOUBLE QUOTES around this is you work relative to ~username
  7.   ###
  8.   
  9. ! setenv CRACK_HOME "~aem/SEC/CRACK32"
  10.   
  11.   set trash="/dev/null"
  12.   set remote="FALSE"
  13. ! set default_bin="generic"
  14.   set tmpfile="/tmp/cpwfs.$$"
  15.   set net_cf="Scripts/network.conf"
  16.   
  17. --- 9,20 ----
  18.   # You must put DOUBLE QUOTES around this is you work relative to ~username
  19.   ###
  20.   
  21. ! setenv CRACK_HOME "/home/utils/crack3.2a"
  22.   
  23.   set trash="/dev/null"
  24.   set remote="FALSE"
  25. ! set foreground=""
  26. ! set default_bin=`arch`
  27.   set tmpfile="/tmp/cpwfs.$$"
  28.   set net_cf="Scripts/network.conf"
  29.   
  30. ***************
  31. *** 48,53 ****
  32. --- 49,55 ----
  33.       echo "Or:       $0 -network [options] passwdfile [...]"
  34.       echo "With options:-"
  35.       echo "    -v              - to produce verbose output (if configured)"
  36. +     echo "    -f              - run in foreground"
  37.       echo "    -nnicevalue     - to run niced"
  38.       echo "    -rpointfile     - to recover a crashed-out job"
  39.       echo "    -Rpointfile     - to recover (with verify) a crashed-out job"
  40. ***************
  41. *** 83,88 ****
  42. --- 85,94 ----
  43.               set argl=($argl $1)
  44.               shift
  45.               breaksw
  46. +         case -f:                        # foreground
  47. +             set foreground="-f"
  48. +                         shift
  49. +             breaksw
  50.           case -*:                        # anything else
  51.               echo "Crack: unknown argument $1"
  52.               shift
  53. ***************
  54. *** 155,166 ****
  55.   if ( "$remote" == "TRUE" ) then
  56.       cat > $tmpfile                                  # Use stdin
  57.   else
  58. !     Scripts/joinfiles $* > $tmpfile || exit 1       # Process the passwords
  59.   endif
  60.   
  61. ! echo "Backgrounding program. Output will be written to a file in this directory."
  62. ! $CRACK_ARCH/crack-pwc $argl -i$tmpfile Dicts/dict.* < /dev/null >& $trash &
  63.   
  64.   ###
  65.   # There are horrible timeraces involved in removing $tmpfile, so I dont.
  66. --- 161,175 ----
  67.   if ( "$remote" == "TRUE" ) then
  68.       cat > $tmpfile                                  # Use stdin
  69.   else
  70. !     Scripts/joinfiles $foreground $* > $tmpfile || exit 1 # Process the passwords
  71.   endif
  72.   
  73. ! if ( "$foreground" == "-f" ) then
  74. !         $CRACK_ARCH/crack-pwc -f $argl -i$tmpfile Dicts/dict.* < /dev/null 
  75. ! else
  76. !         echo "Backgrounding program. Output will be written to a file in this directory."
  77. !         $CRACK_ARCH/crack-pwc $argl -i$tmpfile Dicts/dict.* < /dev/null >&$trash &
  78. ! endif
  79.   
  80.   ###
  81.   # There are horrible timeraces involved in removing $tmpfile, so I dont.
  82. diff -cr crack3.2.virgin/Crack.sh crack3.2a/Crack.sh
  83. *** crack3.2.virgin/Crack.sh    Tue Aug 27 11:02:21 1991
  84. --- crack3.2a/Crack.sh    Tue Aug 27 11:05:08 1991
  85. ***************
  86. *** 10,21 ****
  87.   # (unless you have a really weird 'sh')
  88.   ###
  89.   
  90. ! CRACK_HOME="/aber/aem/SEC/CRACK32"              # This is an ENVIRONMENT var.
  91.   export CRACK_HOME
  92.   
  93.   trash="/dev/null"
  94.   remote="FALSE"
  95. ! default_bin="generic"
  96.   tmpfile="/tmp/cpwfs.$$"
  97.   net_cf="Scripts/network.conf"
  98.   
  99. --- 10,22 ----
  100.   # (unless you have a really weird 'sh')
  101.   ###
  102.   
  103. ! CRACK_HOME="/home/utils/crack3.2a"              # This is an ENVIRONMENT var.
  104.   export CRACK_HOME
  105.   
  106.   trash="/dev/null"
  107.   remote="FALSE"
  108. ! foreground=""
  109. ! default_bin=`arch`
  110.   tmpfile="/tmp/cpwfs.$$"
  111.   net_cf="Scripts/network.conf"
  112.   
  113. ***************
  114. *** 52,57 ****
  115. --- 53,59 ----
  116.       echo "Or:       $0 -network [options] passwdfile [...]"
  117.       echo "With options:-"
  118.       echo "    -v              - to produce verbose output (if configured)"
  119. +     echo "    -f              - run in foreground"
  120.       echo "    -nnicevalue     - to run niced"
  121.       echo "    -rpointfile     - to recover a crashed-out job"
  122.       echo "    -Rpointfile     - to recover (with verify) a crashed-out job"
  123. ***************
  124. *** 87,92 ****
  125. --- 89,98 ----
  126.               argl="$argl $1"
  127.               shift
  128.               ;;
  129. +         -f*)
  130. +             foreground="-f"
  131. +             shift
  132. +             ;;
  133.           -*)
  134.               echo "Crack: unknown argument $1"
  135.               shift
  136. ***************
  137. *** 167,178 ****
  138.   then
  139.       cat > $tmpfile
  140.   else
  141. !     Scripts/joinfiles $* > $tmpfile || exit 1
  142.   fi
  143.   
  144. ! echo "Backgrounding program. Output will be written to a file in this directory."
  145. ! nohup $CRACK_ARCH/crack-pwc $argl -i$tmpfile Dicts/dict.* </dev/null >$trash 2>&1 &
  146.   
  147.   sleep 1
  148.   
  149. --- 173,188 ----
  150.   then
  151.       cat > $tmpfile
  152.   else
  153. !     Scripts/joinfiles $foreground $* > $tmpfile || exit 1
  154.   fi
  155.   
  156. ! if [ "$foreground" = "-f" ]
  157. ! then
  158. !         $CRACK_ARCH/crack-pwc -f $argl -i$tmpfile Dicts/dict.* </dev/null
  159. ! else
  160. !         echo "Backgrounding program. Output will be written to a file in this directory."
  161. !         nohup $CRACK_ARCH/crack-pwc $argl -i$tmpfile Dicts/dict.* </dev/null >$trash 2>&1 &
  162. ! fi
  163.   
  164.   sleep 1
  165.   
  166. diff -cr crack3.2.virgin/Scripts/joinfiles crack3.2a/Scripts/joinfiles
  167. *** crack3.2.virgin/Scripts/joinfiles    Tue Aug 27 11:02:29 1991
  168. --- crack3.2a/Scripts/joinfiles    Mon Aug 26 20:38:49 1991
  169. ***************
  170. *** 5,11 ****
  171.   # as part of the 'Crack' password cracking package.
  172.   ###
  173.   
  174. ! warn=out.initial.$$
  175.   
  176.   ###
  177.   # Empty the output file...
  178. --- 5,17 ----
  179.   # as part of the 'Crack' password cracking package.
  180.   ###
  181.   
  182. ! if [ "$1" = "-f" ]
  183. ! then
  184. !         warn=/dev/null
  185. !         shift
  186. ! else
  187. !         warn=out.initial.$$
  188. ! fi
  189.   
  190.   ###
  191.   # Empty the output file...
  192. diff -cr crack3.2.virgin/Sources/conf.h crack3.2a/Sources/conf.h
  193. *** crack3.2.virgin/Sources/conf.h    Tue Aug 27 11:02:33 1991
  194. --- crack3.2a/Sources/conf.h    Tue Aug 27 11:10:23 1991
  195. ***************
  196. *** 12,18 ****
  197.    * my own. It's simplest if you undefine and ignore this switch.
  198.    */
  199.   
  200. ! #define DEVELOPMENT_VERSION
  201.   
  202.   /* !!!! EVERYBODY ELSE START HERE !!!! */
  203.   
  204. --- 12,18 ----
  205.    * my own. It's simplest if you undefine and ignore this switch.
  206.    */
  207.   
  208. ! #undef DEVELOPMENT_VERSION
  209.   
  210.   /* !!!! EVERYBODY ELSE START HERE !!!! */
  211.   
  212. diff -cr crack3.2.virgin/Sources/crack-pwc.c crack3.2a/Sources/crack-pwc.c
  213. *** crack3.2.virgin/Sources/crack-pwc.c    Tue Aug 27 11:02:41 1991
  214. --- crack3.2a/Sources/crack-pwc.c    Mon Aug 26 20:23:10 1991
  215. ***************
  216. *** 50,56 ****
  217.   char rhostname[STRINGSIZE];    /* hostname we are recovering on */
  218.   #endif
  219.   
  220. ! int verbose_bool;        /* is verbose switched on ? */
  221.   
  222.   int pid;            /* pid of parent process */
  223.   char opfile[STRINGSIZE];    /* name of output file */
  224. --- 50,57 ----
  225.   char rhostname[STRINGSIZE];    /* hostname we are recovering on */
  226.   #endif
  227.   
  228. ! static int verbose_bool = 0;    /* is verbose switched on ? */
  229. ! static int foreground_bool = 0;    /* outputting in foreground? */
  230.   
  231.   int pid;            /* pid of parent process */
  232.   char opfile[STRINGSIZE];    /* name of output file */
  233. ***************
  234. *** 673,679 ****
  235.       {
  236.       uerr++;
  237.       }
  238. !     while ((i = getopt (argc, argv, "vi:r:R:n:")) != EOF)
  239.       {
  240.       switch (i)
  241.       {
  242. --- 674,680 ----
  243.       {
  244.       uerr++;
  245.       }
  246. !     while ((i = getopt (argc, argv, "vfi:r:R:n:")) != EOF)
  247.       {
  248.       switch (i)
  249.       {
  250. ***************
  251. *** 680,685 ****
  252. --- 681,689 ----
  253.       case 'v':
  254.           verbose_bool = 1;
  255.           break;
  256. +     case 'f':
  257. +         foreground_bool = 1;
  258. +         break;
  259.       case 'n':
  260.           nice (atoi (optarg));
  261.           break;
  262. ***************
  263. *** 728,748 ****
  264.       sprintf (pointfile, "point.%d", pid);
  265.   #endif                /* CRACK_NETWORK */
  266.   
  267. !     if (!freopen (opfile, "w", stdout))
  268. !     {
  269. !     perror ("freopen(stdout)");
  270. !     exit (1);
  271.       }
  272. -     if (!freopen (opfile, "a", stderr))
  273. -     {
  274. -     perror ("freopen(stderr)");
  275. -     exit (1);
  276. -     }
  277. -     if (!(fp = fopen (diefile, "w")))
  278. -     {
  279. -     perror (diefile);
  280. -     exit (1);
  281. -     }
  282.       Log ("Crack: A Sensible Password Cracker v%s by ADE Muffett, 1991\n",
  283.        version);
  284.   
  285. --- 732,754 ----
  286.       sprintf (pointfile, "point.%d", pid);
  287.   #endif                /* CRACK_NETWORK */
  288.   
  289. !     if (!foreground_bool) {
  290. !        if (!freopen (opfile, "w", stdout))
  291. !       {
  292. !          perror ("freopen(stdout)");
  293. !          exit (1);
  294. !       }
  295. !        if (!freopen (opfile, "a", stderr))
  296. !       {
  297. !          perror ("freopen(stderr)");
  298. !          exit (1);
  299. !       }
  300. !        if (!(fp = fopen (diefile, "w")))
  301. !       {
  302. !          perror (diefile);
  303. !          exit (1);
  304. !       }
  305.       }
  306.       Log ("Crack: A Sensible Password Cracker v%s by ADE Muffett, 1991\n",
  307.        version);
  308.   
  309. ***************
  310. *** 760,775 ****
  311.       Log ("From Dictionary %s, User number %d.\n", rdict, rusercount);
  312.       Log ("Username must match %s\n", rusername);
  313.       }
  314. !     fprintf (fp, "#!/bin/sh\n");
  315.   #ifdef CRACK_NETWORK
  316. !     fprintf (fp, "rsh %s kill -15 %d\n", hostname, pid);
  317.   #else
  318. !     fprintf (fp, "kill -15 %d\n", pid);
  319.   #endif                /* CRACK_NETWORK */
  320. !     fprintf (fp, "rm $0\n");
  321. !     fclose (fp);
  322.   
  323. !     chmod (diefile, 0700);
  324.   
  325.   #ifdef FCRYPT
  326.       init_des ();
  327. --- 766,783 ----
  328.       Log ("From Dictionary %s, User number %d.\n", rdict, rusercount);
  329.       Log ("Username must match %s\n", rusername);
  330.       }
  331. !     if (!foreground_bool) {
  332. !        fprintf (fp, "#!/bin/sh\n");
  333.   #ifdef CRACK_NETWORK
  334. !        fprintf (fp, "rsh %s kill -15 %d\n", hostname, pid);
  335.   #else
  336. !        fprintf (fp, "kill -15 %d\n", pid);
  337.   #endif                /* CRACK_NETWORK */
  338. !        fprintf (fp, "rm $0\n");
  339. !        fclose (fp);
  340.   
  341. !        chmod (diefile, 0700);
  342. !     }
  343.   
  344.   #ifdef FCRYPT
  345.       init_des ();
  346. ***************
  347. *** 810,814 ****
  348. --- 818,824 ----
  349.       }
  350.   
  351.       Log ("Finished.\n");
  352. +     if (!foreground_bool && unlink(diefile))
  353. +     Log ("Failed to unlink %s\n", diefile);
  354.       return (0);
  355.   }
  356.