Commit 4876103a authored by Mateus Goto's avatar Mateus Goto

Merge branch 'master'

parents 2878fb7c 7ceca6db
...@@ -9,11 +9,8 @@ def getAllIp(): ...@@ -9,11 +9,8 @@ def getAllIp():
s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
s.connect(("10.255.255.255",1)) s.connect(("10.255.255.255",1))
local_ip = s.getsockname()[0] local_ip = s.getsockname()[0]
splited = local_ip.split('.') print(local_ip)
splited = local_ip.split('.') local_ip = local_ip[:-3] + "1/24"
splited.pop()
splited.append("1/24")
local_ip = ".".join(splited)
print(local_ip) print(local_ip)
print(type(local_ip)) print(type(local_ip))
arp = ARP(pdst=local_ip) arp = ARP(pdst=local_ip)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment