import type { ProbeShellResult } from "@/types/probeshell"; import { useTranslation } from "react-i18next"; import { QuickUsage } from "@/components/probeshell/quick-usage"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import CodeViewer from "../code-viewer"; import { MultiPackResult } from "../memshell/results/multi-packer"; import { BasicInfo } from "./basic-info"; export default function ShellResult({ packResult, allPackResults, packMethod, generateResult, }: Readonly<{ packResult: string | undefined; allPackResults: Map | undefined; packMethod: string; generateResult?: ProbeShellResult; }>) { const { t } = useTranslation(); if (!generateResult) { return ; } const showCode = packMethod === "JSP"; const height = 600; return ( {t("common:generateResult")} {allPackResults && ( )} {packResult && ( {t("common:packerMethod")}:{packMethod} ({packResult?.length}) } wrapLongLines={!showCode} showLineNumbers={showCode} language={showCode ? "java" : "text"} height={height} /> )} ); }