Sessione salvata cifrata, copiata a «Ho finito» (#36, S4)
verifica / controlli (push) Successful in 22s
verifica / prove (push) Successful in 16m46s
verifica / installatore (push) Successful in 4m43s
verifica / immagine (push) Successful in 21m2s

Il client del sito ha bisogno della sessione del browser di Febe: ora la copia
c'è, cifrata e dietro un interruttore, senza cambiare nulla di predefinito.

- Opzione «raccolta» (pagine predefinita, richieste): solo con «richieste» e
  almeno un'operazione configurata si costruiscono sessione salvata, client del
  sito e copia. Con Instagram nulla cambia: le dieci operazioni restano non
  configurate (mancano __spin_*, __req, __s, __dyn, __csr e altri).
- Cookie con dominio, percorso, solo-host, Secure, HttpOnly e scadenza, mandati
  solo dove il browser li manderebbe (RFC 6265).
- Sezione «page» del catalogo: dove la pagina tiene ogni valore; nuovi campi rev,
  hs, hsi, dpr, ccg, comet_req, entry_nonce. Il caricatore rifiuta
  un'operazione configurata con un valore di sessione senza fonte nella pagina.
- Dati/sessione/sessione.json: DPAPI su Windows, AES-256-GCM in Docker (chiave
  da FEBE_CHIAVE_SESSIONE o chiave.bin), scrittura atomica, file illeggibile =
  nessuna sessione. «Scollega» la cancella; chiave.bin resta.
- Copia a «Ho finito» con Network.getCookies e una sola Runtime.evaluate in sola
  lettura, solo da una pagina del sito e finché dura il permesso di guida.
- FEBE_PASSWORD e FEBE_CHIAVE_SESSIONE non passano a Chromium, Xvfb, ffmpeg.
- Sito di prova: csrftoken, cookie limitato a /api/, registro di moduli suo.
- Revisione su tre lenti: 11 punti confermati, tutti corretti.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-17 16:43:43 +01:00
1 parent 3046b2da47
commit c87768766c
69 files changed
+5936 -415

No files matched your search

@@ -452,6 +452,7 @@ public sealed class HttpSiteRequesterTests
var secrets = new List<string>
{
Csrf, OtherCookie, SiteControl.InitialSession, "rinnovata-1", "claim-prova-1", TestSite.AppId, TestSite.Lsd, TestSite.Dtsg, AccountId,
TestSite.Revision, TestSite.HasteSession, TestSite.HasteSessionId, TestSite.ConnectionClass, TestSite.EntryNonce,
TestSite.DocIds[TestSite.ProfileQuery], UserAgent, "Mozilla", "marta.prova", "luca.prova", "c12", "127.0.0.1", "scheda", "primi", "accesso", "next",
};
secrets.AddRange(cases.Values.SelectMany(c => c.Values.Values));
@@ -464,7 +465,7 @@ public sealed class HttpSiteRequesterTests
}
}
private static Dictionary<string, (Dictionary<string, string> Values, string PagePath)> Cases(TestSite site)
internal static Dictionary<string, (Dictionary<string, string> Values, string PagePath)> Cases(TestSite site)
{
string code;
string highlight;
@@ -524,7 +525,7 @@ public sealed class HttpSiteRequesterTests
private static SiteRequest Profile() => SiteRequest.For("profilo", (CaseValues.Username, "marta.prova"));
private static SiteRequest Graph() => SiteRequest.For(TestSite.ProfileQuery, (CaseValues.Username, "marta.prova"));
internal static SiteRequest Graph() => SiteRequest.For(TestSite.ProfileQuery, (CaseValues.Username, "marta.prova"));
private static SiteOperation Operation(string name) => Catalog.Operations.Single(o => o.Name == name);
@@ -542,25 +543,39 @@ public sealed class HttpSiteRequesterTests
/// <summary>The saved session of a test: the cookies, tokens and doc_id the pages of the test site hand out.</summary>
internal static SiteSessionValues Values(string? session = SiteControl.InitialSession, string? csrf = Csrf, string appId = TestSite.AppId, bool docIds = true)
{
var cookies = new List<KeyValuePair<string, string>>();
// Host-only cookies of the test site's host, path «/», as its pages set them.
var cookies = new List<SiteCookie>();
if (csrf is not null)
{
cookies.Add(new(TestSite.CsrfCookie, csrf));
cookies.Add(SiteCookie.ForHost(TestSite.CsrfCookie, csrf, "127.0.0.1"));
}
if (session is not null)
{
cookies.Add(new(TestSite.SessionCookie, session));
cookies.Add(SiteCookie.ForHost(TestSite.SessionCookie, session, "127.0.0.1"));
}
cookies.Add(new("altro", OtherCookie));
return new SiteSessionValues(
cookies,
UserAgent,
new Dictionary<string, string> { ["app_id"] = appId, ["lsd"] = TestSite.Lsd, ["fb_dtsg"] = TestSite.Dtsg, ["claim"] = "0", ["account_id"] = AccountId },
docIds ? TestSite.DocIds : null);
cookies.Add(SiteCookie.ForHost("altro", OtherCookie, "127.0.0.1"));
return new SiteSessionValues(cookies, UserAgent, PageValues(appId), docIds ? TestSite.DocIds : null);
}
/// <summary>The values the pages of the test site hold (the «page» section of richieste.prova.json), and the claim.</summary>
internal static Dictionary<string, string> PageValues(string appId = TestSite.AppId) => new()
{
["app_id"] = appId,
["lsd"] = TestSite.Lsd,
["fb_dtsg"] = TestSite.Dtsg,
["claim"] = "0",
["account_id"] = AccountId,
["rev"] = TestSite.Revision,
["hs"] = TestSite.HasteSession,
["hsi"] = TestSite.HasteSessionId,
["dpr"] = TestSite.Dpr,
["comet_req"] = TestSite.CometReq,
["ccg"] = TestSite.ConnectionClass,
["entry_nonce"] = TestSite.EntryNonce,
};
/// <summary>A site client for the test site with its session, clock and log.</summary>
private sealed class Bed : IDisposable
{