forked from padi-g/bash-on-windows-qt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
command.h
executable file
·117 lines (94 loc) · 1.8 KB
/
command.h
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#ifndef COMMAND_H
#define COMMAND_H
#include <QObject>
#include <QString>
#include <QThread>
#include "simplecrypt.h"
#include <QtXml>
class echo{
QString output, cmd;
public:
echo(QString);
QString echo_n(QString);
void echo_a();
void echo_o();
void echo_p();
void echo_h();
};
class ls{
QString output, cmd, list;
QDir file_list;
QStringList names;
public :
ls(QString);
void ls_a();
void ls_n();
void ls_t();
void ls_h();
void ls_at();
};
class touch{
QString filename;
public :
touch(QString);
};
class cd{
QString cmd, user;
public :
cd(QString);
};
class pwd{
public :
pwd();
void output_path();
};
class rm {
public:
rm(QString);
};
class cat {
QString filename, cmd;
int length, index;
QByteArray output;
public :
cat(QString, int);
void cat_h();
void cat_n(int);
void cat_a();
void cat_o();
};
class mkdir {
public:
mkdir(QString);
};
class grep {
QByteArray putt, putt_n, check;
QString user, cmd, filename, substr;
int subnum;
public :
grep(QString);
void grep_n();
void grep_i();
};
class login{
int level;
SimpleCrypt crypto;
static int usersCount;
QDomDocument document;
QDomElement root, user;
struct User{
QString username, epassword;
}new_user, current_user;
public :
void setNull();
login(QString);
void login_n(); // new user
void login_u(); // already user
void login_h();
int newUserWrite(QString u, QString p, int l);
};
class man{
public:
man(QString);
};
#endif // COMMAND_H