diff --git a/src/pkzip_fmt_plug.c b/src/pkzip_fmt_plug.c index 915a537..6ee66d9 100644 --- a/src/pkzip_fmt_plug.c +++ b/src/pkzip_fmt_plug.c @@ -1085,7 +1085,7 @@ __inline__ /* return a failure. We have 24 bytes of inflate data, and this almost always is more than enough */ /* to turn up an error. If we find we need more, we will do more than 24 */ static int check_inflate_CODE1(u8 *next, int left) { - u32 whave, op, bits, hold,len; + u32 whave = 0, op, bits, hold,len; code here; #if (ARCH_LITTLE_ENDIAN==1) && (ARCH_ALLOWS_UNALIGNED==1) diff --git a/src/zip2john.c b/src/zip2john.c index 9ba1140..fe454ab 100644 --- a/src/zip2john.c +++ b/src/zip2john.c @@ -209,7 +209,7 @@ static void process_file(const char *fname) process_old_zip(fname); return; } else { - printf("%s->%s is not encrypted!\n", fname, + fprintf(stderr, "%s->%s is not encrypted!\n", fname, filename); fseek(fp, extrafield_length, SEEK_CUR); fseek(fp, compressed_size, SEEK_CUR); @@ -457,7 +457,7 @@ static void process_old_zip(const char *fname) print_and_cleanup:; if (count_of_hashes) { int i=1; - printf ("$pkzip$%x*%x*", count_of_hashes, zfp.two_byte_check?2:1); + printf ("%s:$pkzip$%x*%x*", fname, count_of_hashes, zfp.two_byte_check?2:1); if (checksum_only) i = 0; for (; i < count_of_hashes; ++i) { @@ -476,7 +476,7 @@ print_and_cleanup:; if (hashes[0].cmp_len<1500) printf("%x*%s*%s*", hashes[0].cmp_len, hashes[0].chksum, toHex((unsigned char*)hashes[0].hash_data, hashes[0].cmp_len)); else - printf("%x*%s*%s*", strlen(fname), hashes[0].chksum, fname); + printf("%x*%s*%s*", (unsigned int)strlen(fname), hashes[0].chksum, fname); } printf("$/pkzip$\n"); }