开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
master
分支 (1)
master
master
分支 (1)
master
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
master
分支 (1)
master
test
/
https
/
src
/
main.cpp
test
/
https
/
src
/
main.cpp
main.cpp 4.13 KB
一键复制 编辑 原始数据 按行查看 历史
Dzlua 提交于 2017年06月24日 15:53 +08:00 . 可以使用
/*
Coder: Dzlua
Email: 505544956@qq.com
Time : 2017年06月23日
*/
#include <iostream>
#include <memory>
#include <vector>
#include <string>
using namespace std;
#include "pkghead.h"
int main(int argc, char** argv)
{
cout << "hello world!" << endl;
const char data[] = {
0x16,0x03,0x01,0x02,0x00,0x01,0x00,0x01,0xfc,0x03
,0x03,0x72,0x09,0xb8,0x34,0xa0,0xe1,0x04,0x92,0xcd,0x37,0x87,0x22,0x4e,0xc0,0x51
,0xe9,0xad,0x7e,0x25,0xbc,0xb9,0x11,0x7f,0xa5,0x89,0x34,0x2b,0x63,0xfc,0x91,0x4b
,0xbc,0x20,0xf4,0x11,0xf4,0x47,0xc0,0x31,0xaa,0x07,0x7d,0xa3,0xe1,0x33,0x2d,0x83
,0x20,0xd3,0xc3,0x18,0xac,0x54,0x9e,0x2f,0x24,0x4f,0x0a,0x49,0x49,0xcd,0x61,0xe2
,0x8d,0x81,0x00,0x22,0x7a,0x7a,0x13,0x01,0x13,0x02,0x13,0x03,0xc0,0x2b,0xc0,0x2f
,0xc0,0x2c,0xc0,0x30,0xcc,0xa9,0xcc,0xa8,0xc0,0x13,0xc0,0x14,0x00,0x9c,0x00,0x9d
,0x00,0x2f,0x00,0x35,0x00,0x0a,0x01,0x00,0x01,0x91,0xba,0xba,0x00,0x00,0xff,0x01
,0x00,0x01,0x00,0x00,0x00,0x00,0x12,0x00,0x10,0x00,0x00,0x0d,0x73,0x70,0x32,0x2e
,0x62,0x61,0x69,0x64,0x75,0x2e,0x63,0x6f,0x6d,0x00,0x17,0x00,0x00,0x00,0x23,0x00
,0xb0,0x4b,0x3d,0x03,0x23,0xb1,0x1d,0x42,0x86,0x8c,0x6e,0x17,0xbd,0x27,0x4b,0xba
,0xdd,0x3c,0xdf,0x51,0x15,0x3e,0xfa,0x8c,0x43,0x1a,0x61,0xf6,0x6a,0xa8,0xe4,0xd4
,0x1e,0x71,0xde,0x15,0x81,0x5b,0xe9,0xbf,0xe9,0xdd,0xc0,0xa2,0xfe,0x70,0xe4,0xbf
,0xb4,0x9c,0x40,0xae,0x81,0xdd,0x74,0x3d,0x3e,0xaf,0x89,0x4c,0x25,0xb2,0xca,0x73
,0x34,0xba,0xc1,0x48,0xe2,0x11,0x8c,0xa9,0xee,0x97,0xdb,0x29,0x99,0x80,0xeb,0x4b
,0x7b,0x10,0x09,0xa9,0x07,0xdd,0x31,0x43,0x29,0x1c,0x32,0xe0,0xbd,0x6c,0x18,0x0b
,0xd8,0x1a,0xf0,0x29,0xe4,0x8f,0xc9,0xb2,0x4a,0x73,0x92,0xe3,0xed,0x51,0x27,0x46
,0xaa,0x40,0x09,0xf8,0x5f,0x85,0xf5,0x4e,0xc5,0x02,0xb2,0x69,0xa0,0x1f,0x07,0x56
,0x8e,0xa1,0x5d,0xb2,0x8e,0x70,0x72,0x1f,0x82,0xae,0x84,0xca,0x10,0xb7,0xfb,0x76
,0xc7,0xf7,0x4c,0xe7,0xdd,0x9c,0x02,0x93,0xf2,0x4d,0x5b,0x8a,0xea,0xe5,0xf2,0x2b
,0x6b,0x11,0x03,0x51,0x53,0x48,0x3a,0x82,0xc1,0xdb,0x41,0xac,0xe9,0x60,0xad,0xee
,0x71,0x00,0x0d,0x00,0x14,0x00,0x12,0x04,0x03,0x08,0x04,0x04,0x01,0x05,0x03,0x08
,0x05,0x05,0x01,0x08,0x06,0x06,0x01,0x02,0x01,0x00,0x05,0x00,0x05,0x01,0x00,0x00
,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x10,0x00,0x0e,0x00,0x0c,0x02,0x68,0x32,0x08
,0x68,0x74,0x74,0x70,0x2f,0x31,0x2e,0x31,0x75,0x50,0x00,0x00,0x00,0x0b,0x00,0x02
,0x01,0x00,0x00,0x28,0x00,0x2b,0x00,0x29,0x0a,0x0a,0x00,0x01,0x00,0x00,0x1d,0x00
,0x20,0x21,0xc5,0xb3,0xe0,0x76,0x2f,0x57,0xe3,0xce,0x95,0xc7,0xed,0xf9,0xd0,0x07
,0xe5,0x17,0xfb,0x4c,0xef,0xe9,0xf6,0xdb,0xe7,0x8b,0xe6,0xdb,0xcf,0x43,0x77,0x56
,0x70,0x00,0x2d,0x00,0x02,0x01,0x01,0x00,0x2b,0x00,0x0b,0x0a,0xaa,0xaa,0x7f,0x12
,0x03,0x03,0x03,0x02,0x03,0x01,0x00,0x0a,0x00,0x0a,0x00,0x08,0x0a,0x0a,0x00,0x1d
,0x00,0x17,0x00,0x18,0x00,0x18,0x00,0x04,0x00,0x0a,0x01,0x02,0x3a,0x3a,0x00,0x01
,0x00,0x00,0x15,0x00,0x16,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
HttpsPkg hsp;
bool bok = hsp.Init(data);
if (!bok) {
cout << "init error" << endl;
return 0;
}
size_t aaa = hsp._high4bit(0xfc);
size_t bbb = hsp._low4bit(0xfc);
HttpsPkg::sData dat = hsp.GetVer();
size_t len = hsp.GetPkgLen();
dat = hsp.GetClientHello();
const char* type = hsp.GetHandShakeType();
len = hsp.GetClientHelloLen();
dat = hsp.GetClientHelloVer();
//
HttpsPkg::sData ext = hsp.GetExtension();
dat = hsp.FindExtention(ext, HttpsPkg::EXT_SERVER_NAME);
auto sn = hsp.ParserSerName(dat);
cout << "server name is : " << sn->name << endl;
dat = hsp.FindExtention(ext, HttpsPkg::EXT_RENEGOTIATION);
dat = hsp.FindExtention(ext, HttpsPkg::EXT_MASTER_SECRET);
dat = hsp.FindExtention(ext, HttpsPkg::EXT_SESSION_TICKET);
cout << "-------------------" << endl;
cout << "server name is : ";
cout << HttpsPkg::GetServerName(data) <<endl;
cout << "-------------------" << endl;
return 0;
}
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

各种测试
暂无标签
GPL-2.0
使用 GPL-2.0 开源许可协议
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/dzlua/test.git
git@gitee.com:dzlua/test.git
dzlua
test
test
master
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /