随笔分类 -  《Visual C++ 代码片段笔记》

摘要:服务端(server) #include <stdio.h> #include <winsock2.h> #pragma comment(lib,"ws2_32.lib") //把ws2_32.lib加到Link页的连接库 #define PORT 15001 //通信的端口(指服务器端) #def 阅读全文
posted @ 2018-06-09 10:04 lyshark 阅读(2287) 评论(0) 推荐(1) 编辑
摘要:实现简单的Socket通信 服务端代码(Server) #include <stdio.h> #include <winsock2.h> #pragma comment(lib,"ws2_32.lib") #define PORT 9999 int main() { WSADATA WSAData; 阅读全文
posted @ 2018-06-09 10:01 lyshark 阅读(4070) 评论(1) 推荐(2) 编辑
摘要:#include <windows.h> #include <tlhelp32.h> //进程快照函数头文件 #include <stdio.h> bool getProcess(const char *procressName) //此函数进程名不区分大小写 { char pName[MAX_PA 阅读全文
posted @ 2018-06-09 09:57 lyshark 阅读(4841) 评论(0) 推荐(0) 编辑
摘要:遍历进程 #include <windows.h> #include <tlhelp32.h> //进程快照函数头文件 #include <stdio.h> int main() { int countProcess=0; //当前进程数量计数变量 PROCESSENTRY32 currentPro 阅读全文
posted @ 2018-06-09 09:57 lyshark 阅读(1856) 评论(0) 推荐(0) 编辑
摘要:#include <string> #include<iostream> #include<windows.h> #include <sstream> using namespace std; string WORDToString(WORD w) { char tmpbuff[16]; sprin 阅读全文
posted @ 2018-06-09 09:56 lyshark 阅读(954) 评论(0) 推荐(0) 编辑
摘要:#include<winsock2.h> #include<iostream> #include<string> using namespace std; #pragma comment(lib, "WS2_32.lib") string getIP() { WSADATA WSAData; cha 阅读全文
posted @ 2018-06-09 09:55 lyshark 阅读(1746) 评论(0) 推荐(1) 编辑
摘要:#include<stdio.h> #include<winsock2.h> //该头文件需在windows.h之前 #include<windows.h> #include<string> #include<iostream> #pragma comment(lib,"ws2_32.lib") u 阅读全文
posted @ 2018-06-09 09:54 lyshark 阅读(4489) 评论(0) 推荐(1) 编辑
摘要:#include <iostream> #include <stdio.h> extern long FileSizeof(char *); int main() { if(FileSizeof("\\a.exe")==20499) #指定文件大小 { std::cout<<"没有被破解"<<std 阅读全文
posted @ 2018-05-26 22:28 lyshark 阅读(1201) 评论(0) 推荐(0) 编辑
摘要:扫描特征码基地址 #include <stdio.h> #include <stdlib.h> #include <windows.h> union Base { DWORD address; BYTE data[4]; }; /*********************************** 阅读全文
posted @ 2018-05-26 22:17 lyshark 阅读(2447) 评论(0) 推荐(1) 编辑


8951788 | 6896846
博客园 - 开发者的网上家园

点击右上角即可分享
微信分享提示