Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every command so far asks what is on this network. In a cafe that is the wrong question and an impolite one - those are not your devices, and the README's Scope section rules out scanning them.
netdiff hereinverts it: what does this network do to me?Eight rules: TLS interception, captive portal, a resolver that invents answers for
.invalid(reserved, so an answer is fabrication rather than a lookup), a public name answered with a private address, one MAC answering for three or more addresses, your own network-bound services, and client isolation reported either way - the good news has to be printed, or it cannot be told from a check that did not run.Structure follows the existing grain.
here.pyopens the sockets and parses the bytes;audit.pydecides what any of it means and still opens none. The rule specs go in the sameRULEStable, soaudit --explain here-tls-interceptedworks with no new code, and findings are ordinaryFindings, so the verbosity ladder and--jsoncome for free.It records nothing. A cafe network in
~/.netdiff/history.dbwould put strangers' MACs in yourinventoryand make the next scan at home report a wall of appeared/vanished.Deliberately not claimed
False positives caught in review, before they shipped
Each of these would have accused a network that was fine, and each is now a test:
unable to get local issuer certificateis byte-for-byte what an interception CA produces and what a python.org build whoseInstall Certificates.commandwas never run produces on every network forever. An empty store is a fact about the computer, so the question goes unanswered rather than answered wrongly. A wrong clock is named in the lesson for the same reason.is_private("0.0.0.0")isTrue. So is127.0.0.1. Both are how a filtering resolver says no - school wifi, guest wifi, a pi-hole - and refusing to answer is the opposite of steering you somewhere. They no longer count.only the gateway answered ARPwith an empty ARP table. Reachable two ordinary ways: the ARP command failing to parse, and a VPN, where the default route is a tunnel peer that was never on this segment. Both handed the reader "Nothing. This is the good result." about a check that had not run.ff:ff:ff:ff:ff:ff; one such row flips isolation-on to isolation-off.here 10.0.0.0/8reachednudgewithout theMAX_HOSTSguarddiscoverhas.here-own-ports-exposedasserted reachability its probe cannot establish - the check runs from this machine to its own address, which a host firewall never sees. Title and lesson now say what is actually proved, which is the binding.One unrelated fix
resolve_subnetprinted the inferred-subnet notice to stdout, sonetdiff scan --jsonwith no subnet emitted something no parser would accept. It is a diagnostic, not data - stderr. Fixed at the shared function, soscan,auditandhereall get it.278 → 289 tests. Half of
test_here.pyasserts something is not reported.