mirror of
https://github.com/yuanyuanxiang/SimpleRemoter.git
synced 2026-01-21 23:13:08 +08:00
Code style change and rebuild zstd with optimization options
This commit is contained in:
@@ -895,9 +895,9 @@ typedef struct DllExecuteInfo {
|
||||
int CallType; // <20><><EFBFBD>÷<EFBFBD>ʽ
|
||||
char Name[32]; // DLL <20><><EFBFBD><EFBFBD>
|
||||
char Md5[33]; // DLL MD5
|
||||
int Pid; // <20><>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID
|
||||
int Pid; // <20><>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID
|
||||
char Is32Bit; // <20>Ƿ<EFBFBD>32λDLL
|
||||
char Reseverd[18];
|
||||
char Reseverd[18];
|
||||
} DllExecuteInfo;
|
||||
#pragma pack(pop)
|
||||
|
||||
@@ -971,10 +971,10 @@ inline std::string ToPekingTimeAsString(const time_t* t)
|
||||
|
||||
inline std::string ToPekingDateTime(const time_t* t)
|
||||
{
|
||||
auto pekingTime = ToPekingTime(t);
|
||||
char buffer[20];
|
||||
std::strftime(buffer, sizeof(buffer), "%Y%m%d%H%M%S", &pekingTime);
|
||||
return buffer;
|
||||
auto pekingTime = ToPekingTime(t);
|
||||
char buffer[20];
|
||||
std::strftime(buffer, sizeof(buffer), "%Y%m%d%H%M%S", &pekingTime);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
typedef struct Validation {
|
||||
|
||||
@@ -76,18 +76,18 @@ inline HKEY GetCurrentUserRegistryKey()
|
||||
// 检查是否需要关闭注册表根键(非预定义键需要关闭)
|
||||
inline void CloseUserRegistryKeyIfNeeded(HKEY hKey)
|
||||
{
|
||||
if (hKey != HKEY_CURRENT_USER &&
|
||||
hKey != HKEY_LOCAL_MACHINE &&
|
||||
hKey != HKEY_USERS &&
|
||||
hKey != HKEY_CLASSES_ROOT &&
|
||||
hKey != NULL) {
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
if (hKey != HKEY_CURRENT_USER &&
|
||||
hKey != HKEY_LOCAL_MACHINE &&
|
||||
hKey != HKEY_USERS &&
|
||||
hKey != HKEY_CLASSES_ROOT &&
|
||||
hKey != NULL) {
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
#define GetCurrentUserRegistryKey() HKEY_CURRENT_USER
|
||||
#define CloseUserRegistryKeyIfNeeded(hKey)
|
||||
#define CloseUserRegistryKeyIfNeeded(hKey)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -102,24 +102,27 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class ObfsAes : public ObfsBase {
|
||||
class ObfsAes : public ObfsBase
|
||||
{
|
||||
private:
|
||||
// Please change `aes_key` and `aes_iv`.
|
||||
unsigned char aes_key[16] = "It is a example";
|
||||
unsigned char aes_iv[16] = "It is a example";
|
||||
unsigned char aes_key[16] = "It is a example";
|
||||
unsigned char aes_iv[16] = "It is a example";
|
||||
|
||||
public:
|
||||
ObfsAes(bool genCArray = true) : ObfsBase(genCArray) { }
|
||||
|
||||
virtual void ObfuscateBuffer(uint8_t* buf, size_t len, uint32_t seed) {
|
||||
struct AES_ctx ctx;
|
||||
AES_init_ctx_iv(&ctx, aes_key, aes_iv);
|
||||
AES_CBC_encrypt_buffer(&ctx, buf, len);
|
||||
virtual void ObfuscateBuffer(uint8_t* buf, size_t len, uint32_t seed)
|
||||
{
|
||||
struct AES_ctx ctx;
|
||||
AES_init_ctx_iv(&ctx, aes_key, aes_iv);
|
||||
AES_CBC_encrypt_buffer(&ctx, buf, len);
|
||||
}
|
||||
|
||||
virtual void DeobfuscateBuffer(uint8_t* buf, size_t len, uint32_t seed) {
|
||||
struct AES_ctx ctx;
|
||||
AES_init_ctx_iv(&ctx, aes_key, aes_iv);
|
||||
AES_CBC_decrypt_buffer(&ctx, buf, len);
|
||||
virtual void DeobfuscateBuffer(uint8_t* buf, size_t len, uint32_t seed)
|
||||
{
|
||||
struct AES_ctx ctx;
|
||||
AES_init_ctx_iv(&ctx, aes_key, aes_iv);
|
||||
AES_CBC_decrypt_buffer(&ctx, buf, len);
|
||||
}
|
||||
};
|
||||
|
||||
1684
common/turbojpeg.h
1684
common/turbojpeg.h
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user