Skip to content

Commit

Permalink
fixing UI colors in light mode
Browse files Browse the repository at this point in the history
  • Loading branch information
its-a-feature committed Aug 27, 2024
1 parent f03e694 commit ac76b00
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 215 deletions.
6 changes: 6 additions & 0 deletions MythicReactUI/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).

## [0.2.33] - 2024-08-26

### Changed

- Updated the dropdown for actions in browser scripts to look better in light mode

## [0.2.32] - 2024-08-23

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {MythicStyledTooltip} from '../../MythicComponents/MythicStyledTooltip';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import MythicResizableGrid from '../../MythicComponents/MythicResizableGrid';
import {faList, faTrashAlt, faSkullCrossbones, faCamera, faSyringe, faFolder, faFolderOpen, faFileArchive, faCog, faFileWord, faFileExcel, faFilePowerpoint, faFilePdf, faDatabase, faKey, faFileCode, faDownload, faUpload, faFileImage, faCopy, faBoxOpen, faFileAlt } from '@fortawesome/free-solid-svg-icons';
import {Dropdown, DropdownMenuItem} from "../../MythicComponents/MythicNestedMenus";

const onCopyToClipboard = (data) => {
let result = copyStringToClipboard(data);
Expand Down Expand Up @@ -364,35 +365,27 @@ const ResponseDisplayTableActionCell = ({cellData, callback_id, rowData}) => {
startIcon={cellData?.button?.startIcon ? <FontAwesomeIcon icon={getIconName(cellData?.button?.startIcon)} style={{color: cellData?.button?.startIconColor || ""}}/> : null}
style={{...actionCellButtonStyle}}
>{cellData?.button?.name || " "}</Button>
<Popper open={openDropdownButton} anchorEl={dropdownAnchorRef.current} role={undefined} transition style={{zIndex: 4}}>
{({ TransitionProps, placement }) => (
<Grow
{...TransitionProps}
style={{
transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom',
}}
>
<Paper style={{backgroundColor: theme.palette.mode === 'dark' ? theme.palette.primary.dark : theme.palette.primary.light, color: "white"}}>
<ClickAwayListener onClickAway={handleClose}>
<MenuList id="split-button-menu" >
{cellData.button.value.map((option, index) => (
<MenuItem
<ClickAwayListener onClickAway={handleClose} mouseEvent={"onMouseDown"}>
<Dropdown
isOpen={dropdownAnchorRef.current}
onOpen={setOpenDropdownButton}
externallyOpen={openDropdownButton}
menu={
cellData.button.value.map((option, index) => (
<DropdownMenuItem
key={option.name + index}
disabled={option.disabled}
onClick={(event) => handleMenuItemClick(event, index)}
>
<MythicStyledTooltip title={option?.hoverText || (option.type === "task" ? "Task an Agent" : "Display Data")}>
{option?.startIcon ? <FontAwesomeIcon icon={getIconName(option?.startIcon)} style={{color: option?.startIconColor || "", marginRight: "5px"}}/> : null}
{option.name}
</MythicStyledTooltip>
</MenuItem>
))}
</MenuList>
</ClickAwayListener>
</Paper>
</Grow>
)}
</Popper>
>
<MythicStyledTooltip title={option?.hoverText || (option.type === "task" ? "Task an Agent" : "Display Data")}>
{option?.startIcon ? <FontAwesomeIcon icon={getIconName(option?.startIcon)} style={{color: option?.startIconColor || "", marginRight: "5px"}}/> : null}
{option.name}
</MythicStyledTooltip>
</DropdownMenuItem>
))
}
/>
</ClickAwayListener>
</React.Fragment>
)
}
Expand Down
2 changes: 1 addition & 1 deletion MythicReactUI/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {snackActions} from './components/utilities/Snackbar';
import jwt_decode from 'jwt-decode';
import {meState} from './cache';

export const mythicUIVersion = "0.2.32";
export const mythicUIVersion = "0.2.33";

let fetchingNewToken = false;

