Skip to content

Commit ac76b00

Browse files
committed
fixing UI colors in light mode
1 parent f03e694 commit ac76b00

File tree

12 files changed

+41
-215
lines changed

12 files changed

+41
-215
lines changed

MythicReactUI/CHANGELOG.MD

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.2.33] - 2024-08-26
8+
9+
### Changed
10+
11+
- Updated the dropdown for actions in browser scripts to look better in light mode
12+
713
## [0.2.32] - 2024-08-23
814

915
### Changed

MythicReactUI/src/components/pages/Callbacks/ResponseDisplayTable.js

+19-26
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {MythicStyledTooltip} from '../../MythicComponents/MythicStyledTooltip';
2020
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
2121
import MythicResizableGrid from '../../MythicComponents/MythicResizableGrid';
2222
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';
23+
import {Dropdown, DropdownMenuItem} from "../../MythicComponents/MythicNestedMenus";
2324

2425
const onCopyToClipboard = (data) => {
2526
let result = copyStringToClipboard(data);
@@ -364,35 +365,27 @@ const ResponseDisplayTableActionCell = ({cellData, callback_id, rowData}) => {
364365
startIcon={cellData?.button?.startIcon ? <FontAwesomeIcon icon={getIconName(cellData?.button?.startIcon)} style={{color: cellData?.button?.startIconColor || ""}}/> : null}
365366
style={{...actionCellButtonStyle}}
366367
>{cellData?.button?.name || " "}</Button>
367-
<Popper open={openDropdownButton} anchorEl={dropdownAnchorRef.current} role={undefined} transition style={{zIndex: 4}}>
368-
{({ TransitionProps, placement }) => (
369-
<Grow
370-
{...TransitionProps}
371-
style={{
372-
transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom',
373-
}}
374-
>
375-
<Paper style={{backgroundColor: theme.palette.mode === 'dark' ? theme.palette.primary.dark : theme.palette.primary.light, color: "white"}}>
376-
<ClickAwayListener onClickAway={handleClose}>
377-
<MenuList id="split-button-menu" >
378-
{cellData.button.value.map((option, index) => (
379-
<MenuItem
368+
<ClickAwayListener onClickAway={handleClose} mouseEvent={"onMouseDown"}>
369+
<Dropdown
370+
isOpen={dropdownAnchorRef.current}
371+
onOpen={setOpenDropdownButton}
372+
externallyOpen={openDropdownButton}
373+
menu={
374+
cellData.button.value.map((option, index) => (
375+
<DropdownMenuItem
380376
key={option.name + index}
381377
disabled={option.disabled}
382378
onClick={(event) => handleMenuItemClick(event, index)}
383-
>
384-
<MythicStyledTooltip title={option?.hoverText || (option.type === "task" ? "Task an Agent" : "Display Data")}>
385-
{option?.startIcon ? <FontAwesomeIcon icon={getIconName(option?.startIcon)} style={{color: option?.startIconColor || "", marginRight: "5px"}}/> : null}
386-
{option.name}
387-
</MythicStyledTooltip>
388-
</MenuItem>
389-
))}
390-
</MenuList>
391-
</ClickAwayListener>
392-
</Paper>
393-
</Grow>
394-
)}
395-
</Popper>
379+
>
380+
<MythicStyledTooltip title={option?.hoverText || (option.type === "task" ? "Task an Agent" : "Display Data")}>
381+
{option?.startIcon ? <FontAwesomeIcon icon={getIconName(option?.startIcon)} style={{color: option?.startIconColor || "", marginRight: "5px"}}/> : null}
382+
{option.name}
383+
</MythicStyledTooltip>
384+
</DropdownMenuItem>
385+
))
386+
}
387+
/>
388+
</ClickAwayListener>
396389
</React.Fragment>
397390
)
398391
}

MythicReactUI/src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {snackActions} from './components/utilities/Snackbar';
1414
import jwt_decode from 'jwt-decode';
1515
import {meState} from './cache';
1616

17-
export const mythicUIVersion = "0.2.32";
17+
export const mythicUIVersion = "0.2.33";
1818

1919
let fetchingNewToken = false;
2020

Mythic_CLI/src/cmd/config/env.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ func setMythicConfigDefaultValues() {
193193
mythicEnv.SetDefault("mythic_server_bind_localhost_only", true)
194194
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.`
195195

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

199199
mythicEnv.SetDefault("mythic_server_mem_limit", "")
@@ -211,7 +211,7 @@ func setMythicConfigDefaultValues() {
211211
mythicEnv.SetDefault("mythic_server_use_build_context", false)
212212
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`
213213

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

217217
mythicEnv.SetDefault("mythic_sync_mem_limit", "")
@@ -221,7 +221,7 @@ func setMythicConfigDefaultValues() {
221221
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.'`
222222

223223
mythicEnv.SetDefault("mythic_server_docker_networking", "bridge")
224-
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.`
224+
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.`
225225

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

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

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

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

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

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

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

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

354354
mythicEnv.SetDefault("jupyter_mem_limit", "")
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"files": {
33
"main.css": "/new/static/css/main.7e143bf2.css",
4-
"main.js": "/new/static/js/main.1f9bdbc3.js",
4+
"main.js": "/new/static/js/main.03d10eb9.js",
55
"static/media/mythic-red.png": "/new/static/media/mythic-red.203468a4e5240d239aa0.png",
66
"static/media/mythic_red_small.svg": "/new/static/media/mythic_red_small.793b41cc7135cdede246661ec232976b.svg",
77
"index.html": "/new/index.html",
88
"main.7e143bf2.css.map": "/new/static/css/main.7e143bf2.css.map",
9-
"main.1f9bdbc3.js.map": "/new/static/js/main.1f9bdbc3.js.map"
9+
"main.03d10eb9.js.map": "/new/static/js/main.03d10eb9.js.map"
1010
},
1111
"entrypoints": [
1212
"static/css/main.7e143bf2.css",
13-
"static/js/main.1f9bdbc3.js"
13+
"static/js/main.03d10eb9.js"
1414
]
1515
}
Original file line numberDiff line numberDiff line change
@@ -1 +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>
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.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>

mythic-react-docker/mythic/public/static/js/main.1f9bdbc3.js mythic-react-docker/mythic/public/static/js/main.03d10eb9.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mythic-react-docker/mythic/public/static/js/main.1c35bcba.js.map mythic-react-docker/mythic/public/static/js/main.03d10eb9.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mythic-react-docker/mythic/public/static/js/main.1c35bcba.js

-3
This file was deleted.

mythic-react-docker/mythic/public/static/js/main.1f9bdbc3.js.LICENSE.txt

-169
This file was deleted.

mythic-react-docker/mythic/public/static/js/main.1f9bdbc3.js.map

-1
This file was deleted.

0 commit comments

Comments
 (0)