Code documentations of all c++ processes
<aside>
💡 Use table of contents to traverse or search document using: cmd / ctrl + P
</aside>
Table of Contents
Overview
Backend is mainly responsible for two main tasks and third derived task, first is pattern detection in multiple email:password pairs, second is generating statistics of detected patterns, and the third derived task is just a wrapper to detect pattern in a single email:password pair.
First we are going to explain brief working of all these task, then we will document all c++ files including classes and their members one by one.
Analyze raw data for patterns

- We start with taking input as plain text (email:password) and number of thread specified by user.
- Program starts with resizing all the files present in Input folder. That size is predefined / hard-coded, currently set as 100,000 lines per file. Once all the files are resized we are good to go with processing data.
- Then we collect names and address of each file present in Input folder and call them one by one to process data.
- Every file is read by a vector and gets divided into small chunks.
- Every chunk of data is handled by individual thread. So, the number of chunks depend on number of threads. Number of threads can be passed as an argument to main_process().
- Every thread will process each password string to find name, location, dob, common words, website and mobile number in it.
- Above analyzed data then gets converted into pattern by using length and location of analyzed data in respective password string.