-
-
[求助]smc加密
-
发表于: 2022-5-10 21:58 4003
-
节表数的输出一直是零,不知道为什么
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | #include<iostream> #include<tchar.h> #include<windows.h> #include <iostream> using namespace std; #pragma code_seg(".SMC"); void smc() { for ( int i = 0 ; i < 10 ; i + + ) { cout << i; } } #pragma code_seg() #pragma comment(linker,"/section:.SMC,ERW") int main() { const char * section_name = ".SMC" ; int section_number; LPVOID pmoudle = GetModuleHandle( 0 ); PIMAGE_DOS_HEADER pdosheader = (PIMAGE_DOS_HEADER)pmoudle; PIMAGE_NT_HEADERS32 pntheader = (PIMAGE_NT_HEADERS32)(pdosheader + pdosheader - >e_lfanew); section_number = pntheader - >FileHeader.NumberOfSections; PIMAGE_SECTION_HEADER section_header = (PIMAGE_SECTION_HEADER)(sizeof(IMAGE_NT_HEADERS) + pdosheader - >e_lfanew); / / 节表起始位置 / / printf( "name:%s" , section_header - >Name); / * for ( int i; i < section_number; i + + ) { if (strcmp((char * )section_header - >Name, section_name) = = 0 ) { int sectioner_size; char * sectioner_address; sectioner_size = section_header - >SizeOfRawData; sectioner_address = (char * )section_header - >VirtualAddress; for ( int j = 0 ; j < sectioner_size; j + + ) { * (sectioner_address + i) = * (sectioner_address + i) ^ 2 ; } } } * / } |
赞赏
他的文章
- [求助]confuser手动脱壳缺少模块 4522
- Net脱壳修复失败 3740
- [求助]dnspy修改代码后不能保存 4582
- CreateProcess启动指定程序不能保持运行 3955
- [求助]QT缺失<QtWin>的头文件,如何解决 5240
看原图
赞赏
雪币:
留言: