We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When -o - is used as an output file, in some cases internal buffer stores output and flush it only after end of execution.
-o -
#!/usr/bin/env python from subprocess import Popen, PIPE, DEVNULL proc = Popen(["nikto", "-h", "https://example.com", "-Format", "csv", "-o", "-"], stdout=PIPE, stdin=DEVNULL, stderr=DEVNULL) while True: line = proc.stdout.readline().decode("utf8") if proc.poll() is not None: break print(line, end="")
This could be changed by setting autoflush(1) when -o - was used or after some flag was provided eg. -Flush or -Autoflush.
autoflush(1)
-Flush
-Autoflush
One of the potential solutions for this could be this:
nikto/program/plugins/nikto_core.plugin
Lines 2079 to 2083 in b25a36b
my $handle; if (defined $plugin->{report_head}) { $handle = &{ $plugin->{report_head} }($file); if ($file eq "-") { $handle->autoflush(1); } }
After discussing what solution would be best I can create PR with it.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
When
-o -
is used as an output file, in some cases internal buffer stores output and flush it only after end of execution.Example
This could be changed by setting
autoflush(1)
when-o -
was used or after some flag was provided eg.-Flush
or-Autoflush
.Links/Info
One of the potential solutions for this could be this:
nikto/program/plugins/nikto_core.plugin
Lines 2079 to 2083 in b25a36b
After discussing what solution would be best I can create PR with it.
The text was updated successfully, but these errors were encountered: