Skip to content

Commit 00c56d3

Browse files
authored
Add files via upload
1 parent cc52dc5 commit 00c56d3

File tree

2 files changed

+81
-0
lines changed

2 files changed

+81
-0
lines changed

key.cpp

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
#include <iostream>
2+
#include <string.h>
3+
#include "lib/enc.h"
4+
#include "lib/dec.h"
5+
#include "lib/banner.h"
6+
7+
#if defined(__linux__) // any linux distribution
8+
#define CLS "clear"
9+
#elif defined(_WIN32) // any windows system
10+
#define CLS "cls"
11+
#else
12+
#define CLS "clear"
13+
#endif
14+
15+
using namespace std;
16+
17+
int main() {
18+
system(CLS);
19+
int i, input;
20+
string str;
21+
cout<<banner<<
22+
"\e[33m [!] Please choose following options: \n\n"
23+
"\e[36m [1] Encrypt string. \n\n"
24+
" [2] Decrypt string. \n\n"
25+
" [3] Encrypt File. \n\n"
26+
" [4] Decrypt File. \n\n"
27+
" [5] Exit \e[0m\n\n"
28+
<<ask("MENU");
29+
fr:
30+
cin >> input;
31+
switch(input) {
32+
33+
case 1:
34+
system(CLS);
35+
cout<<banner<<
36+
"\e[33m [!] Please Enter String: \n\n"
37+
<<ask("Encrypt STR");
38+
getline(cin >> ws,str);
39+
for(i = 0; (i < 100 && str[i] != '\0'); i++)
40+
str[i] = str[i] + 2;
41+
42+
cout << "\e[31m\n[+] Encrypted string: \e[0m" << str << endl;
43+
break;
44+
45+
case 2:
46+
system(CLS);
47+
cout<<banner<<
48+
"\e[33m [!] Please Enter String: \n\n"
49+
<<ask("Decrypt STR");
50+
getline(cin >> ws ,str);
51+
for(i = 0; (i < 100 && str[i] != '\0'); i++)
52+
str[i] = str[i] - 2;
53+
54+
cout << "\e[31m\nDecrypted string: \e[0m" << str << endl;
55+
break;
56+
case 3:
57+
system(CLS);
58+
cout<<banner<<
59+
"\e[33m [!] Please Enter Dir File: \n\n"
60+
<<ask("Encrypt File ("+pwd()+")");
61+
62+
vector1 one;
63+
one.center();
64+
break;
65+
case 4:
66+
system(CLS);
67+
cout<<banner<<
68+
"\e[33m [!] Please Enter Dir File: \n\n"
69+
<<ask("Decrypt File ("+pwd()+")");
70+
vector2 two;
71+
two.center2();
72+
break;
73+
case 5:
74+
exit(0);
75+
default:
76+
cout << "\e[32m[-] Invalid Input !!! \e[0m\n";
77+
goto fr;
78+
break;
79+
}
80+
return 0;
81+
}

key.exe

3.43 MB
Binary file not shown.

0 commit comments

Comments
 (0)