ajout du crypteur en WIP
This commit is contained in:
18
Crypter/utils.cpp
Normal file
18
Crypter/utils.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "utils.hpp"
|
||||
#include <Windows.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
void StringReplace(char* in, const char* to_find, const char* replacement)
|
||||
{
|
||||
char buffer[1024];
|
||||
char* p;
|
||||
|
||||
if (!(p = strstr(in, to_find)))
|
||||
return;
|
||||
|
||||
strncpy(buffer, in, p - in);
|
||||
buffer[p - in] = '\0';
|
||||
sprintf(buffer + (p - in), "%s%s", replacement, p + strlen(to_find));
|
||||
strcpy(in, buffer);
|
||||
}
|
||||
Reference in New Issue
Block a user