Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Lucksi
GitHub Repository: Lucksi/Mr.Holmes
Path: blob/master/Launchers/Win_Launcher.cpp
1071 views
1
/*
2
ORIGINAL CREATOR: Luca Garofalo (Lucksi)
3
AUTHOR: Luca Garofalo (Lucksi)
4
Copyright (C) 2022-2023 Lucksi <[email protected]>
5
License: GNU General Public License v3.0
6
*/
7
8
#include <iostream>
9
#include <cstdlib>
10
#include <fstream>
11
#include <string>
12
#include <Windows.h>
13
#include <stdio.h>
14
#include <unistd.h>
15
16
using namespace std;
17
18
string green = "\033[32m";
19
string blue = "\033[94m";
20
string white = "\033[97m";
21
22
void banner(){
23
system("cls");
24
ifstream Banner("../Banners/Launcher.txt");
25
string content;
26
while(getline(Banner,content)){
27
cout<<green<<content<<endl;
28
}
29
Banner.close();
30
}
31
32
int Core(){
33
int option = 0;
34
while (option != 3){
35
banner();
36
cout<<green<<"\n\n[+]"<<white<<"WOULD YOU LIKE TO:\n(1)EXECUTE MR.HOLMES\n(2)ACTIVATE DATABASE(LOCALHOST ONLY)\n(3)EXIT\n\n"<<green<<"[#MR.HOLMES#]"<<white<<"-->";
37
cin>>option;
38
if(option == 1){
39
cout<<green<<"\n[+]"<<white<<"EXECUTING MR.HOLMES";
40
Sleep(2);
41
chdir("..");
42
system("python MrHolmes.py");
43
chdir("Launchers");
44
}
45
else if(option == 2){
46
cout<<blue<<"\n[I]"<<white<<"ACTIVATING DATABASE...";
47
Sleep(2);
48
system("START /B php -S 127.0.0.1:5001 -t ../GUI 2>NUL >NUL");
49
cout<<blue<<"\n\n[I]"<<white<<"DATABASE STARTED ON: http://127.0.0.1:5001\n\nPRESS ANY KEY TO STOP";
50
system("pause 2>NUL >NUL");
51
cout<<blue<<"\n\n[I]"<<white<<"STOPPING DATABASE\n";
52
system("taskkill /F /IM php.exe 2>NUL >NUL");
53
Sleep(2);
54
cout<<"\nDATABASE STOPPED";
55
Sleep(3);
56
}
57
else if(option == 3){
58
return 0;
59
}
60
else{
61
Core();
62
}
63
}
64
}
65
66
int main(){
67
Core();
68
}
69
70