Saturday, December 26, 2015

yet another page generator

Yet another page generator
//Simple example that converts a wordlist from plaintext to plaintext and hash pair tab delimited.
#include <string>
#include <sstream>
#include <iostream>
#include <cctype>
#include <fstream>
#include "md5.h"
using namespace std;


int main (int argc, char* argv[3])
{


{ofstream myfile;
myfile.open (argv[2]);

{ string line; ifstream infile (argv[1]);
myfile << "<html>" << endl;
myfile << "<head>" << endl;

if (infile.is_open())

{ while ( getline (infile,line) )

myfile << "<title>" << line << "</title>" endl;
myfile << "<meta name='description' content='" << line << md5(line)<< " " << sha1(line) << " " << sha224(line) << " " << sha256(line) << " " sha384(line) << " " << sha512(line) << "'/>"
myfile << "<meta name='keywords' content='" << line << md5(line)<< "," << sha1(line) << "," << sha224(line) << "," << sha256(line) << "," sha384(line) << "," << sha512(line) << "'/>"
}
infile.close();
myfile << "</head><body><table><p>" << endl;
{ string line; ifstream infile (argv[1]);

if (infile.is_open()

{ while ( getline (infile,line) )

myfile << "<tr><td>" << "<b>" line << "</b>" << "</td></tr>" << "<tr><td>" << "<b>" (md5)line << "</b>" << "</td></tr>" << "<tr><td>" << "<b>" sha1(line) << "</b>" << "</td></tr>" << "<tr><td>" << "<b>" sh224(line) << "</b>" << "</td></tr>" << "<tr><td>" << "<b>" sh256(line) << "</b>" << "</td></tr>" << "<tr><td>" << "<b>" sh384(line) << "</b>" << "</td></tr>" << "<tr><td>" << "<b>" sh512(line) << "</b>" << "</td></tr>" << endl;


infile.close();
myfile << "</table>" << endl;
myfile << "</p>" << "</body>" << endl;
myfile.close();
} else cout << "Unable to open file" << endl;

}
}
}
return 0; }

No comments:

Post a Comment