Friday, August 5, 2016

create a web page from wordlist or other text document

Create a webpage with plain text / hash pairs. Yes I'm considering a project that will enable people to search a hash on Google or major search engines and return a plaintext value for known unsalted hashing algorithms for known or weak passwords.

 //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;

//output meta tags for SEO purposes
myfile << "<meta name=" << "\"" << "description" << "\"" << " " << "content=" << "\"" << md5(line) << "," << "plaintext," << "plain text," << "md5," << "md5 hash" << "\"" << ">" <<endl;
myfile << "<meta name=" << "\"" << "keywords" << "\"" << " " << "content=" << "\"" << md5(line) << "," << "plaintext," << "plain text," << "md5," << "md5 hash" << "\"" << ">" <<endl;
myfile << "<meta name=" << "\"" << "author" << "\"" << " " << "content=" << "\"" << "Vailixi" << "\"" << ">" << endl;

//output link to stylesheet for formatting hypertext in cool way
myfile << "<link rel=" << "\"" << "stylesheet type=" << "\"" << "text/css" << "\"" << " " << "href=" << "\"" << "theme.css" << "\"" << ">" << endl;
myfile << "</head>"<< endl;
myfile << "<body>" << endl;

//include header put your file logo and nav bar in the header file
myfile << "<?php include " << "\'" << "header.php" << "\'" << ";" << " ?>" << endl;


myfile << "<p>" << endl;
myfile << "<table>" << endl;
myfile << "<tr><td><b>md5</b></td><td><b>plaintext</b></td>" << endl;


{ string line; ifstream infile (argv[1]);

if (infile.is_open())


{ while ( getline (infile,line) )
//output plaintext hash pairs
myfile << "<tr><td>" << "<p>" << md5(line) << "</p>" << "</td><td>" << "<p>" << line << "</p>" << "</td></tr>" << endl;


infile.close();
myfile << "</table>" << endl;
myfile << "</p>" << endl;

//include footer file you can use this for a nav bar or showing ads if you want
myfile << "<?php include " << "\'" << "footer.php" << "\'" << ";" << " ?>" << endl;
myfile << "</body>" << "</html>" << endl;
myfile.close();
} else cout << "Unable to open file" << endl;

}
}
}
return 0; }

No comments:

Post a Comment