You just need to replace the "445" with your target port.msf > irb
>> framework.exploits.each_module { |n,e| x=e.new;
print_good("#{e.fullname}:
#{x.datastore['RPORT']}")
if x.datastore['RPORT'].to_i == 445 }; nil
(All in one line... )
Volatile-Minds Blog