mirror of
https://github.com/hashcat/hashcat.git
synced 2025-02-02 10:51:16 +00:00
Merge pull request #3603 from justpretending/fifo
Support for FIFO outfiles (fixes #3582)
This commit is contained in:
commit
a9e89f760a
@ -116,7 +116,10 @@ bool hc_fopen (HCFILE *fp, const char *path, const char *mode)
|
||||
bool is_gzip = false;
|
||||
bool is_zip = false;
|
||||
bool is_xz = false;
|
||||
bool is_fifo = hc_path_is_fifo (path);
|
||||
|
||||
if (is_fifo == false)
|
||||
{
|
||||
int fd_tmp = open (path, O_RDONLY);
|
||||
|
||||
if (fd_tmp != -1)
|
||||
@ -139,6 +142,7 @@ bool hc_fopen (HCFILE *fp, const char *path, const char *mode)
|
||||
|
||||
close (fd_tmp);
|
||||
}
|
||||
}
|
||||
|
||||
if (fmode == -1)
|
||||
{
|
||||
|
@ -699,6 +699,11 @@ bool hc_same_files (char *file1, char *file2)
|
||||
{
|
||||
if ((file1 != NULL) && (file2 != NULL))
|
||||
{
|
||||
if (hc_path_is_fifo (file1) == true || hc_path_is_fifo (file2) == true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
struct stat tmpstat_file1;
|
||||
struct stat tmpstat_file2;
|
||||
|
||||
|
@ -2731,13 +2731,6 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
if (hc_path_exist (outfile_ctx->filename) == true)
|
||||
{
|
||||
if (hc_path_is_fifo (outfile_ctx->filename) == true)
|
||||
{
|
||||
event_log_error (hashcat_ctx, "%s: A fifo cannot be used as an outfile.", outfile_ctx->filename);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (hc_path_is_directory (outfile_ctx->filename) == true)
|
||||
{
|
||||
event_log_error (hashcat_ctx, "%s: A directory cannot be used as an outfile.", outfile_ctx->filename);
|
||||
|
Loading…
Reference in New Issue
Block a user