schollz / find-lf

Track the location of every Wi-Fi device (:iphone:) in your house using Raspberry Pis and FIND
https://www.internalpositioning.com/plugins/#using-find-without-an-app
GNU Affero General Public License v3.0
994 stars 123 forks source link

cluster.py list seems to hardcode 192.168.1.0/24 subnet? #22

Open victorhooi opened 6 years ago

victorhooi commented 6 years ago

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

    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

Is this intentional?

schollz commented 6 years ago

No, its based on my subnet which I thought would be similar for most cases so I left it in. It should be a variable though.