Skip to content

Commit

Permalink
adding "host" option for mythic networking and test workflow files
Browse files Browse the repository at this point in the history
  • Loading branch information
its-a-feature committed Aug 27, 2024
1 parent f82a81d commit 65e32fc
Show file tree
Hide file tree
Showing 35 changed files with 893 additions and 436 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.3.0-rc23] - 2024-08-27

### Changed

- Added additional checks for eventing

## [3.3.0-rc22]

### Changed
Expand Down
7 changes: 7 additions & 0 deletions MythicReactUI/CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.34] - 2024-08-27

### Changed

- Updated the Eventing table to use the same table format as the callbacks table
- Added a test button for the eventing to check for some mistakes before uploading

## [0.2.33] - 2024-08-26

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const ResizableGridWrapper = ({
rowContextMenuOptions,
onRowContextMenuClick,
rowHeight,
headerRowHeight,
widthMeasureKey,
callbackTableGridRef,
onRowClick,
Expand All @@ -95,9 +96,12 @@ const ResizableGridWrapper = ({
);
const getRowHeight = useCallback(
(index) => {
if(index === 0){
return headerRowHeight;
}
return rowHeight;
},
[rowHeight]
[rowHeight, headerRowHeight]
);

useEffect(() => {
Expand Down Expand Up @@ -259,7 +263,7 @@ const ResizableGridWrapper = ({
</VariableSizeGrid>
<DraggableHandles
height={AutoSizerProps.height}
rowHeight={getRowHeight(0)}
rowHeight={headerRowHeight}
width={AutoSizerProps.width}
minColumnWidth={MIN_COLUMN_WIDTH}
columnWidths={columnWidths}
Expand All @@ -285,6 +289,7 @@ const MythicResizableGrid = ({
onRowContextMenuClick,
widthMeasureKey,
rowHeight = 20,
headerRowHeight = 20,
callbackTableGridRef,
onRowClick,
}) => {
Expand All @@ -300,6 +305,7 @@ const MythicResizableGrid = ({
items={items}
widthMeasureKey={widthMeasureKey}
rowHeight={rowHeight}
headerRowHeight={headerRowHeight}
onClickHeader={onClickHeader}
onDoubleClickRow={onDoubleClickRow}
contextMenuOptions={contextMenuOptions}
Expand Down Expand Up @@ -330,6 +336,7 @@ MythicResizableGrid.propTypes = {
contextMenuOptions: PropTypes.array,
rowContextMenuOptions: PropTypes.array,
rowHeight: PropTypes.number,
headerRowHeight: PropTypes.number,
headerNameKey: PropTypes.string,
widthMeasureKey: PropTypes.string
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,9 @@ const DisplayFileMetaData = ({fileMetaData}) => {
<TableBody>
<TableRow>
<MythicStyledTableCell><TableRowSizeCell cellData={fileMetaData.size}/></MythicStyledTableCell>
<MythicStyledTableCell>{fileMetaData.host}</MythicStyledTableCell>
<MythicStyledTableCell>{fileMetaData.filename}</MythicStyledTableCell>
<MythicStyledTableCell>{fileMetaData.full_remote_path}</MythicStyledTableCell>
<MythicStyledTableCell style={{wordBreak: "break-all"}}>{fileMetaData.host}</MythicStyledTableCell>
<MythicStyledTableCell style={{wordBreak: "break-all"}}>{fileMetaData.filename}</MythicStyledTableCell>
<MythicStyledTableCell style={{wordBreak: "break-all"}}>{fileMetaData.full_remote_path}</MythicStyledTableCell>
<MythicStyledTableCell><Link style={{wordBreak: "break-all"}}
color="textPrimary" underline="always"
target="_blank" href={"/new/task/" + fileMetaData.task_display_id}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,15 @@ export const ResponseDisplayPlaintext = (props) =>{
const me = useReactiveVar(meState);
const currentContentRef = React.useRef();
const [plaintextView, setPlaintextView] = React.useState("");
const [mode, setMode] = React.useState("html");
const initialMode = props?.initial_mode || "html";
const [mode, setMode] = React.useState(initialMode);
const [wrapText, setWrapText] = React.useState(true);
const [showOptions, setShowOptions] = React.useState(false);
const onChangeText = (data) => {
if(props.onChangeContent){
props?.onChangeContent(data);
}
}
useEffect( () => {
if(props.plaintext.length > MaxRenderSize){
snackActions.warning("Response too large (> 2MB), truncating the render. Download task output to view entire response.");
Expand Down Expand Up @@ -70,7 +76,7 @@ export const ResponseDisplayPlaintext = (props) =>{
}
const scrollContent = (node, isAppearing) => {
// only auto-scroll if you issued the task
if(props.task.operator.username === (me?.user?.username || "")){
if(props?.task?.operator?.username === (me?.user?.username || "")){
let el = document.getElementById(`taskingPanel${props.task.callback_id}`);
if(props.expand || props.displayType === "console"){
el = document.getElementById(`taskingPanelConsole${props.task.callback_id}`);
Expand Down Expand Up @@ -140,6 +146,7 @@ export const ResponseDisplayPlaintext = (props) =>{
theme={theme.palette.mode === "dark" ? "monokai" : "xcode"}
fontSize={14}
showGutter={true}
onChange={onChangeText}
//onLoad={onLoad}
highlightActiveLine={false}
showPrintMargin={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ export function EventGroupInstances({selectedEventGroup, me, setSelectedInstance
});

return (
<EventGroupInstancesTableMaterialReactTable setSelectedInstance={setSelectedInstance}
selectedInstanceID={selectedInstanceID}
eventgroups={selectedEventGroups} me={me} />
<EventGroupInstancesTableMaterialReactTable
setSelectedInstance={setSelectedInstance}
selectedInstanceID={selectedInstanceID}
eventgroups={selectedEventGroups} me={me} />
)
}
Loading

0 comments on commit 65e32fc

Please sign in to comment.