douzhong2954 2018-06-14 07:35
浏览 74

go_lang中的“制作” TLS客户端Hello

I am new in the go programming language and I am crafting Ethernet frames myself with the "gopacket" library of Google. I have successfully implemented basic TCP functionality in userspace for educational purposes and I can successfully initiate 3-way-handshakes with Webservers.

Now I would like initiate a TLS handshake on top of this and my problem is that all existing TLS libraries in go use sockets or the Conn interface to initiate TLS connections. Is there some easy way to craft a raw TLS Client Hello message in go that I could use as a payload for my TCP segments?

I do not want to implement fancy things like data transmissions or whatever. It is enough if I would be able to send a Client-Hello to a server and see what the reply looks like before ending the connection.

Thank you for any advices you may have for a newbie in go. :-)

  • 写回答

2条回答 默认 最新

  • dtpt75860 2018-06-14 08:45
    关注

    I'd say one way would be to mock a Conn you feed to the TLS library so you can intercept the calls and forward/relay them or... you do this the manual way by looking at for example handshake_client.go and copy whatever you need (the methods it contains are sadly private only).

    Personally I'd probably go for the Conn approach.

    评论

报告相同问题?

悬赏问题

  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
  • ¥15 Arduino无法同时连接多个hx711模块,如何解决?