Skip to content

docs: update README.md - #6

Merged
infinition merged 1 commit into
infinition:mainfrom
eltociear:patch-1
Nov 7, 2024
Merged

infinition merged 1 commit into
infinition:mainfrom
eltociear:patch-1

Conversation

@eltociear

Copy link
Copy Markdown
Contributor

alogorithm -> algorithm

alogorithm -> algorithm
@infinition
infinition merged commit 4dd3086 into infinition:main Nov 7, 2024
Gixar added a commit to Gixar/Bjorn-V3 that referenced this pull request Aug 11, 2026
Top-10 capability ideas mined from Flipper/Pwnagotchi/bettercap/Kismet/
Responder/nuclei/etc., ranked by fit-over-effort with S/M/L tags, plus
deeper effort breakdowns for Responder poisoning (infinition#2), BLE recon (infinition#6),
and Wi-Fi wardriving (infinition#7).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Gixar added a commit to Gixar/Bjorn-V3 that referenced this pull request Aug 11, 2026
…rhaul

infinition#6 (BLE recon) and infinition#7 (Wi-Fi wardriving) each get a required dedicated
web panel (config + results view), like the Bettercap panel.

Add a coins/stats overhaul item under QoL: today update_stats()
recomputes coins/level from live counts (so the score can drop and
rewards nothing durably). Four fronts, all confirmed wanted: earned &
persistent monotonic score, RPG level curve, richer stats breakdown in
the web UI, and rebalanced award weights.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Gixar added a commit to Gixar/Bjorn-V3 that referenced this pull request Aug 11, 2026
New opt-in standalone action BLEScan: a timed bluetoothctl discovery
records nearby BLE/Bluetooth devices to ble_devices.csv (MAC, name,
tracker flag, first/last seen) and flags likely trackers
(AirTag/Tile/SmartTag...). New /ble web page (nav) configures it and
shows a live results table (GET /ble_data, names via textContent).

Decision: BLE lives in its own file, NOT netkb.csv -- non-IP wireless
entries don't fit the netkb IP+Ports schema; the unified device_type
column stays a future foundation item for wardriving/ESP32. No-op unless
ble_scan_enabled + bluetoothctl present; throttled by ble_scan_interval.
New config keys + tests. Backlog Wave 2 infinition#6.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Gixar added a commit to Gixar/Bjorn-V3 that referenced this pull request Aug 12, 2026
…; end silent bettercap polls

infinition#6 (done) — a hostile or looped host could hang the worker or fill the SD:
- FTP + SMB find_files gain a MAX_DEPTH cap + visited-set + MAX_FILES_PER_RUN.
  Depth is the real symlink-loop backstop (a loop grows the path each level, so
  the visited-set alone won't catch it).
- Every steal enforces a shutil.disk_usage free-space precheck (MIN_FREE_BYTES),
  a streamed per-file cap (MAX_FILE_BYTES, aborts mid-download), and a per-run
  budget (MAX_RUN_BYTES); partial files are unlinked on error.
- SQL validates + backtick-quotes the identifier and reads SELECT * ... LIMIT
  MAX_ROWS, deleting the dump if it exceeds the cap.

infinition#5 (partial) — bettercap poll_once no longer fails silently: first failure logs
immediately, then backs off (30s -> 30m cap), records _last_error, and logs a
recovery line when the daemon answers again. A wrong password was 8,640 silent
failed polls/day. The typed Outcome contract + lint + web last-error panel remain.

From the reviewed Downloads/Fixes/infinition#6#5 set (bettercap/ftp/smb verified correct);
completed the missing part: steal_data_sql referenced shutil + four cap constants
it never imported/defined (a guaranteed NameError) — added them.

Tests: test_smb_find_files_bounds_an_infinite_tree (recursion is bounded) and
test_poller_backs_off_repeated_failure_logs (logs once, not every poll). The two
__new__-built poller tests now seed the new backoff state. 322 passing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Gixar added a commit to Gixar/Bjorn-V3 that referenced this pull request Aug 13, 2026
Removes the ~50-80 MB lazy pandas import from scanning.py, nmap_vuln_scanner.py,
and steal_data_sql.py — the last three P2 offenders. All CSV I/O now goes through
stdlib csv with temp+fsync+os.replace, matching the infinition#7 atomic-write pattern.

- scanning.py LiveStatusUpdater: DictReader rows instead of a DataFrame. Alive is
  the string "1" in netkb; the old `df['Alive'] == 1` (int after pandas inference)
  would count 0 alive hosts under DictReader, so _is_alive() tolerates "1"/1/" 1".
  Every calc sets a default on failure so an exception can't leave attrs unset.
- nmap_vuln_scanner.py: header-only create; append + (IP,MAC) keep-last dedupe
  still under _summary_lock; save_summary groups + unions vuln tokens in pure Python.
- steal_data_sql.py: text()+engine.connect() (raw strings raise on SQLAlchemy 2.0),
  stream rows via csv.writer (no DataFrame in RAM), credentials via csv.DictReader.
  Fixed a shadowing bug: the credential loop var was `row`, clobbering the execute()
  `row` param reused as `row['MAC Address']` — every SQL steal would have returned
  'failed'. Renamed to `cred`. Byte-budget/free-space caps (infinition#6) preserved.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Gixar added a commit to Gixar/Bjorn-V3 that referenced this pull request Aug 14, 2026
The plan had grown into a changelog: four fifths of it described work that
was already done and proven, which buried the handful of things actually
left. Restructured around the effort each item needs.

- Removed infinition#1, infinition#4, infinition#6 and infinition#7 entirely — done and verified; git history and
  CHANGELOG.md hold them.
- § 1 "Awaiting confirmation": shipped code with no proof behind it. Opens
  with a 19-step run sheet — every command in order, tagged [dev]/[pi]/[web],
  one pass line each. The lettered entries below it explain what a result
  means, so the steps stay terse.
- § 2 "Partial": landed but a piece is missing, with where to start.
- § 3 "Not started": infinition#15 only.
- Index table maps each item number to its section(s), since infinition#2, infinition#11, infinition#12
  and infinition#14 legitimately straddle two — the shipped half needs a run, the
  unshipped half needs code.

Three things found while writing the steps, all of which change how they
should be run:

- infinition#8's honest expectation is ~2x on a Zero 2 W, not 1/k. _host_parallel_workers
  divides a cores*4 budget by bruteforce_threads (resolved to 8 at init), so
  auto lands on 2 workers.
- A WARN in bjorn_verify Section 9 is not a pass. Delegation only resolves on
  the literal "from base_connector import"; if it drifts, the check silently
  covers nothing instead of failing.
- install_bjorn.sh:638 skips the copy when /home/<user>/Bjorn exists, so the
  installer cannot deploy an update. The run sheet syncs the tree directly and
  excludes config/shared_config.json.

Also states the removal policy: record the result in BACKLOG.md or CHANGELOG.md
before deleting a confirmed item, or a removed entry is indistinguishable from
one that was never checked.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Gixar added a commit to Gixar/Bjorn-V3 that referenced this pull request Aug 14, 2026
…tion#6, which was not done

Builds the second half of infinition#12's base+adapters work, mirroring base_connector.
The shared flow — parent gate, latch reset, credential load, run-token
watchdog, credential loop, outcome contract — exists once. steal_files_ssh
goes 192 -> 108 lines and implements open_session / find_files / steal_file.

The reason this took a detour: converting SSH meant reading its steal_file,
which has no byte caps and no free-space check. Counting across the six:

  ftp, smb, sql  -> caps + free-space check
  ssh, rdp, telnet -> neither

infinition#6 was recorded as "every steal has a free-space precheck + per-file/per-run
byte budgets", was marked done, and was deleted from the improvement plan on
that basis. It covered three modules. SFTP could pull a file of any size onto
a 512 MB Pi Zero — exactly what infinition#6 exists to prevent. infinition#6 is reopened in the
plan with a per-module table; RDP and Telnet are still uncapped and land free
when those adapters convert, since the caps now live on the base.

Three design notes, all in the module docstring so they survive:

- The connect hook is open_session, not connect. test_connectors.py's
  _TIMEOUT_SITES matches .connect(...) callees by AST and asserts a timeout
  kwarg (infinition#4); a method named connect would match and fail for a rule that does
  not apply to it. The name avoids a collision, it is not cosmetic.
- Each adapter keeps its own LOGGER. base_connector logs its shared flow to
  base_connector.py.log; doing that here would move the steal flow out of
  data/logs/steal_files_<proto>.py.log, where every runbook and post-mortem
  looks. One line per adapter buys keeping it.
- SFTP stats before transferring, so the per-file cap is a refusal rather than
  an abort partway through — nothing crosses the wire to be discarded.

Both source-parsing tests broke on the conversion exactly as the connector
half predicted, and were taught to follow delegation the same way bjorn_verify
Section 9 was: test_status_settle.py and test_steal_modules.py now parse the
base for a module that imports from base_stealer. Verified by planting a break
in the base — both fired.

Five adapters remain: SMB, FTP, RDP, Telnet, SQL. SMB and SQL will need one
extra seam (shares / tables, plus the anonymous-access fallback), the way
base_connector grew result_rows and after_queue.

365 passing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Gixar added a commit to Gixar/Bjorn-V3 that referenced this pull request Aug 14, 2026
Section 9 verified the six connectors and stopped there, so everything the
steal modules guarantee was unverified on-device — including the caps whose
absence went unnoticed in three of six modules.

Section 9 now also, using the same follow-the-delegation rule already applied
to the connectors (a module importing from base_stealer is checked against the
base):

- confirms every steal resets its latch per run;
- counts byte/free-space caps PER MODULE and fails naming the ones without
  them. This is the check that would have caught infinition#6 being recorded as done
  while ssh, rdp and telnet had none. Today it correctly reports
  "4/6 capped: SSH, SMB, FTP, SQL" and fails on RDP, Telnet;
- confirms every execute() returns a code normalize_outcome recognises, since
  anything else silently becomes FAILED and stamps a failure on a working
  action.

Output:

- per-section tally, so two FAILs in one area read differently from one in
  each;
- a --- Changes --- delta against the newest saved report, naming what is
  FIXED / REGRESSED / NEW. Verified end to end by moving base_stealer.py away
  between two --save runs: the second reported REGRESSED on the latch check.
  With no baseline it says so, rather than printing something that looks like
  "nothing changed";
- "Not confirmed this run", collecting every WARN and SKIP. A SKIP read as a
  pass is how the 2026-08-08 sweep reported a radio test it had never run.

Also on the web section: /get_logs must answer without an error body (the
serve_logs race fixed in 99ff1dd), and infinition#11's screen_version must be non-zero.

execute_body() is parsed with ast, not split on "def execute(". Splitting
reads to end of file, so a helper defined below execute() is attributed to it
— the first version of the outcome-code check flagged a `return "wpasec-..."`
from a helper in wpasec_import.py. Caught by smoke-running the script rather
than by reading it.

summarize() now indexes instead of unpacking: results grew a section field and
its existing test passes 3-tuples.

367 passing (+2 for the new pure helpers). pylint --errors-only clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Gixar added a commit to Gixar/Bjorn-V3 that referenced this pull request Aug 15, 2026
…en check after /get_logs

On-Pi sweep of 0fc93ea: 37 PASS, 1 FAIL, 3 WARN, 3 SKIP. Recorded in
BACKLOG.md, and section C plus step 9's expectations are removed from the
plan per the record-then-delete rule.

The single FAIL is infinition#6 on RDP/Telnet, which is the run doing its job rather
than a regression: both were uncapped before this sweep and before the last
one. What changed is that Section 9 now counts caps per module — the
2026-08-14 fresh-install sweep's "32 PASS / 0 FAIL" was clean because it never
asked. Worth remembering the next time a zero-FAIL report feels like an
answer.

Confirmed on hardware: all three connector guarantees still hold after the
six-connector conversion; the new steal checks pass through delegation; the
/get_logs boot race is fixed (answers without an error body where it used to
return ENOENT on the first call after every boot); Wi-Fi recon fully green
again with release() restoring wlan1 and the uplink undisturbed.

One real wart the report exposed: log_version read 0. Correct, not a defect —
temp_log.txt is created lazily by the first /get_logs and deleted at startup,
and the verifier queried /api/stats before calling /get_logs, so it was always
going to see 0 on a freshly booted device. Moved the token read after that
call, and log_version now gets its own WARN-level check: a zero *after* a
successful /get_logs means the console would load once and freeze.

The run was made without --save, so the new change delta had no baseline and
said so. The run sheet now says to always pass it.

367 passing. pylint --errors-only clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Gixar added a commit to Gixar/Bjorn-V3 that referenced this pull request Aug 15, 2026
…down to RDP alone

steal_files_telnet.py 257 -> 185 lines. Less dramatic than SSH because the
base64/marker transport is genuinely telnet-specific and stays; the shared
flow (parent gate, latch reset, credential loop, watchdog, outcome contract)
still moved to the base, and it gains the infinition#6 caps it never had.

The size cap needed a telnet-specific wrinkle: this transport reads the whole
file into memory as base64 before anything can measure it, so a cap applied
only after decoding would let a multi-gigabyte file OOM a Pi Zero on the way
to being rejected. Added a `wc -c` size probe before the transfer; unknown
size falls through to a post-decode budget check, which is smaller protection
but never worse than before. open_session now raises on a failed login rather
than returning None, which the base reads as "try the next credential".

The binary-safe / echo-proof regression test
(test_telnet_download_is_binary_safe_and_echo_proof) passes unchanged against
the converted adapter — the transport bytes are identical, only their housing
moved. bjorn_verify now reads 5/6 capped, FAIL narrowed to RDP.

Fixed a grammar wart in the verifier output while there: the infinition#6 FAIL said
"RDP have neither" for a single module; now agrees in number.

367 passing. Local pylint flags telnetlib E0401 on this 3.14 dev box — removed
in 3.13, present on the Pi's 3.11 and in CI, and the old file imported it too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Gixar added a commit to Gixar/Bjorn-V3 that referenced this pull request Aug 15, 2026
The "awaiting confirmation" section had become a second, growing list that
never closed on its own — running a check does not remove code, so those items
only added to the count. Removed § 1 entirely: the run sheet and all lettered
entries. The plan is now just what needs a diff (§ 2) and what is unstarted
(infinition#15).

On-hardware confirmation still happens via bjorn_verify.py --save and gets
recorded in BACKLOG.md; it is simply no longer tracked here as open work.
Nothing about the code changed.

Index rewritten to a single "what is left" column, and the RDP convergence
made explicit: finishing the RDP adapter closes infinition#12's last piece, infinition#6's caps,
and infinition#2's remote transport together.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Gixar added a commit to Gixar/Bjorn-V3 that referenced this pull request Aug 15, 2026
infinition#6/infinition#2, add #5a/infinition#14

- base_stealer: add overridable harvest(conn, ip, row); execute() calls it.
- actions/steal_files_ftp,_smb,_data_sql,_files_rdp: BaseStealer adapters.
  - FTP/SMB try anonymous/guest first via load_credentials.
  - SQL harvest dumps tables; successful auth with zero tables is still success.
  - RDP (infinition#2/infinition#6): +auth-only verifies the credential, defers file collection to
    SMB on the same IP; byte/space caps via check_budget/fits_budget/note_bytes.
- tests: all six modules assert open_session; RDP command-injection test updated
  for the new steal_file(conn, remote_file, local_dir) signature.
- #5a: utils.get_stats_snapshot exposes bettercap_last_error; web panel shows it
  in red when non-null.
- infinition#14: CI test matrix 3.11/3.12 + armv7 QEMU job (uraimo/run-on-arch-action).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Gixar added a commit to Gixar/Bjorn-V3 that referenced this pull request Aug 15, 2026
 RDP loot closed (9b6906d)

The four remaining steal adapters (SMB/FTP/SQL/RDP) landed on BaseStealer,
closing all three converging items. Collapse their §2 sections to a closed
note; drop their index rows; RDP-steal FAIL from the last on-Pi sweep is
fixed in code pending the next device sweep (Section 9 should read 6/6).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Gixar added a commit to Gixar/Bjorn-V3 that referenced this pull request Aug 15, 2026
…on#2 RDP, #5a panel, CI SHA pin

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants