Remove unused executable and image files; add script to download image to shared directory

This commit is contained in:
2025-05-28 07:49:16 -06:00
parent 0e7257f13c
commit 1b3de2f223
4 changed files with 0 additions and 51 deletions

BIN
a.exe

Binary file not shown.

BIN
img0.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 KiB

51
main.c
View File

@@ -1,51 +0,0 @@
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
int importar_reg(LPCSTR archivo) {
CHAR comando[MAX_PATH + 100];
snprintf(comando, sizeof(comando), "regedit.exe /s \"%s\"", archivo);
STARTUPINFOA si = { sizeof(si) };
PROCESS_INFORMATION pi;
if (!CreateProcessA(NULL, comando, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
printf("❌ Error ejecutando regedit con %s\n", archivo);
return 0;
}
WaitForSingleObject(pi.hProcess, INFINITE);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
return 1;
}
int main() {
WIN32_FIND_DATAA fd;
HANDLE hFind = FindFirstFileA("registros\\*.reg", &fd);
if (hFind == INVALID_HANDLE_VALUE) {
printf("❌ No se encontraron archivos .reg\n");
return 1;
}
// Montar hive NTUSER.DAT
const char* hivePath = "C:\\Users\\Default\\NTUSER.DAT";
const char* mountName = "DEFAULT_USER_PROFILE";
RegLoadKeyA(HKEY_USERS, mountName, hivePath);
do {
char rutaArchivo[MAX_PATH];
snprintf(rutaArchivo, sizeof(rutaArchivo), "registros\\%s", fd.cFileName);
printf("📥 Importando: %s\n", rutaArchivo);
importar_reg(rutaArchivo);
} while (FindNextFileA(hFind, &fd));
FindClose(hFind);
RegUnLoadKeyA(HKEY_USERS, mountName);
printf("✅ Todos los registros aplicados correctamente.\n");
return 0;
}