does anyone know how to end a process??? i thought i had it and got these errors:
C:\Program Files\Microsoft Visual Studio\MyProjects\ftp\ftp.cpp(49) : error C2664: 'GetExitCodeProcess' : cannot convert parameter 1 from 'int' to 'void *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
C:\Program Files\Microsoft Visual Studio\MyProjects\ftp\ftp.cpp(51) : error C2664: 'TerminateProcess' : cannot convert parameter 1 from 'int' to 'void *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
Here is my code now:
This is just a program for fun and to mess around. I am hoping it will be able to read from a wordlist and try different passwords for my ftp until it gets the right pass. If you have any suggestions on if i should try a different route that would be great. Like i said this is just my own fun little project. ThanksCode:#include "stdafx.h" #include "iostream.h" #include "stdlib.h" #include "stdio.h" #include "fstream.h" #include "string.h" #include "windows.h" int main() { char infos[30]; char ip[30]; char infoe[100]; char infop[100]; char info[100]; char pass[10]; char test[10]; char user[20]; int HANDLE; int LPDWORD; ifstream a_file("c:/test.txt"); a_file>>test; strcpy(pass, test); cout<<"Command to run:\n"; //Using if for explorer ftp:// cin.getline(infos, 30); cout<<"Username + :\n"; //Getting accounts user name cin>>user; cout<<"@ + IP\n"; //Getting the IP address cin>>ip; strcpy(infoe, infos); strcat(infoe, user); //Starts combining info strcpy(infop, infoe); strcat(infop, pass); strcpy(info, infop); strcat(info, ip); //Finishes combining info system(info); HANDLE=GetCurrentProcessId(); GetExitCodeProcess(HANDLE, LPDWORD); TerminateProcess(HANDLE, LPDWORD); return 0; }



LinkBack URL
About LinkBacks


