如何使用CSharp捕获HTTPS和SFTP的传输文件名? [英] How to capture the transfer file name of HTTPS and SFTP by using CSharp?

查看:130
本文介绍了如何使用CSharp捕获HTTPS和SFTP的传输文件名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个文件传输监控系统。对于HTTP和FTP文件传输,监视端口80(HTTP)和端口21(FTP)以捕获文件传输信息没有问题。但是,对于SFTP(端口22)和HTTPS(端口443),由于加密,无法捕获文件名。

是否有任何方法可以捕获HTTPS和SFTP上的文件名和文件大小使用C#的协议?

非常感谢。

I am developing a file transfer monitor system. For HTTP and FTP file transfer, it no problem to monitor the Port 80(HTTP) and Port 21(FTP) to capture the file transfer information. However, for SFTP(Port 22) and HTTPS(Port 443),the file name cannot be captured because of the encryption.
Is there any approach to capture the file name and file size on HTTPS and SFTP protocol by using C#?
Thanks a lot.

推荐答案

我认为这是将传输置于HTTPS / SFTP下的整个想法:防止您的数据被嗅到。我认为更好的方法是扫描源或目的地,如果你有权访问。
I think that's the whole idea behind putting the transmission under HTTPS/SFTP: to prevent your data from being sniffed. I think a better approach would be to scan the source or destination, if you have access.


你不能。就这么简单。



除非您的应用程序是进行转移的应用程序,否则您无法获取有关转移的文件名或任何其他数据。你正试图成为加密防范的中间人!



事件真的不会帮助你,因为不是每个浏览器都暴露事件,并非每个浏览器都会公开您要查找的事件,并且您必须为要支持的每个浏览器编写特定功能。
You can't. It's that simple.

Unless your app is the one doing the transfer, you can't get the filename or any other data about the transfer. You're trying to be the "man in the middle" that encryption protects against!

Events really aren't going to help you because not every browser exposes events, not every browser exposes the events you're looking for and you'd have to write specific functionality for every browser you want to support.


这篇关于如何使用CSharp捕获HTTPS和SFTP的传输文件名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