mirror of
https://github.com/k4m4/kickthemout.git
synced 2024-12-01 17:25:45 +01:00
added gateway option
This commit is contained in:
parent
861aea2102
commit
9c87603a9e
@ -184,6 +184,8 @@ def getDefaultInterfaceMAC():
|
|||||||
# retrieve gateway IP
|
# retrieve gateway IP
|
||||||
def getGatewayIP():
|
def getGatewayIP():
|
||||||
global stopAnimation
|
global stopAnimation
|
||||||
|
if options.gateway:
|
||||||
|
return options.gateway
|
||||||
try:
|
try:
|
||||||
getGateway, timeout = sr1(IP(dst="github.com", ttl=0) / ICMP() / "XXXXXXXXXXX", verbose=False, timeout=4)
|
getGateway, timeout = sr1(IP(dst="github.com", ttl=0) / ICMP() / "XXXXXXXXXXX", verbose=False, timeout=4)
|
||||||
if timeout:
|
if timeout:
|
||||||
@ -740,6 +742,12 @@ if __name__ == '__main__':
|
|||||||
callback=targetList, type='string',
|
callback=targetList, type='string',
|
||||||
dest='targets', help='specify target IP address(es) and perform attack')
|
dest='targets', help='specify target IP address(es) and perform attack')
|
||||||
|
|
||||||
|
# def setGateway(option, opt, value, parser):
|
||||||
|
# setattr(parser.values, option.dest, value)
|
||||||
|
parser.add_option('-g', '--gateway', action='callback',
|
||||||
|
callback=(lambda option, opt, value, parser: setattr(parser.values, option.dest, value)), type='string',
|
||||||
|
dest='gateway', help='specify gateway IP address')
|
||||||
|
|
||||||
(options, argv) = parser.parse_args()
|
(options, argv) = parser.parse_args()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user