- ScanSerper() durchsucht Google via Serper.dev nach geleakten API-Keys - Exakte Phrase-Suche pro KeyPattern, bis zu 100 Ergebnisse pro Query - Keys aus Snippets und Titles via Regex extrahiert - Source-Feld (github/serper/gist/pastebin) in ScannedKeyRecord + DB-Migration - RunScan() kombiniert GitHub + Serper mit Deduplizierung - Service startet auch wenn nur SerperApiKey konfiguriert ist - Frontend: Source-Icons und verkürzte URLs für Nicht-GitHub-Quellen - Config: SerperApiKey in appsettings.json
19 lines
972 B
C#
19 lines
972 B
C#
namespace Gott.Models;
|
|
|
|
public class ScannedKeyRecord
|
|
{
|
|
public long Id { get; set; }
|
|
public string ScannedKeyId { get; set; }
|
|
public string ApiKey { get; set; }
|
|
public string Source { get; set; } // Herkunft: github, serper, gist, pastebin
|
|
public string SourceUrl { get; set; } // URL wo der Key gefunden wurde
|
|
public string Status { get; set; } // valid, invalid, auth_error, rate_limited, quota_exceeded, error
|
|
public string Plan { get; set; } // Pro, Max, Pro/Max, API, Unknown
|
|
public double? Usage7d { get; set; }
|
|
public double? Usage5h { get; set; }
|
|
public string ScannedAt { get; set; } // Wann gefunden
|
|
public string CheckedAt { get; set; } // Wann zuletzt geprüft
|
|
public int Deleted { get; set; } // Soft-Delete (1 = gelöscht/ignoriert)
|
|
public long? AdoptedApiKeyId { get; set; } // Verknüpfung zur api_keys.id (null = nicht übernommen)
|
|
}
|