-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
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
Add a cli flag to hide host information #143
base: main
Are you sure you want to change the base?
Conversation
Thanks for the PR! Its a nice idea, but i think it would be easier if we would simply not execute the |
@NeffIsBack I'm not sure to understand this part of code of if self.print_host_info() and (self.login() or (self.username == "" and self.password == "")):
if hasattr(self.args, "module") and self.args.module:
self.logger.debug("Calling modules")
self.call_modules()
else:
self.logger.debug("Calling command arguments")
self.call_cmd_args() In most protocols, Is the goal to run modules or commands only if the connection was (successfull or anonymous)? If so imho it would be better to split the check and the display part. |
@tigre-bleu the check |
@NeffIsBack @tigre-bleu It looks like this needs to be updated since #141 was merged, right? There's also some conflicts that need to be updated. |
The reason why I did not worked on this PR after #141 was, that just wrapping the content of But I never had an idea how to properly solve that problem properly, until now. A possible solution could be to check inside the nxc_logger where that display function was called from (there is some functionality in python for that) and if the arg (to surprise that message) is set we could just skip that log entry. Imo the cleanest solution that would not be instantly break if someone changes logic inside one of these print_host_info functions. |
I added a global flag
--no-host-info
to hide informative lines. This unclutters nxc's output in very big networks where a lot of these lines could be produced and are not always useful for the pentester.Without the flag:
With
--no-host-info
: