Skip to content

Commit 25d1642

Browse files
committed
Land rapid7#9575, Fix wmap_sites -a exception on missing url
2 parents 310ab9c + e6e5950 commit 25d1642

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

plugins/wmap.rb

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,16 @@ def cmd_wmap_sites(*args)
127127
while (arg = args.shift)
128128
case arg
129129
when '-a'
130-
s = add_web_site(args.shift)
131-
if s
132-
print_status("Site created.")
130+
site = args.shift
131+
if site
132+
s = add_web_site(site)
133+
if s
134+
print_status("Site created.")
135+
else
136+
print_error("Unable to create site")
137+
end
133138
else
134-
print_error("Unable to create site")
139+
print_error("No site provided.")
135140
end
136141
when '-d'
137142
del_idx = args

0 commit comments

Comments
 (0)