diff --git a/lib/takeover/icmpsh.py b/lib/takeover/icmpsh.py index 2e5d3253c..fc742b04a 100644 --- a/lib/takeover/icmpsh.py +++ b/lib/takeover/icmpsh.py @@ -18,6 +18,7 @@ from lib.core.common import readInput from lib.core.data import conf from lib.core.data import logger from lib.core.data import paths +from lib.core.exception import SqlmapDataException class ICMPsh: """ @@ -41,6 +42,9 @@ class ICMPsh: while not address: address = readInput(message, default=self.remoteIP) + if conf.batch and not address: + raise SqlmapDataException("remote host address is missing") + return address def _selectLhost(self): @@ -53,6 +57,9 @@ class ICMPsh: while not address: address = readInput(message, default=self.localIP) + if conf.batch and not address: + raise SqlmapDataException("local host address is missing") + return address def _prepareIngredients(self, encode=True):