Expand Down
14 changes: 7 additions & 7 deletions Mythic_CLI/src/cmd/config/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func setMythicConfigDefaultValues() {
mythicEnv.SetDefault("mythic_server_bind_localhost_only", true)
mythicEnvInfo["mythic_server_bind_localhost_only"] = `This specifies if the mythic_server container will expose the mythic_server_port and mythic_server_grpc_port on 0.0.0.0 or 127.0.0.1. If you have a remote agent container connecting to Mythic, you MUST set this to false so that the remote agent container can do file transfers with Mythic.`

mythicEnv.SetDefault("mythic_server_cpus", "2")
mythicEnv.SetDefault("mythic_server_cpus", defaultNumberOfCPUs)
mythicEnvInfo["mythic_server_cpus"] = `Set this to limit the maximum number of CPUs this service is able to consume`

mythicEnv.SetDefault("mythic_server_mem_limit", "")
Expand All @@ -211,7 +211,7 @@ func setMythicConfigDefaultValues() {
mythicEnv.SetDefault("mythic_server_use_build_context", false)
mythicEnvInfo["mythic_server_use_build_context"] = `The mythic_server container by default pulls configuration from a pre-compiled Docker image hosted on GitHub's Container Registry (ghcr.io). Setting this to "true" means that the local Mythic/mythic-docker/Dockerfile is used to generate the image used for the mythic_server container instead of the hosted image. If you want to modify the local mythic_server code then you need to set this to true and uncomment the sections of the mythic-docker/Dockerfile that copy over the existing code and build it. If you don't do this then you won't see any of your changes take effect`

mythicEnv.SetDefault("mythic_sync_cpus", "2")
mythicEnv.SetDefault("mythic_sync_cpus", defaultNumberOfCPUs)
mythicEnvInfo["mythic_sync_cpus"] = `Set this to limit the maximum number of CPUs this service is able to consume`

mythicEnv.SetDefault("mythic_sync_mem_limit", "")
Expand All @@ -221,7 +221,7 @@ func setMythicConfigDefaultValues() {
mythicEnvInfo["mythic_server_allow_invite_links"] = `This configures whether or not admins are allowed to create one-time-use invite links for users to join the server and register their own username/password combinations. They still need to be assigned to operations.'`

mythicEnv.SetDefault("mythic_server_docker_networking", "bridge")
mythicEnvInfo["mythic_server_docker_networking"] = `Configure how the mythic_server container is networked - the default is 'bridge' which means that ports must be explicitly exposed via mythic_server_dynamic_ports. The other option, 'host', means that the server will share networking with the host and not need explicit ports exposed. Either way, MYTHIC_SERVER_DYNAMIC_PORTS_BIND_LOCALHOST_ONLY and MYTHIC_SERVER_BIND_LOCALHOST_ONLY still determine if ports are bound to 0.0.0.0 or 127.0.0.1. If setting this to 'host', make sure you update the 'MYTHIC_SERVER_HOST' option as well to be the IP of the host machine. The containers will default to using localhost which won't work when the mythic_server is set to host networking.`
mythicEnvInfo["mythic_server_docker_networking"] = `Configure how the mythic_server container is networked - the default is 'bridge' which means that ports must be explicitly exposed via mythic_server_dynamic_ports. The other option, 'host', means that the server will share networking with the host and not need explicit ports exposed. Either way, MYTHIC_SERVER_DYNAMIC_PORTS_BIND_LOCALHOST_ONLY and MYTHIC_SERVER_BIND_LOCALHOST_ONLY still determine if ports are bound to 0.0.0.0 or 127.0.0.1. If setting this to 'host', make sure you update the 'MYTHIC_SERVER_HOST' option as well to be the IP of the host machine (not localhost) and then restart Mythic to get the changes applied to docker compose. The containers will default to using localhost which won't work when the mythic_server is set to host networking.`

// postgres configuration ---------------------------------------------
mythicEnv.SetDefault("postgres_host", "mythic_postgres")
Expand All @@ -242,7 +242,7 @@ func setMythicConfigDefaultValues() {
mythicEnv.SetDefault("postgres_password", utils.GenerateRandomPassword(30))
mythicEnvInfo["postgres_password"] = `This is the randomly generated password that mythic_server and mythic_graphql use to connect to the mythic_postgres container`

mythicEnv.SetDefault("postgres_cpus", "2")
mythicEnv.SetDefault("postgres_cpus", defaultNumberOfCPUs)
mythicEnvInfo["postgres_cpus"] = `Set this to limit the maximum number of CPUs this service is able to consume`

mythicEnv.SetDefault("postgres_mem_limit", "")
Expand Down Expand Up @@ -271,7 +271,7 @@ func setMythicConfigDefaultValues() {
mythicEnvInfo["rabbitmq_password"] = `This is the randomly generated password that all containers use to connect to RabbitMQ queues`
mythicEnv.SetDefault("rabbitmq_vhost", "mythic_vhost")

mythicEnv.SetDefault("rabbitmq_cpus", "2")
mythicEnv.SetDefault("rabbitmq_cpus", defaultNumberOfCPUs)
mythicEnvInfo["rabbitmq_cpus"] = `Set this to limit the maximum number of CPUs this service is able to consume`

mythicEnv.SetDefault("rabbitmq_mem_limit", "")
Expand Down Expand Up @@ -300,7 +300,7 @@ func setMythicConfigDefaultValues() {
mythicEnv.SetDefault("hasura_secret", utils.GenerateRandomPassword(30))
mythicEnvInfo["hasura_secret"] = `This is the randomly generated password you can use to connect to Hasura through the /console route through the nginx proxy`

mythicEnv.SetDefault("hasura_cpus", "2")
mythicEnv.SetDefault("hasura_cpus", defaultNumberOfCPUs)
mythicEnvInfo["hasura_cpus"] = `Set this to limit the maximum number of CPUs this service is able to consume`

mythicEnv.SetDefault("hasura_mem_limit", "2gb")
Expand Down Expand Up @@ -348,7 +348,7 @@ func setMythicConfigDefaultValues() {
mythicEnv.SetDefault("jupyter_token", utils.GenerateRandomPassword(30))
mythicEnvInfo["jupyter_token"] = `This value is used to authenticate to the Jupyter instance via the /jupyter route in the React UI`

mythicEnv.SetDefault("jupyter_cpus", "2")
mythicEnv.SetDefault("jupyter_cpus", defaultNumberOfCPUs)
mythicEnvInfo["jupyter_cpus"] = `Set this to limit the maximum number of CPUs this service is able to consume`

mythicEnv.SetDefault("jupyter_mem_limit", "")
Expand Down
6 changes: 3 additions & 3 deletions mythic-react-docker/mythic/public/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"files": {
"main.css": "/new/static/css/main.7e143bf2.css",
"main.js": "/new/static/js/main.1f9bdbc3.js",
"main.js": "/new/static/js/main.03d10eb9.js",
"static/media/mythic-red.png": "/new/static/media/mythic-red.203468a4e5240d239aa0.png",
"static/media/mythic_red_small.svg": "/new/static/media/mythic_red_small.793b41cc7135cdede246661ec232976b.svg",
"index.html": "/new/index.html",
"main.7e143bf2.css.map": "/new/static/css/main.7e143bf2.css.map",
"main.1f9bdbc3.js.map": "/new/static/js/main.1f9bdbc3.js.map"
"main.03d10eb9.js.map": "/new/static/js/main.03d10eb9.js.map"
},
"entrypoints": [
"static/css/main.7e143bf2.css",
"static/js/main.1f9bdbc3.js"
"static/js/main.03d10eb9.js"
]
}
2 changes: 1 addition & 1 deletion mythic-react-docker/mythic/public/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/new/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><link rel="apple-touch-icon" href="/new/logo192.png"/><link rel="manifest" href="/new/manifest.json"/><title>Mythic</title><script defer="defer" src="/new/static/js/main.1f9bdbc3.js"></script><link href="/new/static/css/main.7e143bf2.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/new/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><link rel="apple-touch-icon" href="/new/logo192.png"/><link rel="manifest" href="/new/manifest.json"/><title>Mythic</title><script defer="defer" src="/new/static/js/main.03d10eb9.js"></script><link href="/new/static/css/main.7e143bf2.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions mythic-react-docker/mythic/public/static/js/main.1c35bcba.js

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit ac76b00

Please sign in to comment.