counterlure-cli 0.0.0-stage → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,6 @@
1
+ Counterlure CLI
2
+ Copyright 2026 Counterlure
3
+
4
+ This product is licensed under the Apache License, Version 2.0 (see LICENSE).
5
+ The licence grants no permission to use the Counterlure name or logo (section 6).
6
+ Official releases come only from https://github.com/counterlure/counterlure-cli.
package/README.md CHANGED
@@ -1,3 +1,421 @@
1
- # Temporary Holding Version
1
+ # counterlure-cli
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Command-line access to [Counterlure](https://www.counterlure.com), a register of honeypot and social-engineering approaches against people in tech.
4
+
5
+ Counterlure looks for one face turning up under different names. Reports come in from people who were approached. When enough independent sources report the same face, an analyst reviews the case, and corroborated cases can end in a published burn notice. From a terminal you can:
6
+
7
+ * **Open an account** with a username and an authenticator app, and pay for it in crypto. No email, phone number or name, ever.
8
+ * **Screen** a photo against corroborated cases and burn notices without the photo leaving your machine. This needs an account.
9
+ * **File** a report on a face. This needs no account at all.
10
+ * **Write to the Counterlure team** and read their replies.
11
+ * **Organization / Enterprise mode**: enroll anonymously with your organization's code (`counterlure org enroll`), screen against both org alerts and the global pool, and file zero-knowledge biometric reports that escalate only when 3+ distinct staff report the same face.
12
+
13
+ By default all of it runs over Tor to Counterlure's onion service, so your network address never reaches us.
14
+
15
+ ```
16
+ $ counterlure check profile.jpg
17
+
18
+ profile.jpg
19
+ face 1 at 198,200 (168x206px):
20
+ STRONG POSSIBLE MATCH with a face reported by 7 independent sources
21
+
22
+ $ counterlure report profile.jpg --name "Anna K." --context dating-app --handle @anna.k
23
+ ...
24
+ Filed. Receipt: CL-7Q2M-XK4D-91TF-HC3P
25
+ ```
26
+
27
+ ## What leaves your machine
28
+
29
+ Face detection (YuNet) and face templating (SFace) run locally on open models from [OpenCV's model zoo](https://github.com/opencv/opencv_zoo). What is transmitted depends on the operation.
30
+
31
+ | Operation | Sent | Never sent | Kept by the service |
32
+ |---|---|---|---|
33
+ | `check` | one 128-number SFace template per face | the photo, file names, EXIF | nothing about the query; a per-member daily counter |
34
+ | `report` | a crop of the chosen face, the name given, context, optional handle | the rest of the photo, other faces in frame, EXIF/GPS, device data | the crop and template (encrypted at rest), name and handle (sealed), a hash of the receipt |
35
+ | `withdraw` | the receipt | anything else | nothing: the crop and template are destroyed |
36
+ | `signup` | the username you pick, authenticator codes, the transaction ID of your payment | email, phone, name, card details | the username, the authenticator secret and the payment record (encrypted) |
37
+ | `send` / `inbox` | your message / your session | anything else | the conversation, encrypted at rest |
38
+ | `org enroll` / `org check` / `org report` | enrollment code or anonymous device token; 128-number SFace template only | employee name, email, photo, EXIF, IP | anonymous device token hash; embedding isolated to org namespace until 3+ distinct staff match |
39
+
40
+ Every request is OpenPGP-encrypted to a server key compiled into the tool and padded to a fixed size: 16 KB for control traffic, 224 KB for every report regardless of the photo. Anyone on the path (a Tor relay, or on `--direct` Cloudflare's edge and your ISP) sees that a client talked to the service and when, but not what was asked or answered, and not whether a check was a hit.
41
+
42
+ ## Install
43
+
44
+ Node.js 22 or later.
45
+
46
+ ```bash
47
+ git clone --branch v0.4.5 --depth 1 https://github.com/counterlure/counterlure-cli.git
48
+ cd counterlure-cli
49
+ npm ci
50
+ npm link
51
+ ```
52
+
53
+ You also need the two open face models (39 MB) from OpenCV. The tool never downloads them without asking: you can fetch them yourself first, from OpenCV's own repository, and hand them over with `counterlure models import`. See [Getting the face models](#getting-the-face-models) below.
54
+
55
+ You also need Tor running on the same computer: either [Tor Browser](https://www.torproject.org/download/) left open, or the tor service (`apt install tor`, `brew install tor && brew services start tor`). The tool finds it on 127.0.0.1:9050 or 9150 by itself. Without Tor it stops and says so; it never quietly falls back to the website.
56
+
57
+ ## Getting the face models
58
+
59
+ The tool runs two open models from [OpenCV's model zoo](https://github.com/opencv/opencv_zoo) on your own computer: YuNet finds faces, SFace turns a face into the 128 numbers that are compared. They are not bundled here, and **the tool never downloads them without asking you first.**
60
+
61
+ | Model | File name | Size | SHA-256 |
62
+ |---|---|---|---|
63
+ | YuNet face detector (MIT) | `face_detection_yunet_2023mar.onnx` | 232,589 bytes | `8f2383e4dd3cfbb4553ea8718107fc0423210dc964f9f4280604804ed2552fa4` |
64
+ | SFace face recognizer (Apache 2.0) | `face_recognition_sface_2021dec.onnx` | 38,696,353 bytes | `0ba9fbfa01b5270c96627c4ef784da859931e02f04419c829e83484087c34e79` |
65
+
66
+ The hashes are pinned in [lib/faceprint.js](lib/faceprint.js). A file is accepted only if its hash matches, so it makes no difference where you got it.
67
+
68
+ When a command needs the models, the tool does this, in order:
69
+
70
+ 1. **It looks for copies already on your computer**: in its models folder, then under the exact file names above in the current folder and in your `Downloads` folder. A copy whose hash matches is used with no network request.
71
+ 2. **If any are still missing, it stops and shows you** the table above, the official links, and how to get the files yourself.
72
+ 3. **It downloads only if you type `yes`.** The download goes over the same route as everything else (Tor by default), only from GitHub, and any file that fails the hash is deleted before it is ever loaded. In scripts, where there is nobody to ask, nothing is downloaded unless you pass `--fetch-models`.
73
+
74
+ Run `counterlure models` at any time to see which models are installed and verified. It makes no network request.
75
+
76
+ ### Downloading the models yourself (recommended)
77
+
78
+ Fetching the files yourself means the Counterlure tool never makes the request. You choose when, from where and over which connection, and the download looks like anyone else getting OpenCV's models.
79
+
80
+ **Step 1. Download both files.** Use one of these methods.
81
+
82
+ *In a browser (Tor Browser works):* open each model's page and use GitHub's **Download raw file** button (the arrow icon above the file view).
83
+
84
+ - https://github.com/opencv/opencv_zoo/blob/main/models/face_detection_yunet/face_detection_yunet_2023mar.onnx
85
+ - https://github.com/opencv/opencv_zoo/blob/main/models/face_recognition_sface/face_recognition_sface_2021dec.onnx
86
+
87
+ *With curl over Tor* (macOS, Linux, or Windows 10 and later; use port 9150 if Tor Browser is what is running):
88
+
89
+ ```bash
90
+ curl -L --socks5-hostname 127.0.0.1:9050 -o face_detection_yunet_2023mar.onnx \
91
+ https://github.com/opencv/opencv_zoo/raw/main/models/face_detection_yunet/face_detection_yunet_2023mar.onnx
92
+ curl -L --socks5-hostname 127.0.0.1:9050 -o face_recognition_sface_2021dec.onnx \
93
+ https://github.com/opencv/opencv_zoo/raw/main/models/face_recognition_sface/face_recognition_sface_2021dec.onnx
94
+ ```
95
+
96
+ Drop `--socks5-hostname 127.0.0.1:9050` to download over your normal connection.
97
+
98
+ *In Windows PowerShell* (normal connection):
99
+
100
+ ```powershell
101
+ Invoke-WebRequest -OutFile face_detection_yunet_2023mar.onnx https://github.com/opencv/opencv_zoo/raw/main/models/face_detection_yunet/face_detection_yunet_2023mar.onnx
102
+ Invoke-WebRequest -OutFile face_recognition_sface_2021dec.onnx https://github.com/opencv/opencv_zoo/raw/main/models/face_recognition_sface/face_recognition_sface_2021dec.onnx
103
+ ```
104
+
105
+ *With git:* the model zoo stores its `.onnx` files with Git LFS. Install [git-lfs](https://git-lfs.com) first. Without it, a clone gives you small pointer files of about 130 bytes, and they will not match the hash. A sparse checkout avoids pulling the whole zoo:
106
+
107
+ ```bash
108
+ git lfs install
109
+ GIT_LFS_SKIP_SMUDGE=1 git clone --depth 1 --filter=blob:none --sparse https://github.com/opencv/opencv_zoo.git
110
+ cd opencv_zoo
111
+ git sparse-checkout set models/face_detection_yunet models/face_recognition_sface
112
+ git lfs pull --include="models/face_detection_yunet/face_detection_yunet_2023mar.onnx,models/face_recognition_sface/face_recognition_sface_2021dec.onnx"
113
+ ```
114
+
115
+ Any mirror you trust works too, such as an internal artifact store. Only the hash counts.
116
+
117
+ **Step 2. Check the hashes yourself (optional; the tool checks again).** Compare the output with the table above.
118
+
119
+ ```bash
120
+ sha256sum face_*.onnx # Linux
121
+ shasum -a 256 face_*.onnx # macOS
122
+ ```
123
+ ```powershell
124
+ Get-FileHash -Algorithm SHA256 face_*.onnx # Windows PowerShell
125
+ certutil -hashfile face_recognition_sface_2021dec.onnx SHA256 # Windows cmd, one file at a time
126
+ ```
127
+
128
+ **Step 3. Hand them to the tool.** Use any one of these:
129
+
130
+ ```bash
131
+ counterlure models import ~/Downloads/face_detection_yunet_2023mar.onnx ~/Downloads/face_recognition_sface_2021dec.onnx
132
+ counterlure models import ./opencv_zoo/models # a folder: every .onnx file in it is checked
133
+ ```
134
+
135
+ `import` identifies each file by its hash, so renamed files (`yunet.onnx`, `sface (1).onnx`) are fine. It copies the matches into the models folder and leaves everything else alone, reporting why each one was skipped. You can also skip `import` and leave the files under their original names in your `Downloads` folder, or in the folder you run the tool from; it will find them there. Or copy them into the models folder yourself:
136
+
137
+ - Windows: `%APPDATA%\counterlure\models`
138
+ - macOS and Linux: `~/.config/counterlure/models` (or `$XDG_CONFIG_HOME/counterlure/models`)
139
+ - Anywhere else, by setting `COUNTERLURE_MODELS=/path/to/folder`
140
+
141
+ **Step 4. Confirm.**
142
+
143
+ ```bash
144
+ counterlure models
145
+ # verified face_detection_yunet_2023mar.onnx
146
+ # verified face_recognition_sface_2021dec.onnx
147
+ # Both models verified in ...
148
+ ```
149
+
150
+ ### Letting the tool download them
151
+
152
+ ```bash
153
+ counterlure models --download # shows the sources and hashes, then asks: type yes
154
+ counterlure check photo.jpg --fetch-models # consent in advance, e.g. in a script
155
+ ```
156
+
157
+ If you answer anything other than `yes`, nothing is fetched and the command stops with the instructions above.
158
+
159
+ ## Opening an account
160
+
161
+ ```bash
162
+ counterlure signup
163
+ ```
164
+
165
+ Three steps, all in the terminal:
166
+
167
+ 1. **Username.** Pick one (3 to 32 letters, numbers, `.`, `-`, `_`). This step carries a few seconds of proof of work.
168
+ 2. **Authenticator.** A QR code is drawn in the terminal. Scan it with Aegis, 2FAS, Raivo, Google Authenticator, 1Password or any TOTP app, or type the key shown under it, then enter the 6-digit code to confirm. The authenticator is the only way in: there is no email or password to reset.
169
+ 3. **Payment.** Choose a plan, then a coin. The plans are a **30-day pass ($100)** and a **lifetime account ($5,000, paid once)**; give `--plan pass30` or `--plan lifetime` to skip the question (at the prompt, Enter picks the pass). Nothing is ever charged automatically: a pass is renewed by hand, on the website at <https://www.counterlure.com/join?renew> (sign in with the same username and authenticator), and can be upgraded to lifetime there. When a pass ends, your inbox stays readable, but new reports are no longer linked to it until you renew; the tool tells you when that happens. For the coin, use for example `--chain USDC_BASE`, `ETH_BASE`, `USDC_ERC20`, `USDT_ERC20` or `ETH`, whichever the service currently accepts. You get a payment address made for your account alone, the amount, and the time until which the address may be used, as text and as a QR code. Send at least the amount before that time, then press Enter: the tool waits until the payment is found and confirmed. You can also paste the transaction ID instead.
170
+
171
+ **Never send to an address after its time is up.** The tool says when it has expired and stops showing it; run `counterlure signup` again to get a new one.
172
+
173
+ When the payment confirms, the account opens and you get ten recovery codes, once. Each signs you in a single time in place of an authenticator code. Write them down offline: the tool does not store them.
174
+
175
+ You can stop at any step. `counterlure signup` picks up where you left off; the token for that is kept in `signup.json` beside the session file and deleted when the account opens. Typing `q` at the payment prompt saves your place, so you can pay from an exchange that takes a while; the payment is found whenever it arrives within the address's time. If the payment needs a person to look at it, for example a slightly wrong amount, the tool says so and you can check back later. `counterlure logout` abandons a signup in progress.
176
+
177
+ Unpaid signups are deleted after 30 days, and signups whose authenticator was never confirmed after an hour.
178
+
179
+ ### Why an account costs money at all
180
+
181
+ A $100 pass or $5,000 for life. The price is part of the defence, for two practical reasons.
182
+
183
+ - **Sybil resistance.** Adversaries will try to flood the registry with noise, to poison the face fingerprints or to fish for false positives. Requiring payment creates economic friction against automated sockpuppet spam.
184
+ - **Adversarial resilience, technical and legal.** Counterlure is designed to burn active operatives, so we fully expect sustained pushback from sophisticated malicious actors, including state-sponsored ones. Defending this infrastructure takes continuous hardening against DDoS, infiltration and targeted exploits, and a dedicated legal war chest to fight off SLAPP suits, abusive takedown demands and jurisdictional pressure.
185
+
186
+ We don't run ads, sell data or take VC money that could be pressured into shutting the registry down. Member fees directly bankroll the code defence and legal armour that keep the service alive. The same explanation is on the website: <https://www.counterlure.com/#why-price>.
187
+
188
+ ## Screening a photo (members)
189
+
190
+ ```bash
191
+ counterlure login # username, then the 6-digit authenticator code
192
+ counterlure check a.jpg b.jpg # every face in every photo
193
+ counterlure check --json a.jpg # for pipelines
194
+ counterlure whoami
195
+ counterlure logout # revokes the session server-side and deletes it locally
196
+ ```
197
+
198
+ An account opened on the website ([counterlure.com/join](https://www.counterlure.com/join)) works here too, and the other way round. A session lasts 24 hours and is stored in `~/.config/counterlure/session.json` (Windows: `%APPDATA%\counterlure\session.json`), mode 0600 on Linux and macOS. Checks are limited to 50 per member per day.
199
+
200
+ The server answers with a level only, `strong` or `possible`, and the source type (corroborated case or burn notice). It returns no similarity scores, so repeated queries with doctored images can't be used to walk toward a reported face.
201
+
202
+ Screening only covers corroborated material. A face reported once, by one person, will not match. That is deliberate: a single report is an allegation, and the watchlist is not a tool for checking up on a name someone gave you once.
203
+
204
+ ## Face fingerprints for AI assistants (anyone, offline)
205
+
206
+ ```bash
207
+ counterlure fingerprint photo.jpg # every face, as JSON: { model, faceprints: [{ face, box, vector }] }
208
+ counterlure fingerprint photo.jpg --face 2 # only the second-largest face
209
+ counterlure fingerprint photo.jpg --token # send that one fingerprint, print a 30-minute one-time code
210
+ ```
211
+
212
+ This is for the Counterlure Agent Exchange (`check_contact` on `https://mcp.counterlure.com/mcp`, or the `counterlure-mcp` package). Without `--token` nothing goes over the network: the face is found and measured on this machine, and the 128 numbers are printed for an assistant to send. With `--token`, the fingerprint goes over the usual route (the onion service by default), never the photo. You get back a code that an assistant can pass instead of the numbers. No account is needed.
213
+
214
+ ## Messages to the team (members)
215
+
216
+ ```bash
217
+ counterlure send "The profile I reported last week now uses a second handle"
218
+ counterlure send --subject "Payment" "I sent the wrong amount, tx ..."
219
+ counterlure send < notes.txt # from a file or a pipe
220
+ counterlure send # type it; finish with a line holding only "."
221
+ counterlure inbox # the conversation, oldest first; --all for everything
222
+ counterlure whoami # also shows how many replies are unread
223
+ ```
224
+
225
+ A message lands in the Counterlure team's inbox. Replies come back to `counterlure inbox`, and to the inbox on the website, which shows the same conversation. Messages are encrypted at rest, up to 4,000 characters each, 20 a day.
226
+
227
+ ## Filing a report (anyone)
228
+
229
+ ```bash
230
+ counterlure report photo.jpg --name "Anna K." --context dating-app --handle @anna.k
231
+ ```
232
+
233
+ | Option | |
234
+ |---|---|
235
+ | `--name` | the name they used with you. Required. A cover name is still useful: the same face under several names is the signal. |
236
+ | `--context` | where the approach happened: `dating-app`, `social-media`, `event-or-conference`, `work-or-business`, `introduced`, `other` |
237
+ | `--handle` | the profile, handle or URL they used. Optional. Sealed on arrival. |
238
+ | `--face N` | which face, when the photo has more than one. The tool refuses to guess and lists them. |
239
+ | `--dry-run` | do everything except transmit |
240
+ | `--save-crop FILE` | write the exact JPEG that is, or would be, sent, so you can inspect it |
241
+ | `--anon` | file unattributed even while signed in |
242
+ | `--yes` | skip the prompt for scripted use; you are still making the statement below |
243
+
244
+ Before anything is sent you are shown a summary of exactly what will leave, and asked to confirm this statement:
245
+
246
+ > I am in contact with this person personally and I am unsure about their intentions. I am not using this to track an ex-partner or anyone else, and nothing about my report is based on their nationality or ethnicity.
247
+
248
+ **The crop.** The photo is decoded to raw pixels, rotated upright, cut down to the chosen face plus a margin, and encoded as a new JPEG of at most 480 px. The margin shrinks if it would take in another detected face. Because the output is built from pixels and not copied from the source file, no EXIF, GPS position, device serial, colour profile or embedded thumbnail can survive into it. Check this yourself with `--dry-run --save-crop crop.jpg` and any metadata viewer. `check` and `org report` send no image at all, only the 128-number face template, so there is no photo metadata to leak.
249
+
250
+ The website's report form does the same in the browser: the photo is decoded and redrawn on a canvas and re-encoded as a new JPEG before upload, so EXIF, GPS, device data, thumbnails and the original file name never leave the device. The server re-encodes every upload again on arrival.
251
+
252
+ **The receipt.** A successful report returns a receipt such as `CL-7Q2M-XK4D-91TF-HC3P`. It is the only handle on the report: the tool does not store it, and the service holds only a keyed hash of it. Record it offline. To withdraw:
253
+
254
+ ```bash
255
+ counterlure withdraw CL-7Q2M-XK4D-91TF-HC3P
256
+ ```
257
+
258
+ The report leaves the case, and the stored crop and template are destroyed.
259
+
260
+ ### Attributed and unattributed reports
261
+
262
+ | | Signed in | No account, or `--anon` |
263
+ |---|---|---|
264
+ | Counts toward a case as | one source per member | **one source shared by every unattributed CLI report** |
265
+ | Feedback | you are told privately if the case is acted on | none |
266
+ | Proof of work | none | yes, a few seconds of CPU |
267
+ | Limit | 20 per member per day | 25 an hour and 150 a day across the service, shared by everyone |
268
+ | Match result returned | no | no |
269
+
270
+ Unattributed intake is where a corroboration system gets attacked: script a few hundred reports against one face and hope the volume reads as independent sourcing. So every unattributed CLI report shares a single source identity. However many are filed, they add up to one source, and a case needs at least three independent sources including a member, or five from anyone, before an analyst even looks at it. Anonymous CLI reports can strengthen a case but cannot create one.
271
+
272
+ Each unattributed report also carries a proof-of-work stamp, a SHA-256 partial preimage bound to that request's one-time nonce, so it can't be precomputed or reused. The default is 21 bits, about two million hashes. If the service raises the bar, the tool retries once at the level it names, and it refuses to go past 26 bits whatever it is told.
273
+
274
+ Filing a report never returns a match result, whether you are signed in or not. Reporting is not a side channel into the watchlist.
275
+
276
+ ### Abuse and moderation
277
+
278
+ A service that accepts photos from strangers will be sent things it should never hold: floods of junk meant to run up costs or bury real reports, and pornography or child sexual abuse material sent on purpose to get the service taken down. Every report photo goes through the same screen on the server, whether it came from this tool or the website, before anything is stored.
279
+
280
+ **What the screen refuses.**
281
+
282
+ | Refused | What happens |
283
+ |---|---|
284
+ | Blank, tiny or featureless images | Refused by a local check before any paid classifier sees them. Floods of near-empty images cost almost nothing to turn away. |
285
+ | No face, or more than one prominent face | Refused, with a message saying how to fix the photo. |
286
+ | Sexual content or nudity | Refused. If the only photo you have is explicit, crop it to the face first. |
287
+ | Graphic violence or gore | Refused. |
288
+ | A person who appears to be under 18 | Refused. Counterlure only accepts reports about adults. |
289
+ | A minor together with any sexual or suggestive content | Refused with a message that gives no reason, and the reporter is suspended at once. |
290
+
291
+ **Nothing refused is kept.** A refused photo is never written to storage and no person ever looks at it. The server records the outcome, the classifier's label names and scores, and, for sexual, violent or abusive refusals, a SHA-256 hash of the file. The hash goes on a blocklist, so the same file sent again is refused straight away without being classified again.
292
+
293
+ **Only the face is stored.** Even an accepted photo is not kept whole. The server cuts it down to the face plus a small margin, and that crop is the only image sealed and indexed. This tool already sends only a face crop, so in practice the server's cut changes little for CLI reports.
294
+
295
+ **Repeat senders are cut off.** Refusals count as strikes against the reporter: the member, the website visitor, or the shared identity of all unattributed CLI reports. One child-abuse refusal, or a few sexual or violent ones in a month, suspends reporting from that source until an administrator reviews it. Many refusals of any kind in a day pause it until the next day. The service also has a daily ceiling on photo checks, so a flood cannot run up an unbounded bill. When the ceiling is reached, reports are turned away until the next day.
296
+
297
+ **Fails closed.** If the content classifier is unavailable, reports are refused with a "try again later" error. They are never accepted unscreened.
298
+
299
+ **Screening a photo is different.** `counterlure check` never sends an image, only a 128-number template computed on your machine, so there is nothing on that path to moderate. It has its own daily limit per member.
300
+
301
+ Automated classifiers make mistakes in both directions. If a genuine photo of an adult is refused, crop it more tightly to the face and try again, or send a message to the team.
302
+
303
+ ## Organization / Enterprise mode (Cluster Defense)
304
+
305
+ > **For Security Teams, CISOs, and AppSec Reviewers:** See the exhaustive **[Enterprise Cluster Defense Manual (ENTERPRISE.md)](ENTERPRISE.md)** for full cryptographic architecture, portal deployment instructions, incident response playbook, copy-pasteable staff rollout memo, and AppSec code audit checklist.
306
+
307
+ Organizations enrolled in [Counterlure Enterprise](https://www.counterlure.com/enterprise) distribute an internal enrollment code to their staff so engineers, researchers, and executives can screen and report suspicious contacts with **zero-knowledge employee anonymity**:
308
+
309
+ ```bash
310
+ counterlure org enroll CLORG-XXXX-XXXX # receive an anonymous per-device credential
311
+ counterlure org check photo.jpg # screen against org alerts + global Counterlure pool
312
+ counterlure org report photo.jpg --context work-or-business
313
+ counterlure org inbox # read private alerts (including org-under-attack notices)
314
+ counterlure org status # aggregate org threat posture & unread alerts
315
+ counterlure org withdraw CLO-... # withdraw an organization report by receipt
316
+ counterlure org leave # delete the local device credential
317
+ ```
318
+
319
+ - **Zero employee PII**: No name, corporate email, or IP address is ever collected on employee devices.
320
+ - **No photos leave your machine**: `org report` sends only the 128-number mathematical face template, stored strictly inside your organization's private namespace.
321
+ - **Dual-tier escalation (threshold = 3)**: Single reports remain completely private. Only when **3 distinct anonymous devices** within your organization independently report the same face does the cluster promote to the global Counterlure pool, alert your security team (case reference and count only — no photos, names, or reporters), and send a private message to your `org inbox` advising you to step forward to your security team.
322
+
323
+ ### Why staff need an outside channel
324
+
325
+ Studies of employee security reporting find that staff notice suspicious approaches and still say nothing, because reporting costs them more than silence:
326
+
327
+ - **Fear of blame and liability** (Burda et al., Eindhoven University of Technology, 2025): employees hold back for fear of being blamed, and because they are unsure an approach is truly malicious.
328
+ - **Not at their own expense** (Carleton University, 2024): staff feel a strong pull to do nothing, out of fear of retaliation, social friction, and personal scrutiny.
329
+ - **Distrust of internal confidentiality** (International Journal of Critical Infrastructure Protection, 2018): low confidence that reports stay confidential, and fear of a false alarm, suppress formal reporting.
330
+ - **Shame and peer disapproval** (University of Sussex & University of Auckland, 2020): shame and fear of colleagues' judgment deter admitting engagement with a lure.
331
+ - **Privacy and handling friction** (RAID '24): uncertainty over how reports are handled, and reluctance to expose personal message threads, reduce reporting.
332
+
333
+ Counterlure is an independent, external tool: the employer never learns who reported, never sees a photo or a message thread, and hears nothing until at least three people independently report the same face.
334
+
335
+ ### Licensing and why there is no sales team
336
+
337
+ Licenses are one-time and lifetime, sized by seats (one enrolled device or one unused enrollment code): Small enterprise, up to 25 seats, $50,000 ($2,000 per seat); SME, up to 200 seats, $250,000 ($1,250 per seat); Large organization, up to 5,000 seats, $500,000 ($100 per seat). 50% off every license paid by December 31, 2026. Moving up later costs the difference.
338
+
339
+ Counterlure runs unattended, enterprise included: no sales calls, demos, account managers, or named staff. Operating a tool that exposes recruitment and honeypot campaigns makes its operators a target, so opsec comes first, and it starts with staying anonymous. Payment on public blockchains serves the same end: no card processor or bank account ties the register to a person. Blockchain transfers are public and traceable; this protects the operators' identities, not the privacy of a payment. Details in [ENTERPRISE.md](ENTERPRISE.md).
340
+
341
+ ## Network: no address of yours reaches us
342
+
343
+ By default the tool talks only to Counterlure's onion service:
344
+
345
+ ```
346
+ 4qcqgpa4o6gc7yhqvqvdndx7jeeplsishebyxwf3667kphalxxtvfkad.onion
347
+ ```
348
+
349
+ The request goes from the Tor on your computer through Tor relays to Tor on our server, which hands it to a listener on 127.0.0.1 that serves nothing but this tool's API. It never touches Cloudflare, a load balancer or any public address of ours. It arrives from localhost, so there is no address of yours in it to log, store or hand over. The onion address is itself the service's public key, so no relay can impersonate us, and the OpenPGP layer works the same as on any other route.
350
+
351
+ Each run uses its own Tor circuit (SOCKS isolation), so the tool never shares a path with your browser. Hostnames go to Tor unresolved: no DNS query about us leaves your machine. The tool refuses to contact an `.onion` address any way except through SOCKS, and if Tor isn't running it stops with instructions instead of trying another route.
352
+
353
+ Other routes, when you ask for them:
354
+
355
+ ```bash
356
+ counterlure --direct whoami # the website, www.counterlure.com, through Cloudflare
357
+ counterlure --direct --tor whoami # the website, through Tor
358
+ counterlure --direct --proxy socks5h://127.0.0.1:1080 whoami
359
+ COUNTERLURE_TOR=10.0.0.5:9050 counterlure whoami # Tor running somewhere other than 9050 or 9150
360
+ ```
361
+
362
+ On `--direct` without Tor or a proxy, Cloudflare (which fronts the website) sees your address. The service itself does not keep it: no CLI operation records or rate-limits by network address, on any route.
363
+
364
+ The whole network path is [lib/net.js](lib/net.js) and [lib/route.js](lib/route.js), with no third-party dependencies. The model download takes the same route.
365
+
366
+ ## Reading a result
367
+
368
+ * A match is a lead, not an identification. Faces resemble each other, and recognition degrades on small, blurred, off-angle or filtered images. Corroborate through other means before acting.
369
+ * No match is not a clearance. Only faces that have been reported and corroborated can match.
370
+ * Do not confront, harass or publish anyone on the strength of a result. If you have new information, file it.
371
+
372
+ ## Threat model
373
+
374
+ Protected:
375
+
376
+ * **Your photo**, on `check`. It never leaves the machine.
377
+ * **Everything beyond the face**, on `report`. Background, bystanders, location and device metadata stay with you.
378
+ * **Your network address.** On the default onion route it never reaches us. On `--direct` it reaches Cloudflare, but not our records.
379
+ * **Content in transit.** On the onion route Tor encrypts end to end; on `--direct`, TLS ends at Cloudflare's edge. Either way the OpenPGP layer inside means relays, the edge and proxies see only fixed-size ciphertext.
380
+ * **Integrity of answers.** A reply must be signed by the pinned key, encrypted to the one-time key generated for that request, and echo its nonce. Anything else is discarded.
381
+ * **Replay.** The service accepts each nonce once, within five minutes of its clock.
382
+ * **The origin.** The tool talks to the onion service, or to `www.counterlure.com` behind Cloudflare. No origin address is in this repository.
383
+
384
+ Not protected:
385
+
386
+ * **Who checked.** On `check` the service knows which member asked, though it keeps no record of what was asked.
387
+ * **Your address on `--direct`**, from Cloudflare, unless you add `--tor` or `--proxy`.
388
+ * **Your payment.** Blockchains are public. The transaction is linked to your account in our records, and anyone who knows your wallet can see it on chain. Pay from a wallet that isn't tied to your name if that matters to you.
389
+ * **The face itself, on `report`.** A face crop is personal data about the person reported. It is held encrypted, used for matching, and destroyed on withdrawal. File only on people who actually approached you.
390
+ * **A compromised endpoint.** If your machine is compromised, nothing here helps.
391
+
392
+ ## Verifying the server key and onion address
393
+
394
+ `counterlure key` prints the pinned fingerprint and the onion address. Compare it against at least two independent sources: the [CLI section of the website](https://www.counterlure.com/#cli), the key served at <https://www.counterlure.com/api/cli/key>, and the tagged release on GitHub. The tool checks the compiled-in key against the pinned fingerprint before every request.
395
+
396
+ ## Testing against your own server
397
+
398
+ `COUNTERLURE_URL` points the tool at another server and `COUNTERLURE_SERVER_KEY` at a file holding its public key. The tool warns on every run while either is set. `--server URL` does the same as `COUNTERLURE_URL` for one run. Plain `http://` is accepted only for `localhost` and `.onion` addresses.
399
+
400
+ ```bash
401
+ npm test
402
+ ```
403
+
404
+ ## Supporting the project
405
+
406
+ The CLI is free and open source, and filing a report is free. If you want to help keep Counterlure
407
+ running without opening an account, you can send a contribution through Fluidkey:
408
+ <https://counterlure.fkey.id>
409
+
410
+ Any amount helps. Fluidkey gives you a fresh address each time, so contributions don't sit together
411
+ in one public wallet. A contribution doesn't buy membership or any feature, and it never affects
412
+ how a report is reviewed. Check that the address is `counterlure.fkey.id` before you send: we never
413
+ ask for funds anywhere else, and never by message.
414
+
415
+ ## Licence
416
+
417
+ Apache License 2.0 (see [LICENSE](LICENSE) and [NOTICE](NOTICE)). Versions up to 0.3.0 were released under MIT and stay under MIT.
418
+
419
+ You may read, run, change and share the code. The licence gives no right to the Counterlure name: a changed copy must not call itself Counterlure or the official CLI. Only releases from this repository are official, and only they hold the pinned server key that checks every reply comes from Counterlure.
420
+
421
+ The models are not distributed here. You get them from OpenCV's model zoo yourself, or the tool fetches them from there once you agree: YuNet under MIT, SFace under Apache 2.0.