嗅探LPT流量 [英] Sniffing LPT Traffic

查看:147
本文介绍了嗅探LPT流量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要拦截LPT输出流量.经过几个小时的研究,我了解到,唯一的方法是编写内核模式驱动程序,更确切地说是过滤器驱动程序" ...?

I need to intercept LPT output traffic. After a couple of hours of research, I've come to understand that the only way to do this is by writing a kernel-mode driver, more precisely a "filter driver"...?

我已经下载了WDK,但是术语和大量的驱动程序类型有点让人不知所措.

I've downloaded the WDK, but the terminology and vast number of driver types is a little overwhelming.

我基本上是想了解我应该写什么样的驱动程序.我的目标环境是Windows XP SP2和3个 only .

I'm basically trying to understand what kind of driver I should be writing; my target environment is Windows XP SP2 and 3 only.

一些重要的背景信息(如果有的话):我有一堆可打印到LPT1的旧版DOS应用程序.我希望能够捕获此输出并将此数据(在GDI调用之后)重定向到现代USB(网络)打印机.幸运的是,问题的后半部分很容易.

Some background info, if it matters: I have a bunch of legacy DOS apps that print to LPT1. I'd like to be able to capture this output and redirect this data (after GDI calls) to a modern USB (network) printer. Fortunately, the latter part of the problem's easy.

我希望有人能指出我正确的方向. TIA.

I'm hoping someone could point me in the right direction. TIA.

推荐答案

sysinternals.com伙计们编写了一个名为

The sysinternals.com guys wrote an application called Portmon which would let you see what was going to serial and parallel ports.

它已经使用了几年(最近一次更新是11/2006),但是它应该让您记录至少要进行一些研究所需的信息.

It's a few years old (11/2006 was the last update), but it should let you log what you need at least to do some of the research.

如果应用程序仅基于DOS,那么您应该能够编写一个在其他程序之前加载的TSR程序,并挂接打印中断调用,然后将其重定向到所需的位置.

If the applications are just DOS-based, then you should be able to write a TSR program that loads before the other program and hooks the print interrupt call, and redirect it to where you want.

您可能需要重新安装386汇编程序:)

You might have to brush up on your 386 assembler :)

这篇关于嗅探LPT流量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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