Rosen Penev
ae07d65f34
clang-tidy: remove useless casts
...
Now that const was fixed, pointless casts can be removed.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-08-20 21:10:34 -07:00
Jens Steube
03e5260e3a
Merge pull request #3604 from justpretending/redundant_conditions
...
Remove some redundant conditions (fixes #3602 )
2023-01-31 12:31:10 +01:00
justpretending
3ae939e922
Remove some redundant conditions ( fixes #3602 )
2023-01-31 14:07:55 +07:00
justpretending
c2fcef6c50
Support for FIFO outfiles ( fixes #3582 )
2023-01-31 14:02:26 +07:00
danielnachun
29373a0f6d
src/filehandling.c: add missing include
2022-07-20 14:30:33 -07:00
philsmd
a24d723d66
minor code style fixes
2022-03-31 19:19:16 +02:00
philsmd
5ef522ed8f
whitespace and code style fixes
2021-10-08 17:38:54 +02:00
Jukka Ojanen
c6ac306950
Fix fgetl() logic
2021-09-13 19:26:00 +03:00
Jukka Ojanen
ac9d2241c2
Increase unzReadCurrentFile() chunk size to INT_MAX
2021-09-02 16:03:25 +03:00
Jukka Ojanen
592b28f65f
Add tests for 32 bit build
2021-09-02 15:57:22 +03:00
Jukka Ojanen
e6c89040fe
Refactor xz file reading
2021-09-02 15:16:19 +03:00
Jukka Ojanen
63cc905bbc
Refactor zip file reading
2021-09-02 14:59:38 +03:00
Jukka Ojanen
b542d293b4
Refactor Windows file reading/writing
2021-09-02 13:49:28 +03:00
Jukka Ojanen
5baaa4fb0f
Fix merge mistake
2021-09-02 12:08:36 +03:00
Jukka Ojanen
213b533975
Use HCFILE_BUFFER_SIZE for xz stream
2021-09-02 12:00:46 +03:00
Jukka Ojanen
5afbd77347
Merge branch 'master' of https://github.com/hashcat/hashcat into gzip
2021-09-02 11:57:54 +03:00
Jukka Ojanen
1b4edf879b
Set GZIP internal buffer size to 256k (default 8k)
2021-09-01 14:28:24 +03:00
Jukka Ojanen
106fe88e4e
Report the uncompressed size only if it's known
2021-08-30 16:28:54 +03:00
Jukka Ojanen
8324d3cd07
Initialize both 32bit CrcGenerateTable() and 64bit Crc64GenerateTable()
2021-08-29 01:31:56 +03:00
Jukka Ojanen
b2870dadfd
Fix include file case
2021-08-28 20:05:59 +03:00
Jukka Ojanen
f502d80459
Fix include file case
2021-08-27 11:09:37 +03:00
Jukka Ojanen
4dcdbebb2f
Scan the xz file to determinate the number of blocks and streams, and its uncompressed size
2021-08-26 16:41:17 +03:00
Jukka Ojanen
47bb7620ee
Use fastest SHA-256 implementation supported by CPU
2021-08-26 13:01:25 +03:00
Jukka Ojanen
3cacbe0e1f
Add support for xz compressed files
2021-08-25 16:56:55 +03:00
Jukka Ojanen
3bc7b6af90
Avoid directly accessing file handle
2021-08-21 14:29:10 +03:00
Jukka Ojanen
fed32a58c7
Always cleanup and initialize all parts of HC_FILE structure
2021-08-18 19:28:00 +03:00
Jukka Ojanen
089a4847db
Check NULL pointer before using gzip/zip APIs
2021-08-18 17:18:31 +03:00
Jukka Ojanen
36c209c421
Check NULL pointer before using file APIs
2021-08-18 16:46:17 +03:00
Jukka Ojanen
6cf553410b
Avoid (possible) undefined behaviour in hc_fclose(), and don't assume plain file
2021-08-11 14:06:48 +03:00
Rosen Penev
14f5a26027
use const char for fopen mode
...
Fixes -Wwrite-strings warnings.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-07-22 18:11:11 -07:00
Jens Steube
254e33c473
File handling: Do not abort on seeing a BOM in input files, just warn and ignore the BOM
2021-06-29 20:42:22 +02:00
Jens Steube
2af45cd03f
Rename hc_fopen_nozip() to hc_fopen_raw()
2021-06-29 20:13:11 +02:00
Jens Steube
f54643479d
CRC32: Prevent decompression of data used in CRC32 calculation on host. This leads to false negatives with TrueCrypt/VeraCrypt keyfiles
2021-05-29 13:27:05 +02:00
Alex Stanev
7252091d3b
Correct check for gz header.
...
gzip format is described in rfc1952.
From there, first 2 bytes (0x1f8b) are header;
next is Compression method (0x08 for deflate, this is the general used method);
and 4th byte is Flags. Some compression tools don't set this and we can't process the gzips.
zlib plays well in this cases, so we can just drop the check for the 4th byte.
2020-12-26 22:49:05 +02:00
philsmd
e59f61e8cf
cosmetic: minor code style fixes
2020-06-13 11:19:00 +02:00
Jens Steube
891b59fb2f
Remove some old code no longed needed
2020-06-03 10:05:29 +02:00
philsmd
e151a72717
huge fwrite/fread problem on windows fixed
2020-06-02 09:52:10 +02:00
Jens Steube
1da40bf5d8
Fix double close() in hc_fclose()
2020-02-29 10:39:28 +01:00
Jens Steube
9824e6e91b
Update unstable warnings for Intel GPU on macOSX 10.15
2020-01-14 13:29:02 +01:00
Rosen Penev
fd8150769d
Add casts where needed in C++ mode
...
Otherwise, -fpermissive must be passed.
2019-09-11 18:05:01 -07:00
Jens Steube
97c9e86d15
Filehandling: Print a truncation warning in case an oversized line was detected
2019-08-06 12:22:24 +02:00
Rosen Penev
fb75164126
Run through Clang's google-readability-casting
...
Removes casts where the type is identical.
2019-08-03 22:37:38 -07:00
Gabriele Gristina
b54ad7981f
update repo and re-apply zip patch
2019-07-29 18:42:50 +02:00
Gabriele Gristina
d0ec5c7b77
move hc_* file functions from shared.c/.h to filehandling.c/.h
2019-07-13 00:20:41 +02:00
Gabriele Gristina
481c752456
No more compress functions, update example.dict.gz, remove some comments
2019-06-27 20:18:47 +02:00
Gabriele Gristina
398c89c75c
switch almost all FILE ops, potfile is the only missing
2019-06-26 19:06:46 +02:00
Gabriele Gristina
b2529af172
remove original commented code
2019-06-22 15:00:50 +02:00
Gabriele Gristina
6cb4abd526
Add zlib support v2
2019-06-21 21:56:38 +02:00
jsteube
05a01d3843
fix some datatypes
2018-02-08 19:13:29 +01:00
jsteube
8abd7ae9d1
Fix some old GCC compiler warnings
2017-07-06 10:35:25 +02:00