Fix issue when kill a job with non-integer jobid

GSoC/Meterpreter_Web_Console
Green-m 2018-09-18 15:50:00 +08:00
parent d4cdaf56ae
commit 862a8c921c
No known key found for this signature in database
GPG Key ID: 7A4A0E684B5D6747
1 changed files with 1 additions and 0 deletions

View File

@ -88,6 +88,7 @@ module CommandDispatcher
return if ele.count('-') > 1 return if ele.count('-') > 1
return if ele.first == '-' || ele[-1] == '-' return if ele.first == '-' || ele[-1] == '-'
return if ele.first == '.' || ele[-1] == '.' return if ele.first == '.' || ele[-1] == '.'
return unless ele =~ (/^(\d)+$/) # Not a number
if ele.include? '-' if ele.include? '-'
temp_array = (ele.split("-").inject { |s, e| s.to_i..e.to_i }).to_a temp_array = (ele.split("-").inject { |s, e| s.to_i..e.to_i }).to_a