-
-
[求助]有谁逆向了Visual SourceSafe 的配置文件格式的?
-
发表于: 2015-6-8 22:56 2902
-
写一个类似TortoiseSVN 的VSS Shell 插件,结果蛋疼了,VSS 天生似乎不好支持, vssver2.scc 文件格式中没有当前目录中文件的的last check in DateTime,于是乎白忙活,寄希望于 SCC_FILE_INFO 结构中的两个Unk,有谁逆向过?
#define SCC_FILE_SIGN 0x1234
#define SCC_FILE_VERSION 0x1
#pragma pack(push,1)
// 0x10
typedef struct _SCC_FILE_INFO
{
ULONG VssPhysID; // VssPhysID
ULONG unk1;
ULONG unk2;
ULONG BranchsVersion; // ok
} SCC_FILE_INFO;
#define SSC_FILE_SIGN 0x1234
#define SSC_FILE_VERSION 1
// SCC_FILE_STRUCT.u.s.date
// GetLocalTime(&SystemTime);
// BYTE3(date) = SystemTime.wYear - 108;
// BYTE2(date) = LOBYTE(SystemTime.wMonth);
// BYTE1(date) = LOBYTE(SystemTime.wDay);
// LOBYTE(date) = LOBYTE(SystemTime.wDayOfWeek) + 1;
// SCC_FILE_STRUCT.u.s.time
// BYTE3(time) = LOBYTE(SystemTime.wHour);
// BYTE2(time) = LOBYTE(SystemTime.wMinute);
// BYTE1(time) = LOBYTE(SystemTime.wSecond);
// LOBYTE(time) = SystemTime.wMilliseconds / 10;
// SCC_FILE_STRUCT.u.s.rand_id
// srand(time64(0));
// for(int i = 0; i < 8 ; i++)
// SCC_FILE_STRUCT.u.s.rand_id[i] = rand();
//
typedef struct _SCC_FILE_STRUCT
{
USHORT FileSign; // SSC_FILE_SIGN
USHORT VSSVersion; // SSC_FILE_VERSION
union
{
GUID databaseid; // 4 // file_sign
struct
{
DWORD date;
DWORD time;
UCHAR rand_id[8];
} s;
} u;
ULONG DataCrc32; // 14
ULONG VssPhysID; // 18 VssPhysID
ULONG FileInfoCount; // 1C SCC_FILE_COUNT_OFFSET
SCC_FILE_INFO FileInfoArray[ARRAY_SIZE]; // 0x20
} SCC_FILE_STRUCT;
#pragma pack(pop)
inline int VS_IDToPhys(UINT PhysId, char *PhysName)
{
int i;
int result;
i = 0;
do
{
result = PhysId / 26;
PhysName[i++] = PhysId % 26 + 65;
PhysId /= 26;
}
while ( i <= 7 );
PhysName[i] = 0;
return result;
}
求高手
SourceSafeShell.zip
#define SCC_FILE_SIGN 0x1234
#define SCC_FILE_VERSION 0x1
#pragma pack(push,1)
// 0x10
typedef struct _SCC_FILE_INFO
{
ULONG VssPhysID; // VssPhysID
ULONG unk1;
ULONG unk2;
ULONG BranchsVersion; // ok
} SCC_FILE_INFO;
#define SSC_FILE_SIGN 0x1234
#define SSC_FILE_VERSION 1
// SCC_FILE_STRUCT.u.s.date
// GetLocalTime(&SystemTime);
// BYTE3(date) = SystemTime.wYear - 108;
// BYTE2(date) = LOBYTE(SystemTime.wMonth);
// BYTE1(date) = LOBYTE(SystemTime.wDay);
// LOBYTE(date) = LOBYTE(SystemTime.wDayOfWeek) + 1;
// SCC_FILE_STRUCT.u.s.time
// BYTE3(time) = LOBYTE(SystemTime.wHour);
// BYTE2(time) = LOBYTE(SystemTime.wMinute);
// BYTE1(time) = LOBYTE(SystemTime.wSecond);
// LOBYTE(time) = SystemTime.wMilliseconds / 10;
// SCC_FILE_STRUCT.u.s.rand_id
// srand(time64(0));
// for(int i = 0; i < 8 ; i++)
// SCC_FILE_STRUCT.u.s.rand_id[i] = rand();
//
typedef struct _SCC_FILE_STRUCT
{
USHORT FileSign; // SSC_FILE_SIGN
USHORT VSSVersion; // SSC_FILE_VERSION
union
{
GUID databaseid; // 4 // file_sign
struct
{
DWORD date;
DWORD time;
UCHAR rand_id[8];
} s;
} u;
ULONG DataCrc32; // 14
ULONG VssPhysID; // 18 VssPhysID
ULONG FileInfoCount; // 1C SCC_FILE_COUNT_OFFSET
SCC_FILE_INFO FileInfoArray[ARRAY_SIZE]; // 0x20
} SCC_FILE_STRUCT;
#pragma pack(pop)
inline int VS_IDToPhys(UINT PhysId, char *PhysName)
{
int i;
int result;
i = 0;
do
{
result = PhysId / 26;
PhysName[i++] = PhysId % 26 + 65;
PhysId /= 26;
}
while ( i <= 7 );
PhysName[i] = 0;
return result;
}
求高手
SourceSafeShell.zip
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课
赞赏
他的文章
谁下载
看原图
赞赏
雪币:
留言: