如龙维新存档解密源代码
本帖最后由 唯独 于 2024-7-24 19:45 编辑#include <stdio.h>
#include <stdlib.h>
static const char Key[]= "fuEw5rWN8MBS";
static const intKeyLen = 12;
int main(int argc, char **argv)
{
FILE *in,*out;
char *data;
size_t sz;
if (argc != 3)
{
printf("Usage: %s in.sav out.sav\n", argv);
return 0;
}
if ((in = fopen(argv, "rb")) == NULL)
{
perror("Error");
return 1;
}
if ((out = fopen(argv, "wb")) == NULL)
{
perror("Error");
fclose(in);
return 1;
}
printf("Writing %s to %s...\n", argv, argv);
fseek(in, 0, SEEK_END);
sz = ftell(in);
data = malloc(sz);
rewind(in);
fread(data, 1, sz, in);
fclose(in);
for (int i = 0; i < sz; i++)
data ^= Key;
fwrite(data, 1, sz, out);
free(data);
fclose(out);
puts("Done!");
return 0;
}
:hug:大佬这玩意怎么用啊 怎么源码没了? 904570220 发表于 2024-3-12 13:43
怎么源码没了?
#include <stdio.h>
#include <stdlib.h>
static const char Key[]= "fuEw5rWN8MBS";
static const intKeyLen = 12;
int main(int argc, char **argv)
{
FILE *in,*out;
char *data;
size_t sz;
if (argc != 3)
{
printf("Usage: %s in.sav out.sav\n", argv);
return 0;
}
if ((in = fopen(argv, "rb")) == NULL)
{
perror("Error");
return 1;
}
if ((out = fopen(argv, "wb")) == NULL)
{
perror("Error");
fclose(in);
return 1;
}
printf("Writing %s to %s...\n", argv, argv);
fseek(in, 0, SEEK_END);
sz = ftell(in);
data = malloc(sz);
rewind(in);
fread(data, 1, sz, in);
fclose(in);
for (int i = 0; i < sz; i++)
data ^= Key;
fwrite(data, 1, sz, out);
free(data);
fclose(out);
puts("Done!");
return 0;
}
唯独 发表于 2024-7-24 19:46
#include
#include
谢谢。我之前自己在github上也找到了
页:
[1]