chore(i18n): finish translating code comments and scripts to English
CI / Format and clippy (push) Successful in 1m13s
CI / Dependency audit (push) Successful in 13s
CI / Tests (Linux) (push) Successful in 1m35s
Release / Create release (push) Successful in 7s
CI / Check desktop app (Linux) (push) Successful in 3m19s
Release / CLI (linux-aarch64) (push) Successful in 1m3s
Release / CLI (linux-x86_64) (push) Successful in 1m28s
Release / Desktop app (linux-aarch64) (push) Successful in 7m16s
Release / Desktop app (linux-x86_64) (push) Successful in 10m17s
Release / Desktop app (windows) (push) Successful in 4m54s

Completes the English-only standardization for code, comments, scripts
and CI templates (UI/CLI-facing strings stay bilingual pt-BR/en,
untouched). Covers the remaining crates/, apps/gui/ui/ and
apps/gui/src-tauri/ comments, .gitea/ workflow and template comments,
.githooks/ hooks, and the scripts/ source comments for the files
already renamed in a prior commit (check.sh, generate-logo.py,
install-hooks.sh).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VAyr8d7HuAdUGB6aA5xmDD
This commit is contained in:
Lucas RayanandClaude Sonnet 5 committed 2026-10-30 20:44:39 -03:00
1 parent bf059fd0bc
commit 55e19a8e5b
59 files changed
+935 -879

No files matched your search

+29 -29
View File
@@ -1,5 +1,5 @@
//! Agregação de quadros capturados em tabelas de redes, clientes e
//! handshakes — o coração do que a CLI e a interface mostram.
//! Aggregates captured 802.11 frames into access point, client station, and
//! handshake tables.
use crate::dot11::{self, FrameKind, Security};
use crate::handshake::{Handshake, HandshakeInfo, HandshakeTracker};
@@ -59,7 +59,7 @@ pub struct ClientEvent {
#[derive(Debug, Clone, serde::Serialize)]
pub struct Client {
pub mac: String,
/// Nome curto para exibir: hostname, nome WPS, modelo ou fabricante.
/// Best human-readable label for a station: DHCP/mDNS hostname, WPS device name, model, or OUI vendor.
pub display_name: Option<String>,
pub vendor: Option<String>,
pub manufacturer: Option<String>,
@@ -78,10 +78,10 @@ pub struct Client {
pub associated: bool,
pub first_seen_unix: u64,
pub last_seen_unix: u64,
/// Amostras de sinal (mais antiga primeiro), limitadas para não crescer
/// sem fim numa captura longa.
/// Recent RSSI history (oldest first, bounded ring) for sparkline rendering.
///
pub signal_history: Vec<SignalSample>,
/// Linha do tempo curta: primeiro visto, probe, associação, desautenticação.
/// Per-client event timeline (first seen, probe, association, deauthentication, etc.).
pub events: Vec<ClientEvent>,
}
@@ -102,15 +102,15 @@ pub struct ScanSnapshot {
pub clients: Vec<Client>,
pub handshakes: Vec<HandshakeInfo>,
pub analysis: crate::analysis::Analysis,
/// Preenchido quando a captura morreu sozinha (erro de I/O, adaptador
/// caiu da USB, etc.) — `running` já vem `false` nesse caso, mas sem
/// isso a UI não tinha como dizer *por quê* parou.
/// Populated when the capture loop terminated due to an I/O error (e.g. unplugged
/// USB adapter).
///
pub error: Option<String>,
/// Preenchido quando a captura está rodando mas não recebeu nenhum
/// quadro depois de um tempo razoável saltando canais — sintoma de uma
/// placa que aceita ativar o modo monitor (o netlink não recusa) mas não
/// entrega quadro nenhum de verdade. Comum em placas Wi-Fi internas de
/// notebook; diferente de `error`, a sessão continua `running`.
/// Populated when capture has been running for >12s across channels with zero
/// received frames (typical of drivers/firmware that silently ignore monitor mode).
///
///
///
pub warning: Option<String>,
}
@@ -140,8 +140,8 @@ impl ScanTable {
Self::default()
}
/// Processa um quadro radiotap+802.11 crú. Retorna `true` se o quadro
/// continha EAPOL (mantido para chamadores antigos).
/// Ingests a raw Radiotap + 802.11 frame. Returns `true` if the frame carried
/// an EAPOL handshake message.
pub fn ingest(&mut self, raw: &[u8]) -> bool {
let now = unix_now();
self.ingest_at(raw, now).eapol
@@ -317,9 +317,9 @@ impl ScanTable {
};
if let (Some(client), Some(bssid)) = (client.clone(), bssid.clone()) {
if client != bssid {
// Calculado antes do touch_client: a TK vem de self.handshakes, e
// o borrow checker não deixa consultar isso com `c` (borrow de
// self.clients) vivo ao mesmo tempo.
// Look up any derived CCMP Temporal Key (TK) before borrowing `self.clients`.
//
//
let tk = (frame.protected && frame.to_ds && !frame.from_ds)
.then(|| self.handshakes.tk_for(&bssid, &client))
.flatten();
@@ -327,9 +327,9 @@ impl ScanTable {
c.packets += 1;
if frame.to_ds && !frame.from_ds {
if frame.protected {
// Só decifra se já quebramos a senha e vimos o handshake
// DESSE cliente — a PTK é por associação, então a senha da
// rede sozinha não abre tráfego de quem não foi capturado.
// Decrypt CCMP data frames when we have derived this station's association TK.
//
//
if let Some(plain) = tk.and_then(|tk| frame.ccmp_payload(&tk)) {
let payload = dot11::payload_info_from_llc(&plain);
apply_payload_identity(c, &payload);
@@ -339,9 +339,9 @@ impl ScanTable {
apply_payload_identity(c, &payload);
}
}
// Sempre recalcula o nome de exibição, mesmo em quadros AP→estação
// (downlink): sem isso, um cliente só visto recebendo dados nunca
// ganhava o fallback para o fabricante (OUI), ficando só com o MAC.
// Refresh `display_name` on both uplink and downlink frames so OUI vendor
// fallback is populated even for receive-only stations.
//
refresh_identity(c);
let was = c.associated;
c.bssid = Some(bssid.clone());
@@ -462,9 +462,9 @@ impl ScanTable {
}
}
}
// Já dá o fallback pro fabricante (OUI) desde o primeiro avistamento,
// antes de qualquer quadro de gerenciamento/dados chegar a chamar
// refresh_identity de novo.
// Populate `display_name` from the OUI vendor immediately on first sighting.
//
//
if c.display_name.is_none() {
refresh_identity(c);
}
@@ -507,7 +507,7 @@ impl ScanTable {
self.handshakes.get(bssid, station)
}
/// Handshakes completos (com quadros crus) para exportação.
/// Returns all tracked handshakes (including raw frames for `.pcap`/`.hc22000` export).
pub fn handshake_entries(&self) -> Vec<Handshake> {
self.handshakes.all().into_iter().cloned().collect()
}