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 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作