mirror of
https://github.com/k4m4/kickthemout.git
synced 2024-11-29 08:24:25 +01:00
Merge pull request #18 from xdavidhu/master
Empty hostsList Error Enhancement
This commit is contained in:
commit
1320c36550
@ -19,7 +19,7 @@ try:
|
|||||||
import scan, spoof
|
import scan, spoof
|
||||||
except:
|
except:
|
||||||
print("\n{0}ERROR: Requirements have not been properly satisfied. Please try running:\n\t{1}$ sudo pip install -r requirements.txt{2}").format(RED, GREEN, END)
|
print("\n{0}ERROR: Requirements have not been properly satisfied. Please try running:\n\t{1}$ sudo pip install -r requirements.txt{2}").format(RED, GREEN, END)
|
||||||
print("\n{0}If you still get the same error, please submit an issue here:\n\t{1}https://github.com/k4m4/kickthemout/issues/\n{2}").format(RED, BLUE, END)
|
print("\n{0}If you still get the same error, please submit an issue here:\n\t{1}https://github.com/k4m4/kickthemout/issues\n{2}").format(RED, BLUE, END)
|
||||||
raise SystemExit
|
raise SystemExit
|
||||||
|
|
||||||
def heading():
|
def heading():
|
||||||
@ -266,6 +266,21 @@ def main():
|
|||||||
+ defaultGatewayIP + "{6}' --> {7}" + str(len(hostsList)) + "{8} hosts are up.{9}").format(GREEN, RED, GREEN, RED, GREEN,
|
+ defaultGatewayIP + "{6}' --> {7}" + str(len(hostsList)) + "{8} hosts are up.{9}").format(GREEN, RED, GREEN, RED, GREEN,
|
||||||
RED, GREEN, RED, GREEN, END)
|
RED, GREEN, RED, GREEN, END)
|
||||||
|
|
||||||
|
if len(hostsList) == 0 or len(hostsList) == 1:
|
||||||
|
if len(hostsList) == 1:
|
||||||
|
if hostsList[0][0] == defaultGatewayIP:
|
||||||
|
print("\n{0}{1}WARNING: There are {2}0{3} hosts up on you network except your gateway.\n\tYou can't kick anyone off {4}:/{5}\n").format(
|
||||||
|
GREEN, RED, GREEN, RED, GREEN, END)
|
||||||
|
raise SystemExit
|
||||||
|
else:
|
||||||
|
print(
|
||||||
|
"\n{0}{1}WARNING: There are {2}0{3} hosts up on you network.\n\tIt looks like something went wrong {4}:/{5}").format(
|
||||||
|
GREEN, RED, GREEN, RED, GREEN, END)
|
||||||
|
print(
|
||||||
|
"\n{0}If you are experiencing this error multiple times, please submit an issue here:\n\t{1}https://github.com/k4m4/kickthemout/issues\n{2}").format(
|
||||||
|
RED, BLUE, END)
|
||||||
|
raise SystemExit
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
Loading…
Reference in New Issue
Block a user