Skip to content

Commit 436910b

Browse files
committed
Clean up map description
1 parent e6e0581 commit 436910b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/auxiliary/admin/upnp/soap_addportmapping.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def run
7070
content << "</m:AddPortMapping>"
7171
content << "</SOAP-ENV:Body>"
7272
content << "</SOAP-ENV:Envelope>"
73+
7374
res = send_request_cgi(
7475
'uri' => normalize_uri(target_uri.path),
7576
'method' => 'POST',
@@ -81,7 +82,9 @@ def run
8182
)
8283

8384
if res
84-
map = "#{rhost}:#{external_port}/#{protocol} -> #{internal_client}:#{internal_port}/#{protocol}"
85+
external_map = "#{external_client ? external_client : 'any'}:#{external_port}/#{protocol}"
86+
internal_map = "#{internal_client ? internal_client : 'any'}:#{internal_port}/#{protocol}"
87+
map = "#{external_map} -> #{internal_map}"
8588
if res.code == 200
8689
print_good("#{peer} successfully mapped #{map}")
8790
else

0 commit comments

Comments
 (0)