2020年8月19日

winsock2.h 编译冲突的终极解决办法

摘要: 将所有的 #include 换成 #include 解决!!! 阅读全文

posted @ 2020-08-19 16:37 thinkinc999 阅读(389) 评论(0) 推荐(0) 编辑

2020年8月7日

获取本机IP

摘要: 1 // ConsoleApplication12.cpp : This file contains the 'main' function. Program execution begins and ends there. 2 // 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include ... 阅读全文

posted @ 2020-08-07 20:11 thinkinc999 阅读(122) 评论(0) 推荐(0) 编辑

2020年8月1日

windows C++捕获CMD命令输出

摘要: 1 #include "windows.h" 2 #include "stdio.h" 3 #include 4 #include 5 6 HANDLE hReadPipeCmd = NULL; 7 HANDLE hWritePipeCmd = NULL; 8 HANDLE hReadPipeShell = NULL; 9 HANDLE hWritePipeShell =... 阅读全文

posted @ 2020-08-01 16:57 thinkinc999 阅读(598) 评论(0) 推荐(0) 编辑

2020年7月23日

windows下面生成 dump

摘要: main.cpp 1 #include "Windows.h" 2 #include "DbgHelp.h" 3 #include 4 5 int GenerateMiniDump(PEXCEPTION_POINTERS pExceptionPointers) 6 { 7 // 定义函数指针 8 typedef BOOL(WINAPI * MiniDumpWri... 阅读全文

posted @ 2020-07-23 15:26 thinkinc999 阅读(290) 评论(0) 推荐(0) 编辑

2020年7月7日

windows 控制台命令输出 捕获

摘要: #include #include #include /* gcc defined unix */#ifdef unix#include #endif#ifdef WIN32#include #define pipe(X) _pipe(X,40,O_BINARY) #define fileno _fileno#define dup2 _dup2#define read _read#endif#in... 阅读全文

posted @ 2020-07-07 16:42 thinkinc999 阅读(396) 评论(0) 推荐(0) 编辑

2020年7月3日

不使用PEM 文件建立SSL通道

摘要: 1 2 static unsigned char public_pem[]="-----BEGIN CERTIFICATE-----\n" 3 "MIIDazCCAlOgAwIBAgIUEk+7+NYeiinQ6EwHUC878nYvrxswDQYJKoZIhvcNAQEL\n" 4 "BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbW... 阅读全文

posted @ 2020-07-03 18:14 thinkinc999 阅读(636) 评论(0) 推荐(0) 编辑

2020年6月18日

OpenSSL socket 服务端

摘要: 这是我从网上找来改好的,需要添加 include 和 lib 路径需要自己手动生成 pem 文件,在注释里面有命行,自己动手。 1 #define WIN32_LEAN_AND_MEAN 2 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #includ... 阅读全文

posted @ 2020-06-18 17:41 thinkinc999 阅读(406) 评论(0) 推荐(0) 编辑

OpenSSL socket客户端

摘要: 这是我从网上找来的,改好了的。需要添加一下include 和 lib 路径 1 #define WIN32_LEAN_AND_MEAN 2 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #includ... 阅读全文

posted @ 2020-06-18 17:32 thinkinc999 阅读(531) 评论(0) 推荐(0) 编辑

2020年3月6日

Windows 编译 openssl-1.1.1d

摘要: 1,下载 openssl 源码包:https://www.openssl.org/source/openssl-1.1.1d.tar.gz2,下载并安装 NASM:https://www.nasm.us/pub/nasm/releasebuilds/2.13.01/win64/nasm-2.13.01-installer-x64.exe记得将 BIN 加入 PATH环境变量3,下载并安装 Perl... 阅读全文

posted @ 2020-03-06 16:21 thinkinc999 阅读(2446) 评论(0) 推荐(0) 编辑

RSA密钥对的使用C++

摘要: // RsaEncDec.cpp : This file contains the 'main' function. Program execution begins and ends there.//#include #include //#include #include #include #pragma comment(lib, "libssl.lib")#pragma comment(li... 阅读全文

posted @ 2020-03-06 16:08 thinkinc999 阅读(991) 评论(0) 推荐(0) 编辑

导航