Skip to content

Commit 3d6dc28

Browse files
author
kali
committed
Minor
1 parent 7a6f125 commit 3d6dc28

File tree

3 files changed

+60
-5
lines changed

3 files changed

+60
-5
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Change Log
2+
All notable changes to this project will be documented in this file.
3+
4+
## [0.5.0] - 2024-12-01
5+
6+
First change log entry
7+
8+
### Added
9+
10+
- Graph tab in the client with the simplest visualisation
11+
- 2 new modules, KeyLogger and ScreenShot for windows
12+
- Batcave
13+
14+
### Changed
15+
16+
- TCP communication in windows and linux for both beacon and listener
17+
18+
### Fixed
19+

client/SessionPanel.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,20 @@ def getSessions(self):
146146
inStore=True
147147
sessionStore.lastProofOfLife=session.lastProofOfLife
148148
sessionStore.listenerHash=session.listenerHash
149-
sessionStore.killed=session.killed
149+
if session.hostname:
150+
sessionStore.hostname=session.hostname
151+
if session.username:
152+
sessionStore.username=session.username
153+
if session.arch:
154+
sessionStore.arch=session.arch
155+
if session.privilege:
156+
sessionStore.privilege=session.privilege
157+
if session.os:
158+
sessionStore.os=session.os
159+
if session.lastProofOfLife:
160+
sessionStore.lastProofOfLife=session.lastProofOfLife
161+
if session.killed:
162+
sessionStore.killed=session.killed
150163
# add
151164
if not inStore:
152165
self.listSessionObject.append(Session(self.idSession,

teamServer/teamServer/TeamServer.cpp

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,8 +1489,14 @@ int TeamServer::prepMsg(const std::string& input, C2Message& c2Message, bool isW
14891489
}
14901490

14911491

1492-
int main(int argc, char* argv[])
1492+
int main(int argc, char* argv[])
14931493
{
1494+
std::string configFile = "TeamServerConfig.json";
1495+
if (argc >= 2)
1496+
{
1497+
configFile = argv[1];
1498+
}
1499+
14941500
//
14951501
// Logger
14961502
//
@@ -1510,9 +1516,26 @@ int main(int argc, char* argv[])
15101516
//
15111517
// TeamServer Config
15121518
//
1513-
std::ifstream f("TeamServerConfig.json");
1514-
json config = json::parse(f);
1515-
1519+
std::ifstream f(configFile);
1520+
1521+
// Check if the file is successfully opened
1522+
if (!f.is_open())
1523+
{
1524+
std::cerr << "Error: Config file '" << configFile << "' not found or could not be opened." << std::endl;
1525+
return 1;
1526+
}
1527+
1528+
json config;
1529+
try
1530+
{
1531+
config = json::parse(f);
1532+
}
1533+
catch (const json::parse_error& e)
1534+
{
1535+
std::cerr << "Error: Failed to parse JSON in config file '" << configFile << "' - " << e.what() << std::endl;
1536+
return 1;
1537+
}
1538+
15161539
std::string serverGRPCAdd = config["ServerGRPCAdd"].get<std::string>();
15171540
std::string ServerGRPCPort = config["ServerGRPCPort"].get<std::string>();
15181541
std::string serverAddress = serverGRPCAdd;

0 commit comments

Comments
 (0)