31 Dec 2011, 13:52
What extension do you wish for the file to have? <EX: txt, bin, jar, etc.>
txt
The extension of the file will be: 'txt' Proceeding to the next step...
The file name will be FSPAMMER.txt
How many characters do you wish for the file to have?
483
Preparing spam action...
Spam in progress!
Spam completed!
Press any key to continue . . .
#include <iostream>
#include <fstream>
using namespace std;
string help;
string extension;
int randomnumber;
int numofchar;
char car;
string filename = "FSPAMMER.";
char characters[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'};
void delay ( int seconds )
{
clock_t endwait;
endwait = clock () + seconds * CLOCKS_PER_SEC ;
while (clock() < endwait) {}
}
int main()
{
cout << "Welcome to KiralyCraft's file spammer! Enter HELP for detailed information about the use of this program. Enter anything else to continue..."<< endl;
cin >> help;
if (help == "HELP")
{
system("CLS");
cout << "Hello there, welcome to the help screen. Well, the use of the current application is to create a file, with the desired extension that will have an specified size according to it's contents. Easy, so let's get started... " << endl;
cin >> extension;
}
system("CLS");
cout << "What extension do you wish for the file to have? <EX: txt, bin, jar, etc.>" << endl;
cin >> extension;
if (extension == "") {filename = "FSPAMMER";}
cout << "The extension of the file will be: '" << extension << "' Proceeding to the next step..." << endl;
delay (1);
filename.insert(filename.length(),extension);
cout << "The file name will be " << filename << endl;
ofstream outfile;
cout << "How many characters do you wish for the file to have?"<< endl;
cin >> numofchar;
cout << "Preparing spam action..."<< endl;
delay (1);
cout << "Spam in progress!"<< endl;
outfile.open (filename.c_str(), ofstream::out | ofstream::app);
for (int i = 0; i < numofchar + 1; i++)
{
randomnumber = rand() % 25 + 1;
car = characters[randomnumber];
outfile << car;
}
outfile.close();
cout << "Spam completed!"<< endl;
system("PAUSE");
}
31 Dec 2011, 14:52
#include <iostream>
#include <fstream>
using namespace std;
string help;
string extension;
int randomnumber;
int numofchar;
char car;
string filename = "FSPAMMER.";
char characters[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'};
string FNnamefile;
string FNnameext;
int FNnumber;
int FNchars;
int FNfilelength;
string choice;
string convertInt(int number)
{
if (number == 0)
return "0";
string temp="";
string returnvalue="";
while (number>0)
{
temp+=number%10+48;
number/=10;
}
for (int i=0;i<temp.length();i++)
returnvalue+=temp[temp.length()-i-1];
return returnvalue;
}
void delay ( int seconds )
{
clock_t endwait;
endwait = clock () + seconds * CLOCKS_PER_SEC ;
while (clock() < endwait) {}
}
void filesize() {
cout << "Welcome to the FileSize spammer! Enter HELP for detailed information about the use of this program. Enter anything else to continue..."<< endl;
cin >> help;
if (help == "HELP")
{
system("CLS");
cout << "Hello there, welcome to the help screen. Well, the use of the current application is to create a file, with the desired extension that will have an specified size according to it's contents. Easy, so let's get started... " << endl;
cin >> extension;
}
system("CLS");
cout << "What extension do you wish for the file to have? <EX: txt, bin, jar, etc.>" << endl;
cin >> extension;
if (extension == "") {filename = "FSPAMMER";}
cout << "The extension of the file will be: '" << extension << "' Proceeding to the next step..." << endl;
delay (1);
filename.insert(filename.length(),extension);
cout << "The file name will be " << filename << endl;
ofstream outfile;
cout << "How many characters do you wish for the file to have?"<< endl;
cin >> numofchar;
cout << "Preparing spam action..."<< endl;
delay (1);
cout << "Spam in progress!"<< endl;
outfile.open (filename.c_str(), ofstream::out | ofstream::app);
for (int i = 0; i < numofchar + 1; i++)
{
randomnumber = rand() % 25 + 1;
car = characters[randomnumber];
outfile << car;
}
outfile.close();
cout << "Spam completed!"<< endl;
system("PAUSE");
}
void filenumber() {
cout << "Welcome to the FileNumber spammer!" <<endl;
cout << "Please enter the name of the file" <<endl;
cin >> FNnamefile;
FNfilelength = FNnamefile.length();
cout << "Please enter the name of the extension" <<endl;
cin >> FNnameext;
FNnamefile.insert(FNnamefile.length(),".");
FNnamefile.insert(FNnamefile.length(),FNnameext);
cout << "Please enter the number of files you wish to be spammed"<<endl;
cin >> FNnumber;
cout << "Please enter the number of characters each file should have" <<endl;
cin >>FNchars;
for (int i = 0; i < FNnumber+1; i++) {
ofstream outfile;
outfile.open (FNnamefile.c_str(), ofstream::out | ofstream::app);
for (int i = 0; i < FNchars + 1; i++)
{
randomnumber = rand() % 25 + 1;
car = characters[randomnumber];
outfile << car;
}
outfile.close();
FNnamefile.insert(FNfilelength,convertInt(i));
}
cout << "Spam successful" <<endl;
system("PAUSE");
}
int main()
{
cout << "Welcome to KiralyCraft's file spam application! Please insert FS for FileSize spamming or FN for FileNumber spamming." <<endl;
cin >> choice;
if (choice == "FS") {
filesize ();
}
if (choice == "FN") {
filenumber ();
}
}
31 Dec 2011, 21:07
01 Jan 2012, 03:01
01 Jan 2012, 15:49
01 Jan 2012, 15:55
What extension do you wish for the file to have? <EX: txt, bin, jar, etc.>
txt
The extension of the file will be: 'txt' Proceeding to the next step...
The file name will be FSPAMMER.txt
How many characters do you wish for the file to have?
123456789
The file will have around 120564 KB wich means around 117 MB
Preparing spam action...
Spam in progress!
Spam completed!
Press any key to continue . . .
01 Jan 2012, 18:25
01 Jan 2012, 18:44
01 Jan 2012, 19:28
LifeTimeBLOOD wrote:It might actually be useful if it would create files with just 0x00 bytes, its a somewhat low-tech variant of cleaning up a virtual machine HDD before compacting.
2024 © Aprilon — All times are UTC + 1 hour.
The time is 16:17.