I am running a loop which logs me into my ftp account. However, I need it to run VERY fast repeatedly. My problem is that, whether the login is successful or unsuccessful, it is quite slow because it has to then wait to login again etc. This is the code just for my login:
This code is in a for loop which needs to run at very high speeds. If I take out the system() command it runs at the speed I require, but if I leave it in (which I need to or the program will not be doing what I want it to) it does about one attempt to login every 2 seconds, that is very slow for a for loop.
Code:
cout<< a << b << c << d << e << f <<"\n"; ofstream record ( "c:\\Dave\\C-programming\\Password Cracker\\record.txt" ); record<< a << b << c << d << e << f; record.close(); ifstream readrecord ( "c:\\Dave\\C-programming\\Password Cracker\\record.txt" ); char password[6]; readrecord>> password; ofstream ftpscript ( "c:\\Dave\\C-programming\\Password Cracker\\ftpscript.txt" ); ftpscript<< username <<"\n" << password <<"\n" <<"bye"; ftpscript.close(); system("cd C:\\Dave\\C-programming\\Password Cracker\\ & ftp -s:ftpscript.txt ftp.<my-website>.org.uk");
Comment