Markopy
Utilizing Markov Models for brute forcing attacks
main.cu File Reference

Simple test file to check libcudamarkov. More...

#include <iostream>
#include <string>
#include <cstring>
#include <sstream>
#include <chrono>
#include "cudaModelMatrix.h"
#include <cuda_runtime_api.h>
#include <cuda.h>
#include <device_launch_parameters.h>
Include dependency graph for main.cu:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

Simple test file to check libcudamarkov.

Authors
Ata Hakçıl

Controller class for CUDA device. This implementation only supports Nvidia devices.

Definition in file main.cu.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 21 of file main.cu.

21  {
22 
23 
24 
26  std::cerr << "Importing model.\n";
27  markovPass.Import("models/finished.mdl");
28  markovPass.Buff("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~", 10, true, true);
29  std::cerr << "Import done. \n";
30  markovPass.ConstructMatrix();
31  //markovPass.DumpJSON();
32  CUDADeviceController::ListCudaDevices();
33 
34  std::chrono::steady_clock::time_point begin = std::chrono::steady_clock::now();
35  std::cerr << "Starting walk. \n";
36  markovPass.FastRandomWalk(1000000000,"/media/ignis/Stuff/wordlist.txt",12,12, false, false);
37  //markovPass.FastRandomWalk(500000000,"/media/ignis/Stuff/wordlist2.txt",6,12,25, true);
38  std::chrono::steady_clock::time_point end = std::chrono::steady_clock::now();
39 
40  std::cerr << "Finished in:" << std::chrono::duration_cast<std::chrono::milliseconds> (end - begin).count() << " milliseconds" << std::endl;
41 
42 
43 }
Extension of Markov::API::ModelMatrix which is modified to run on GPU devices.
__host__ void FastRandomWalk(unsigned long int n, const char *wordlistFileName, int minLen, int maxLen, bool bFileIO, bool bInfinite)
Random walk on the Matrix-reduced Markov::Model.
void Buff(const char *str, double multiplier, bool bDontAdjustSelfLoops=true, bool bDontAdjustExtendedLoops=false)
Buff expression of some characters in the model.
bool ConstructMatrix()
Construct the related Matrix data for the model.
Definition: modelMatrix.cpp:31
void Import(const char *filename)
Open a file to import with filename, and call bool Model::Import with std::ifstream.
Definition: modelMatrix.cpp:19