Skip to content

Commit

Permalink
checker.py: add debuging prints to check if stdout is redirected
Browse files Browse the repository at this point in the history
  • Loading branch information
AlyaGomaa committed Aug 31, 2024
1 parent 502fcef commit 9bf5428
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion slips_files/core/helpers/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,9 @@ def check_output_redirection(self) -> Tuple[str, str, str]:
if "1w" in line:
# stdout is redirected, get the file
current_stdout = line.split(" ")[-1]
print(f"@@@@@@@@@@@@@@@@ stdout is redirected! {line}")
break

print(f"@@@@@@@@@@@@@@@@ stdout not redirected? {current_stdout}")
if self.main.mode == "daemonized":
stderr = self.main.daemon.stderr
slips_logfile = self.main.daemon.stdout
Expand Down
3 changes: 2 additions & 1 deletion slips_files/core/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,8 @@ def handle_pcap_and_interface(self) -> int:
connlog_path = os.path.join(self.zeek_dir, "conn.log")

self.print(
f"Number of zeek generated flows in conn.log: {self.get_flows_number(connlog_path)}",
f"Number of zeek generated flows in conn.log: "
f"{self.get_flows_number(connlog_path)}",
2,
0,
)
Expand Down
1 change: 0 additions & 1 deletion tests/common_test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ def has_errors(output_dir):
for file in error_files:
with open(file, "r") as f:
for line in f:
print(f" Checking erorrs in: {line}")
if has_ignored_errors(line):
continue

Expand Down

0 comments on commit 9bf5428

Please sign in to comment.