Skip to content

Commit 963f5a7

Browse files
author
kali
committed
Beacons, Listeners & Modules Config
1 parent 46652a0 commit 963f5a7

File tree

3 files changed

+51
-83
lines changed

3 files changed

+51
-83
lines changed

teamServer/teamServer/TeamServer.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,18 +1154,18 @@ grpc::Status TeamServer::SendTermCmd(grpc::ServerContext* context, const teamser
11541154
{
11551155
json configHttp = m_config["ListenerHttpConfig"];
11561156

1157-
auto it = configHttp[0].find("uriFileDownload");
1158-
if(it != configHttp[0].end())
1159-
uriFileDownload = configHttp[0]["uriFileDownload"].get<std::string>();
1157+
auto it = configHttp.find("uriFileDownload");
1158+
if(it != configHttp.end())
1159+
uriFileDownload = configHttp["uriFileDownload"].get<std::string>();
11601160

11611161
}
11621162
else if (type == ListenerHttpsType)
11631163
{
11641164
json configHttps = m_config["ListenerHttpsConfig"];
11651165

1166-
auto it = configHttps[0].find("uriFileDownload");
1167-
if(it != configHttps[0].end())
1168-
uriFileDownload = configHttps[0]["uriFileDownload"].get<std::string>();;
1166+
auto it = configHttps.find("uriFileDownload");
1167+
if(it != configHttps.end())
1168+
uriFileDownload = configHttps["uriFileDownload"].get<std::string>();;
11691169
}
11701170

11711171
std::string result=type;
@@ -1300,18 +1300,18 @@ grpc::Status TeamServer::SendTermCmd(grpc::ServerContext* context, const teamser
13001300
{
13011301
json configHttp = m_config["ListenerHttpConfig"];
13021302

1303-
auto it = configHttp[0].find("downloadFolder");
1304-
if(it != configHttp[0].end())
1305-
downloadFolder = configHttp[0]["downloadFolder"].get<std::string>();;
1303+
auto it = configHttp.find("downloadFolder");
1304+
if(it != configHttp.end())
1305+
downloadFolder = configHttp["downloadFolder"].get<std::string>();;
13061306

13071307
}
13081308
else if (type == ListenerHttpsType)
13091309
{
13101310
json configHttps = m_config["ListenerHttpsConfig"];
13111311

1312-
auto it = configHttps[0].find("downloadFolder");
1313-
if(it != configHttps[0].end())
1314-
downloadFolder = configHttps[0]["downloadFolder"].get<std::string>();;
1312+
auto it = configHttps.find("downloadFolder");
1313+
if(it != configHttps.end())
1314+
downloadFolder = configHttps["downloadFolder"].get<std::string>();;
13151315
}
13161316
}
13171317
catch(...)

teamServer/teamServer/TeamServerConfig.json

Lines changed: 38 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -18,76 +18,44 @@
1818
"ServKeyFile": "server.key",
1919
"RootCA": "rootCA.crt",
2020
"xorKey": "dfsdgferhzdzxczevre5595485sdg",
21-
"ListenerHttpConfig": [
22-
{
23-
"uri": [
24-
"/MicrosoftUpdate/ShellEx/KB242742/default.aspx",
25-
"/MicrosoftUpdate/ShellEx/KB242742/admin.aspx",
26-
"/MicrosoftUpdate/ShellEx/KB242742/download.aspx"
27-
],
28-
"uriFileDownload": "/images/commun/1.084.4584/serv/",
29-
"downloadFolder": "../www",
30-
"server": [
31-
{
32-
"headers": [
33-
{
34-
"Access-Control-Allow-Origin": "true"
35-
},
36-
{
37-
"Connection": "Keep-Alive"
38-
},
39-
{
40-
"Content-Type": "application/json"
41-
},
42-
{
43-
"Server": "Server"
44-
},
45-
{
46-
"Strict-Transport-Security": "max-age=47474747; includeSubDomains; preload"
47-
},
48-
{
49-
"Vary": "Origin,Content-Type,Accept-Encoding,User-Agent"
50-
}
51-
]
52-
}
53-
]
21+
"ListenerHttpConfig": {
22+
"uri": [
23+
"/MicrosoftUpdate/ShellEx/KB242742/default.aspx",
24+
"/MicrosoftUpdate/ShellEx/KB242742/admin.aspx",
25+
"/MicrosoftUpdate/ShellEx/KB242742/download.aspx"
26+
],
27+
"uriFileDownload": "/images/commun/1.084.4584/serv/",
28+
"downloadFolder": "../www",
29+
"server": {
30+
"headers": {
31+
"Access-Control-Allow-Origin": "true",
32+
"Connection": "Keep-Alive",
33+
"Content-Type": "application/json",
34+
"Server": "Server",
35+
"Strict-Transport-Security": "max-age=47474747; includeSubDomains; preload",
36+
"Vary": "Origin,Content-Type,Accept-Encoding,User-Agent"
37+
}
5438
}
55-
],
56-
"ListenerHttpsConfig": [
57-
{
58-
"ServHttpsListenerCrtFile": "localhost.crt",
59-
"ServHttpsListenerKeyFile": "localhost.key",
60-
"uri": [
61-
"/MicrosoftUpdate/ShellEx/KB242742/default.aspx",
62-
"/MicrosoftUpdate/ShellEx/KB242742/upload.aspx",
63-
"/MicrosoftUpdate/ShellEx/KB242742/config.aspx"
64-
],
65-
"uriFileDownload": "/images/commun/1.084.4584/serv/",
66-
"downloadFolder": "../www",
67-
"server": [
68-
{
69-
"headers": [
70-
{
71-
"Access-Control-Allow-Origin": "true"
72-
},
73-
{
74-
"Connection": "Keep-Alive"
75-
},
76-
{
77-
"Content-Type": "application/json"
78-
},
79-
{
80-
"Server": "Server"
81-
},
82-
{
83-
"Strict-Transport-Security": "max-age=47474747; includeSubDomains; preload"
84-
},
85-
{
86-
"Vary": "Origin,Content-Type,Accept-Encoding,User-Agent"
87-
}
88-
]
89-
}
90-
]
39+
},
40+
"ListenerHttpsConfig": {
41+
"ServHttpsListenerCrtFile": "localhost.crt",
42+
"ServHttpsListenerKeyFile": "localhost.key",
43+
"uri": [
44+
"/MicrosoftUpdate/ShellEx/KB242742/default.aspx",
45+
"/MicrosoftUpdate/ShellEx/KB242742/upload.aspx",
46+
"/MicrosoftUpdate/ShellEx/KB242742/config.aspx"
47+
],
48+
"uriFileDownload": "/images/commun/1.084.4584/serv/",
49+
"downloadFolder": "../www",
50+
"server": {
51+
"headers": {
52+
"Access-Control-Allow-Origin": "true",
53+
"Connection": "Keep-Alive",
54+
"Content-Type": "application/json",
55+
"Server": "Server",
56+
"Strict-Transport-Security": "max-age=47474747; includeSubDomains; preload",
57+
"Vary": "Origin,Content-Type,Accept-Encoding,User-Agent"
58+
}
9159
}
92-
]
60+
}
9361
}

0 commit comments

Comments
 (0)