Skip to content

Commit ae339cb

Browse files
committed
Land rapid7#4174, @hmoore-r7's fix for rapid7#4170
2 parents b2612ea + dbd5937 commit ae339cb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/msf/core/auxiliary/scanner.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,15 @@ def run
5959
@tl = []
6060

6161
#
62-
# Sanity check threading on different platforms
62+
# Sanity check threading given different conditions
6363
#
6464

65+
if datastore['CPORT'].to_i != 0 && threads_max > 1
66+
print_error("Warning: A maximum of one thread is possible when a source port is set (CPORT)")
67+
print_error("Thread count has been adjusted to 1")
68+
threads_max = 1
69+
end
70+
6571
if(Rex::Compat.is_windows)
6672
if(threads_max > 16)
6773
print_error("Warning: The Windows platform cannot reliably support more than 16 threads")

0 commit comments

Comments
 (0)