mirror of
https://github.com/k4m4/kickthemout.git
synced 2024-11-22 04:54:26 +01:00
Merge pull request #341 from ylink-lfs/patch-1
Update checkInternetConnection and getGatewayIP functions
This commit is contained in:
commit
36b7035be0
@ -127,7 +127,7 @@ def runDebug():
|
||||
# make sure there is an internet connection
|
||||
def checkInternetConnection():
|
||||
try:
|
||||
urlopen('https://google.com', timeout=3)
|
||||
urlopen('https://github.com', timeout=3)
|
||||
return True
|
||||
except URLError as err:
|
||||
return False
|
||||
@ -185,7 +185,7 @@ def getDefaultInterfaceMAC():
|
||||
def getGatewayIP():
|
||||
global stopAnimation
|
||||
try:
|
||||
getGateway = sr1(IP(dst="google.com", ttl=0) / ICMP() / "XXXXXXXXXXX", verbose=False)
|
||||
getGateway = sr1(IP(dst="github.com", ttl=0) / ICMP() / "XXXXXXXXXXX", verbose=False)
|
||||
return getGateway.src
|
||||
except:
|
||||
# request gateway IP address (after failed detection by scapy)
|
||||
@ -785,4 +785,4 @@ if __name__ == '__main__':
|
||||
# set to non-interactive attack
|
||||
interactive = False
|
||||
|
||||
main()
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user