Package: fcrackzip
Version: 0.3-2
Severity: normal
Tags: patch

Hello,

I modified a bit fcrackzip to initialize the vector pw (else in some
circumstances pw contains random garbage at program start) and also
added a few lines to be able to read passwords to try from stdin (very
useful if you generate these passwords on the fly using an other program
piped to fcrackzip and the list of passwords to try is too big to be
written to disk first).

I guess I could have created two bug reports, one for the bug and one
for the improvement, but there is only a few lines of codes to correct
both and they are related, so I thought it might be more clear with only
one bug report.

I included a diff file but this is the first time I am doing that so
please pardon me if the format is incorrect. I will be happy to correct
it or provide any missing informations. I created it with "diff
fcrackzip-0.3/main.c fcrackzip-0.3-modif/main.c > main.c-diff".

-- System Information:
Debian Release: lenny/sid
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.25-2-686 (SMP w/2 CPU cores)
Locale: LANG=fr_BE.UTF-8, LC_CTYPE=fr_BE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages fcrackzip depends on:
ii  libc6                         2.7-16     GNU C Library: Shared libraries

fcrackzip recommends no packages.

Versions of packages fcrackzip suggests:
ii  unzip                         5.52-12    De-archiver for .zip files
ii  wamerican-huge [wordlist]     6-2.3      American English dictionary words 

-- no debconf information
381a382
>   pw[0]='\0';
541,548c542,543
<           fprintf (stderr, "you have to specify a file to read passwords from 
using the  -p switch\n");
<           exit (1);
<         }
< 
<       if (!(dict_file = fopen (pw, "r")))
<         {
<           perror (pw);
<           exit (1);
---
>           printf("no file to read passwords from have been specified, 
> passwords will be read from stdin\n");
>           dict_file = stdin;
552,556c547,551
<           *(pw_end = pw) = 0;
<           dictionary_gen (); /* fetch first password */
<           crack_method->crack_pw (dictionary_gen, print_callback);
< 
<           fclose (dict_file);
---
>           if (!(dict_file = fopen (pw, "r")))
>             {
>               perror (pw);
>               exit (1);
>             }
557a553,555
>       *(pw_end = pw) = 0;
>       dictionary_gen (); /* fetch first password */
>       crack_method->crack_pw (dictionary_gen, print_callback);
558a557
>       fclose (dict_file);

Reply via email to