mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-08-16 16:27:15 +00:00
Updated Error Code
This commit is contained in:
parent
332efaa282
commit
4b3eef5f21
12
Security.cpp
12
Security.cpp
@ -151,7 +151,7 @@ std::vector<std::string> Check(){
|
|||||||
std::unique_ptr<FILE, decltype(&_pclose)> pipe(_popen(cmd.c_str(), "r"), _pclose);
|
std::unique_ptr<FILE, decltype(&_pclose)> pipe(_popen(cmd.c_str(), "r"), _pclose);
|
||||||
cmd.clear();
|
cmd.clear();
|
||||||
if (!pipe) {
|
if (!pipe) {
|
||||||
Exit(MSG2+ ". Code: 0");
|
Exit(MSG2+ ". Code: 1");
|
||||||
}
|
}
|
||||||
while (fgets(Buffer.data(), Buffer.size(), pipe.get()) != nullptr) {
|
while (fgets(Buffer.data(), Buffer.size(), pipe.get()) != nullptr) {
|
||||||
result += Buffer.data();
|
result += Buffer.data();
|
||||||
@ -161,19 +161,19 @@ std::vector<std::string> Check(){
|
|||||||
while(result.substr(pos,4) != "File"){pos--;}
|
while(result.substr(pos,4) != "File"){pos--;}
|
||||||
while(!isdigit(result.at(pos))){pos--;}
|
while(!isdigit(result.at(pos))){pos--;}
|
||||||
if((result.substr(pos,1).at(0) - 48) == 0) Exit(MSG1 + " Code 2");
|
if((result.substr(pos,1).at(0) - 48) == 0) Exit(MSG1 + " Code 2");
|
||||||
}else Exit(MSG1 + " Code 3");
|
}else Exit(MSG2 + " Code 2");
|
||||||
result.clear();
|
result.clear();
|
||||||
}else Exit(MSG2 + ". Code: 2");
|
}else Exit(MSG2 + ". Code: 3");
|
||||||
Result.clear();
|
Result.clear();
|
||||||
TraceBack++;
|
TraceBack++;
|
||||||
}else{Exit(MSG2 + ". Code: 3");}
|
}else{Exit(MSG2 + ". Code: 4");}
|
||||||
|
|
||||||
K1.clear();
|
K1.clear();
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
dwRegOPenKey = OpenKey(HKEY_CURRENT_USER, K2.c_str(), &hKey);
|
dwRegOPenKey = OpenKey(HKEY_CURRENT_USER, K2.c_str(), &hKey);
|
||||||
if(dwRegOPenKey == ERROR_SUCCESS) {
|
if(dwRegOPenKey == ERROR_SUCCESS) {
|
||||||
Result = QueryKey(hKey, 2);
|
Result = QueryKey(hKey, 2);
|
||||||
if(Result.empty()){Exit(MSG1+ " Code 4");}
|
if(Result.empty()){Exit(MSG1 + " Code 3");}
|
||||||
Data.push_back(Result);
|
Data.push_back(Result);
|
||||||
TraceBack++;
|
TraceBack++;
|
||||||
}else{Exit(MSG3);}
|
}else{Exit(MSG3);}
|
||||||
@ -183,7 +183,7 @@ std::vector<std::string> Check(){
|
|||||||
if(dwRegOPenKey == ERROR_SUCCESS) {
|
if(dwRegOPenKey == ERROR_SUCCESS) {
|
||||||
Result = QueryKey(hKey, 3);
|
Result = QueryKey(hKey, 3);
|
||||||
if(Result.empty()){
|
if(Result.empty()){
|
||||||
Exit(MSG2 + ". Code: 4");
|
Exit(MSG2 + ". Code: 5");
|
||||||
}
|
}
|
||||||
Data.push_back(Result);
|
Data.push_back(Result);
|
||||||
TraceBack++;
|
TraceBack++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user