I'd like to redirect traffic from and to USB devices in an application. Particularly I want to talk to USB dongles.
我想将流量重定向到应用程序中的USB设备。特别是我想谈谈USB加密狗。
So for example if a dongle is connected on a USB port, is it possible to get the traffic that is intended to be written to this device? On the other hand, can you simply write data in the same manner?
因此,例如,如果加密狗连接在USB端口上,是否可以获得要写入此设备的流量?另一方面,您可以简单地以相同的方式写入数据吗?
I don't have any experience so I'd appreciate to get some directions.
我没有任何经验,所以我很乐意得到一些指示。
BTW, this is not intended to be used in anything illegal ;-)
顺便说一下,这不是用于任何非法的;-)
1 个解决方案
#1
1
With "USB dongles" you mean: Software license dongles?
使用“USB加密狗”是指:软件许可证加密狗?
First of all you should know that USB is not a stream of data such as RS232 but a very complex bus transferring a lot of different control and data messages.
首先,您应该知道USB不是RS232这样的数据流,而是一个非常复杂的总线传输大量不同的控制和数据消息。
On Linux you can use Wireshark to monitor the data on the USB bus. There are similar tools for Windows (up to Windows XP only) but the Windows version of Wireshark does only support Ethernet and not USB. Windows 7 has a built-in command line tool that does the same job.
在Linux上,您可以使用Wireshark来监控USB总线上的数据。有类似的Windows工具(仅限Windows XP),但Windows版本的Wireshark仅支持以太网而不支持USB。 Windows 7具有内置命令行工具,可以执行相同的工作。
If you really want to redirect data you might use something like "usbip" that allows sharing USB ports over network. You may simulate an USB dongle device by programming a server that simulates the dongle... However doing this is very tricky and requires a lot of programming experience!
如果您真的想要重定向数据,可以使用“usbip”之类的东西,允许通过网络共享USB端口。您可以通过编程模拟加密狗的服务器来模拟USB加密狗设备......但是这样做非常棘手,需要大量的编程经验!
#1
1
With "USB dongles" you mean: Software license dongles?
使用“USB加密狗”是指:软件许可证加密狗?
First of all you should know that USB is not a stream of data such as RS232 but a very complex bus transferring a lot of different control and data messages.
首先,您应该知道USB不是RS232这样的数据流,而是一个非常复杂的总线传输大量不同的控制和数据消息。
On Linux you can use Wireshark to monitor the data on the USB bus. There are similar tools for Windows (up to Windows XP only) but the Windows version of Wireshark does only support Ethernet and not USB. Windows 7 has a built-in command line tool that does the same job.
在Linux上,您可以使用Wireshark来监控USB总线上的数据。有类似的Windows工具(仅限Windows XP),但Windows版本的Wireshark仅支持以太网而不支持USB。 Windows 7具有内置命令行工具,可以执行相同的工作。
If you really want to redirect data you might use something like "usbip" that allows sharing USB ports over network. You may simulate an USB dongle device by programming a server that simulates the dongle... However doing this is very tricky and requires a lot of programming experience!
如果您真的想要重定向数据,可以使用“usbip”之类的东西,允许通过网络共享USB端口。您可以通过编程模拟加密狗的服务器来模拟USB加密狗设备......但是这样做非常棘手,需要大量的编程经验!