int main()
{
char test[] = "0409cf869af1fdde8fb2ef081ee788b1e59083e8bdaee6a485e8bda60238a6af0126e69697e7bd97e8b1aae69db031323038e69c8d0001c2d0f40124c40000004804ffff09e40000ffea0201ffee24e5ba9fe4ba86efbc8ce4b88de5a5bde9858dffea00ffea00064bffea00ffea00ffea00ffea00ffea00ffea00ffea00ffea00ffea0000ffea0000faeab88ff361ffea00ffff";
char test2[99999] = {0};
int count = 0;
int index = 0;
test2[index] = '0';
index++;
test2[index] = 'x';
index++;
int nLen = sizeof(test);
for (int i = 0; i < nLen; i++)
{
count = count + 1;
test2[index] = test[i];
index++;
if(count %2 == 0)
{
test2[index] = ',';
index++;
test2[index] = '0';
index++;
test2[index] = 'x';
index++;
}
}
printf("%s, \n", test2);
system("pause");
return 0;
}
【逆向编程】给16进制加上0x
最新推荐文章于 2024-04-23 09:29:48 发布