Repository navigation
Expand file tree
/
Copy pathNetworkEvent.swift
More file actions
52 lines (46 loc) · 1.44 KB
/
Copy pathNetworkEvent.swift
File metadata and controls
52 lines (46 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// NetworkEvent.swift
// RECON-GO
//
// Created by M1N0-H1DDEN on 06.12.2025.
//
// NetworkMonitorView.swift (preview / simulated)
import SwiftUI
struct NetworkEvent: Identifiable {
let id = UUID()
let time: Date
let app: String
let remote: String
let risk: String
let reason: String
}
struct NetworkMonitorView: View {
@State private var events: [NetworkEvent] = [
NetworkEvent(time: Date(), app: "chrome", remote: "93.184.216.34:443", risk: "low", reason: "web browsing")
]
var body: some View {
VStack {
List(events) { e in
HStack {
VStack(alignment: .leading) {
Text(e.app).bold()
Text(e.remote).font(.caption)
}
Spacer()
VStack(alignment: .trailing) {
Text(e.risk.uppercased())
.foregroundColor(e.risk == "high" ? .red : .green)
Text(e.reason).font(.caption2)
}
}
}
.listStyle(.plain)
Button("Simulate suspicious") {
let ev = NetworkEvent(time: Date(), app: "unknown_updater", remote: "203.0.113.77:443", risk: "high", reason: "suspicious telemetry")
events.insert(ev, at: 0)
}
}
.padding()
.frame(minWidth: 420, minHeight: 320)
}
}