Commit 3c42fad2 by Milad Doorbash

Fix index out of range problem

parent d2f6defc
......@@ -131,7 +131,7 @@ class Exploit(exploits.Exploit):
def run(self):
devices = self._Exploit__info__['devices']
if self.device == '' or re.match("^\d+?$", self.device) is None or int(self.device) < 0 or int(self.device) > len(devices):
if self.device == '' or re.match("^\d+?$", self.device) is None or int(self.device) < 0 or int(self.device) >= len(devices):
print_error("Invalid device identifier option")
return
number = devices[int(self.device)]['number']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment