mirror of
https://github.com/k4m4/kickthemout.git
synced 2024-11-25 22:44: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
|
||||
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}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
|
||||
|
||||
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,
|
||||
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:
|
||||
|
||||
while True:
|
||||
|
Loading…
Reference in New Issue
Block a user