Limit threads to 1 when CPORT is set, closes #4170

This issue also applies to TCP scanner modules.
bug/bundler_fix
HD Moore 2014-11-11 13:21:09 -06:00
parent 96ba6da697
commit dbd5937dc7
1 changed files with 7 additions and 1 deletions

View File

@ -59,9 +59,15 @@ def run
@tl = []
#
# Sanity check threading on different platforms
# Sanity check threading given different conditions
#
if datastore['CPORT'].to_i != 0 && threads_max > 1
print_error("Warning: A maximum of one thread is possible when a source port is set (CPORT)")
print_error("Thread count has been adjusted to 1")
threads_max = 1
end
if(Rex::Compat.is_windows)
if(threads_max > 16)
print_error("Warning: The Windows platform cannot reliably support more than 16 threads")