Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
3.68k stars 511 forks source link

Multi Domain Agent Customization #6056

Open samschultzponsys opened 2 months ago

samschultzponsys commented 2 months ago

Describe the bug Multi Domain customization not fully working, the icon image,task image, and task names are not taking the customization in my config, it is reflecting the default domains customization not the specific ones.

To Reproduce Steps to reproduce the behavior:

  1. Download agent for non default domain
  2. The icon will be showing the default domains custom icon not the one specified for the specific domain

Expected behavior Custom icons and task names per the individual domain settings

Server Software (please complete the following information):

Client Device (please complete the following information):

Additional context Add any other context about the problem here.

Your config.json file Redacted sensitive information:

{
  "$schema": "https://raw.githubusercontent.com/Ylianst/MeshCentral/master/meshcentral-config-schema.json",
  "__comment1__": "This is a simple configuration file, all values and sections that start with underscore (_) are ignored. Edit a section and remove the _ in front of the name. Refer to the user's guide for details.",
  "__comment2__": "See node_modules/meshcentral/sample-config-advanced.json for a more advanced example.",
  "settings": {
    "MaxInvalidLogin": {
      "time": 5,
      "count": 5,
      "coolofftime": 30
    },
    "plugins": {
      "enabled": true
    },
    "MongoDb": "mongodb://127.0.0.1:27017/meshcentral",
    "MongoDbCol": "meshcentral",
    "dbExpire": {
     "events": 2678400,
     "powerevents": 2678400,
     "statsevents": 2678400
    },
    "cert": "redacted",
    "_WANonly": true,
    "_LANonly": true,
    "_sessionKey": "redacted",
    "maxInvalidLogin": {
      "time": 5,
      "count": 5,
      "coolofftime": 15
      },
    "_port": 443,
    "ManageCrossDomain": [
      "user//redacted",
      "user//redacted",
      "user//redacted",
      "user//redacted",
      "user//redacted"
    ],
    "_aliasPort": 443,
    "redirPort": 80,
    "_redirAliasPort": 80,
    "authlog": "auth.log"
  },
  "domains": {
    "averedacted": {
      "title": "Averedacted",
      "title2": "Mesh",
      "dns": "averedacted",
      "agentCustomization": {
        "displayname": "Averedacted",
        "description": "Averedacted",
        "companyName": "Averedacted",
        "serviceName": "Averedacted",
        "fileName": "Averedacted",
        "image": "avenueredacted.png",
        "installText": "This will install redacted remote access"
        },
     "agentFileInfo": {
        "icon": "averedacted.ico",
        "fileDescription": "AveredactedRemote Access",
        "fileversion": "1.7.0.0",
        "internalname": "Codename SpicyTuna",
        "legalcopyright": "redacted",
        "originalfilename": "-----",
        "productname": "SpicyTuna",
        "productversion": "v1.7.0.0"
        },
     "footer": "redactedd",
     "userSessionIdleTimeout": 30,
     "minify": true,
     "newAccounts": false,
     "userNameIsEmail": true,
     "twoFactorCookieDurationDays": 0,
     "passwordRequirements": {
        "min": 8,
        "max": 128,
        "upper": 1,
        "lower": 1,
        "numeric": 1,
        "nonalpha": 1,
        "oldPasswordBan": 5,
        "banCommonPasswords": true,
        "reset": 90,
        "force2factor": true
      }
},
   "leredacted": {
      "title": "Leredacted",
      "title2": "Mesh",
      "dns": "redacted",
      "agentCustomization": {
        "displayname": "redacted Remote Access",
        "description": "redacted Remote Access",
        "companyName": "redacted Remote Access",
        "serviceName": "redacted Remote Access",
        "fileName": "redactedRemote Access",
        "image": "leredactedlogo.png",
        "installText": "This will install redacted remote access"
        },
     "agentFileInfo": {
        "icon": "leredactedlogo.ico",
        "fileDescription": "redacted Remote Access",
        "fileversion": "1.7.0.0",
        "internalname": "Codename SpicyTuna",
        "legalcopyright": "redacted",
        "originalfilename": "-----",
        "productname": "SpicyTuna",
        "productversion": "v1.7.0.0"
        },
     "footer": "redacted",
     "userSessionIdleTimeout": 30,
     "minify": true,
     "newAccounts": false,
     "userNameIsEmail": true,
     "twoFactorCookieDurationDays": 0,
     "passwordRequirements": {
        "min": 8,
        "max": 128,
        "upper": 1,
        "lower": 1,
        "numeric": 1,
        "nonalpha": 1,
        "oldPasswordBan": 5,
        "banCommonPasswords": true,
        "reset": 90,
        "force2factor": true
      }
},
"ssredacted": {
      "title": "SSredacted",
      "title2": "Mesh",
      "dns": "redacted",
      "agentCustomization": {
        "displayname": "redacted Remote Access",
        "description": "redacted Remote Access",
        "companyName": "redactedRemote Access",
        "serviceName": "redactedRemote Access",
        "fileName": "redacted Remote Access",
        "image": "redactedlogo.png",
        "installText": "This will installredactedremote access"
        },
     "agentFileInfo": {
        "icon": "redactedagenticon.ico",
        "fileDescription": "redactedRemote Access",
        "fileversion": "1.7.0.0",
        "internalname": "Codename SpicyTuna",
        "legalcopyright": "redacted",
        "originalfilename": "-----",
        "productname": "SpicyTuna",
        "productversion": "v1.7.0.0"
        },
     "footer": "redacted",
     "userSessionIdleTimeout": 30,
     "minify": true,
     "newAccounts": false,
     "userNameIsEmail": true,
     "twoFactorCookieDurationDays": 0,
     "passwordRequirements": {
        "min": 8,
        "max": 128,
        "upper": 1,
        "lower": 1,
        "numeric": 1,
        "nonalpha": 1,
        "oldPasswordBan": 5,
        "banCommonPasswords": true,
        "reset": 90,
        "force2factor": true
      }
},
"jpbham": {
      "title": "JPBHAM",
      "title2": "Mesh",
      "dns": "redacted",
      "agentCustomization": {
        "displayname": "JP Remote Access",
        "description": "JP Remote Access",
        "companyName": "JP Remote Access",
        "serviceName": "JP Remote Access",
        "fileName": "JP Remote Access",
        "image": "jpmeshagentlogo.png",
        "installText": "This will install JP remote access"
        },
     "agentFileInfo": {
        "icon": "jpmeshagentlogo.ico",
        "fileDescription": "JP Remote Access",
        "fileversion": "1.7.0.0",
        "internalname": "Codename SpicyTuna",
        "legalcopyright": "redacted",
        "originalfilename": "-----",
        "productname": "SpicyTuna",
        "productversion": "v1.7.0.0"
        },
     "footer": "redacted",
     "userSessionIdleTimeout": 30,
     "minify": true,
     "newAccounts": false,
     "userNameIsEmail": true,
     "twoFactorCookieDurationDays": 0,
     "passwordRequirements": {
        "min": 8,
        "max": 128,
        "upper": 1,
        "lower": 1,
        "numeric": 1,
        "nonalpha": 1,
        "oldPasswordBan": 5,
        "banCommonPasswords": true,
        "reset": 90,
        "force2factor": true
      }
},
    "": {
      "title": "Remote Tools",
      "agentInviteCodes": true,
      "agentCustomization": {
        "displayname": "redacted",
        "description": "redacted",
        "companyName": "redacted",
        "serviceName": "redacted",
        "fileName": "redacted",
        "image": "agent-logo.png",
        "installText": "Please install this tool in order to allowredacted access to your system",
        "foregroundColor": "#74B444",
        "backgroundColor": "#FFFFFF"
        },
      "androidCustomization": {
        "title": "redacted",
        "subtitle": "Remote Management Tool",
        "image": "agent-logo.png"
        },
      "agentFileInfo": {
        "icon": "redactedtagent.ico",
        "fileDescription": "redacted Background Agent",
        "fileversion": "1.7.0.0",
        "internalname": "Codename SpicyTuna",
        "legalcopyright": redacted",
        "originalfilename": "-----",
        "productname": "SpicyTuna",
        "productversion": "v1.7.0.0"
        },
      "footer": "redacted",
      "_rootRedirect": "https://www.google.com",
      "_unknownUserRootRedirect": "https://www.google.com",
      "userSessionIdleTimeout": 30,
      "SessionRecording": {
        "filepath": "meshcentral-recordings",
        "protocols": [ 1, 2, 5, 200],
        "onlySelectedUsers": true,
        "index": true,
        "maxRecordingDays": 40,
        "maxRecordingSizeMegabytes": 10000
        },
      "title2": "redacted",
      "minify": true,
      "newAccounts": false,
      "userNameIsEmail": true,
      "agentInviteCodes": true,
      "twoFactorCookieDurationDays": 0,
      "passwordRequirements": {
        "min": 8,
        "max": 128,
        "upper": 1,
        "lower": 1,
        "numeric": 1,
        "nonalpha": 1,
        "oldPasswordBan": 5,
        "banCommonPasswords": true,
        "reset": 90,
        "force2factor": true
      }
    }
  },
  "letsencrypt": {
    "__comment__": "Requires NodeJS 8.x or better, Go to https://letsdebug.net/ first before trying Let's Encrypt.",
    "email": "redacted",
    "names": "redacted",
    "skipChallengeVerification": true,
    "production": true
  }
}
si458 commented 2 months ago

In windows, you need to clear the icon cache for the Windows Explorer AFTER you changed your icons for the exe. this happens because if you download an exe the first time time, it will cache the first ICON is has, no matter how many times you redownload the same exe after changing the icon use something like nirsoft iconsextract to check the exe has actually changed its icon correctly

samschultzponsys commented 2 months ago

I will try that utility but I am seeing this behavior on fresh computers that have never seen the agent