elif command == "list":
print("scanning all ips...please wait")
c = 'nmap -sP 192.168.1.0/24'
r, code = run_command(c)
logger.debug(r)
logger.debug(code)
lines = []
for line in r.splitlines():
if "scan report" in line:
lines.append(line.split("for ")[1])
r, code = run_command(c)
for line in r.splitlines():
if "scan report" in line:
lines.append(line.split("for ")[1])
print("\n".join(sorted(list(set(lines)))))
return
The cluster.py list command seems to assume you're using the 192.168.1.0/24 subnet?
https://github.com/schollz/find-lf/blob/09c56778297978943dec6a0ca945fc83b69c3990/tools/cluster.py#L361
Is this intentional?