-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCore.hpp
56 lines (46 loc) · 1.33 KB
/
Core.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once
#include "User_cmd.hpp"
#pragma comment(lib, "Winmm.lib")
using namespace std;
static string current_path = "";
/*void set_cursor(int x = 0, int y = 0) // experimental -- use other libraries like ncurses/readlines
{
HANDLE handle;
COORD coordinates;
handle = GetStdHandle(STD_OUTPUT_HANDLE);
coordinates.X = x;
coordinates.Y = y;
SetConsoleCursorPosition(handle, coordinates);
}*/
bool recognize_cmd(std::string cmd) {
if (user_cmd::print(cmd))
return true;
if (user_cmd::help_c(cmd))
return true;
if (user_cmd::ls(cmd))
return true;
if (user_cmd::cfile(cmd))
return true;
if (user_cmd::help(cmd))
return true;
if (user_cmd::clear(cmd))
return true;
if (user_cmd::sysinfo(cmd))
return true;
if (user_cmd::exit_sys(cmd))
return true;
if (user_cmd::dfile(cmd))
return true;
if (user_cmd::mkdir(cmd)) // dont talk about performance, its hurtin.
return true;
if (user_cmd::ddir(cmd))
return true;
if (user_cmd::exe(cmd))
return true;
if (user_cmd::mp3(cmd))
return true;
if (user_cmd::nano(cmd))
return true;
cout << "[!] Invalid command. Try running with elevated privileges." << endl;
return false;
}