| 1 | #include"file.h" |
| 2 | int main(int argc, char* agrv[]) { |
| 3 | cout << " @@@@@@@@\ " << endl; |
| 4 | cout << " @@@ \@@ " << endl; |
| 5 | cout << " @@@ =@@` /@@@@@\ =@@/@@@@@` */@@@@@@@@" << endl; |
| 6 | cout << " @@@ */@@^ ,@@` =@@ =@@^ =@@ ,@@^ *@@@" << endl; |
| 7 | cout << " @@@@@@/[ @@@@@@@@@@^ =@@ =@@ /@@ =@@ " << endl; |
| 8 | cout << " @@@ =@@ =@@ =@@ \@@ /@@" << endl; |
| 9 | cout << " @@@ *@@@` ,/^ =@@ =@@ ,@@@` ,/@@@" << endl; |
| 10 | cout << " [[[ ,[@@@/[ ,[[ ,[[ ,\@@/`=@@" << endl; |
| 11 | cout << " ,@@^" << endl; |
| 12 | cout << " @@@@@@@@`" << endl; |
| 13 | unsigned int argvSize = 0; |
| 14 | while (true) |
| 15 | { |
| 16 | if (agrv[argvSize] == NULL) { |
| 17 | break; |
| 18 | } |
| 19 | else { |
| 20 | argvSize++; |
| 21 | } |
| 22 | } |
| 23 | char* path = nullptr; |
| 24 | char* opath = nullptr; |
| 25 | for (int i = 0; i < argvSize; i++) { |
| 26 | if (!strcmp(agrv[i], "-h")|| agrv[1]==nullptr) { |
| 27 | cout << "##################################################" << endl; |
| 28 | cout << "# -32 32λShellCode���ɣ���Ҫת��������Ϊ32λ��#" << endl; |
| 29 | cout << "# -64 64λShellCode���ɣ���Ҫת��������Ϊ64λ��#" << endl; |
| 30 | cout << "# -e ��Ҫת����exe·�� #" << endl; |
| 31 | cout << "# -o ���Shellcode��·�� #" << endl; |
| 32 | cout << "# ����: PengCode.exe -64 -e code.exe -o code.bin #" << endl; |
| 33 | cout << "# ��Ҫ����Ա����PengCode! #" << endl; |
| 34 | cout << "##################################################" << endl; |
| 35 | } |
| 36 | if (!strcmp(agrv[i], "-e")) { |
| 37 | path = agrv[i + 1]; |
| 38 | } |
| 39 | if (!strcmp(agrv[i], "-o")) { |
| 40 | opath = agrv[i + 1]; |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | for (int i = 0; i < argvSize; i++) { |
| 45 | if (!strcmp(agrv[i], "-64")) { |
| 46 | if (path != nullptr && opath != nullptr) { |
| 47 | Write64FileShellCode(path, opath); |
| 48 | cout << "64λShellCode����" << endl; |
| 49 | return 0; |
| 50 | } |
| 51 | } |
| 52 | if (!strcmp(agrv[i], "-32")) { |
| 53 | Write32FileShellCode(path, opath); |
| 54 | cout << "32λShellCode����" << endl; |
| 55 | return 0; |
| 56 | } |
| 57 | } |
| 58 | } |
nothing calls this directly
no test coverage detected