简体   繁体   English

通过套接字发送的python数据包是否为明文?

[英]Are python packets sent over sockets clear text?

标题几乎描述了这个问题:如果我发送的数据包中包含一些我不知道的内容,从一个python程序到另一个,如果黑客在网络上嗅探数据包,他们将能够看到包的内容?

If you use a plain TCP or UDP socket then the data you write into this socket are transferred in clear on the wire and can be sniffed unless the OS employs encryption at the network layer or lower layers, ie VPN technologies like IPSec, OpenVPN or similar. 如果使用普通的TCP或UDP套接字,则写入该套接字的数据将以明文形式传输到网络上,并且可以被嗅探,除非操作系统在网络层或更低层使用加密技术,例如IPSec,OpenVPN等类似VPN技术。

If instead you are using an SSL wrapped socket then the data will be encrypted inside the application and thus protected against sniffing provided that the SSL socket was created with secure settings (strong ciphers, proper certificate validation). 相反,如果您使用的是SSL包装的套接字,则该数据将在应用程序内部进行加密,从而可以防止嗅探,前提是该SSL套接字是使用安全设置(强密码,适当的证书验证)创建的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM