diff --git a/web/src/components/packets/AdminMessagePacket.tsx b/web/src/components/packets/AdminMessagePacket.tsx new file mode 100644 index 0000000..391ea35 --- /dev/null +++ b/web/src/components/packets/AdminMessagePacket.tsx @@ -0,0 +1,41 @@ +import React from "react"; +import { Packet } from "../../lib/types"; +import { Shield } from "lucide-react"; +import { PacketCard } from "./PacketCard"; + +interface AdminMessagePacketProps { + packet: Packet; +} + +export const AdminMessagePacket: React.FC = ({ packet }) => { + return ( + } + iconBgColor="bg-orange-500" + label="Admin Message" + > +
+
+ + This message was an encrypted remote administration command +
+ +
+ Remote administration commands are encrypted using PKI and can only be decrypted by the authorized target device. +
+ + {packet.data.binaryData && ( +
+ + Show encrypted data + +
+ {packet.data.binaryData} +
+
+ )} +
+
+ ); +}; \ No newline at end of file diff --git a/web/src/components/packets/PacketRenderer.tsx b/web/src/components/packets/PacketRenderer.tsx index a5fa63d..6a06d9b 100644 --- a/web/src/components/packets/PacketRenderer.tsx +++ b/web/src/components/packets/PacketRenderer.tsx @@ -10,6 +10,7 @@ import { MapReportPacket } from "./MapReportPacket"; import { TraceroutePacket } from "./TraceroutePacket"; import { NeighborInfoPacket } from "./NeighborInfoPacket"; import { PrivateMessagePacket } from "./PrivateMessagePacket"; +import { AdminMessagePacket } from "./AdminMessagePacket"; import { GenericPacket } from "./GenericPacket"; interface PacketRendererProps { @@ -22,6 +23,10 @@ export const PacketRenderer: React.FC = ({ packet }) => { // If there's a decode error, check the error type if (data.decodeError) { if (data.decodeError.startsWith('PRIVATE_CHANNEL:')) { + // Check if this is a PKI admin message + if (packet.info.channel === 'PKI' || packet.info.channel === 'pki') { + return ; + } return ; } return ;