sane-project-website/old-archive/1998-10/0251.html

93 wiersze
4.6 KiB
HTML

<!-- received="Fri Oct 23 01:43:28 1998 PDT" -->
<!-- sent="Fri, 23 Oct 1998 09:29:21 +0100 (BST)" -->
<!-- name="Jon Knight" -->
<!-- email="jon@net.lut.ac.uk" -->
<!-- subject="Re: parallel port scanner support" -->
<!-- id="" -->
<!-- inreplyto="36273555.CD3E5A1D@switzerland.org" -->
<title>sane-devel: Re: parallel port scanner support</title>
<h1>Re: parallel port scanner support</h1>
<b>Jon Knight</b> (<a href="mailto:jon@net.lut.ac.uk"><i>jon@net.lut.ac.uk</i></a>)<br>
<i>Fri, 23 Oct 1998 09:29:21 +0100 (BST)</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#251">[ date ]</a><a href="index.html#251">[ thread ]</a><a href="subject.html#251">[ subject ]</a><a href="author.html#251">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0252.html">Dr. Andreas Bolsch: "Re: 6000SP: open of device /dev/dg0 failed, invalid argument"</a>
<li> <b>Previous message:</b> <a href="0250.html">Christian Bucher: "Re: Epson GT-300, scanimage results"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
On Fri, 16 Oct 1998, Marco Foglia wrote:<br>
<i>&gt; Is it possible to monitor the parallel port with a second computer to</i><br>
<i>&gt; obtain information about the protocoll?</i><br>
<i>&gt; </i><br>
<i>&gt; I attached a second computer to the pass-through parallel port</i><br>
<i>&gt; of the scanner.</i><br>
<i>&gt; </i><br>
<i>&gt; [ Sniffer] &lt;----[Scanner]&lt;----&gt;[Win]</i><br>
<i>&gt; </i><br>
<i>&gt; While scanning under Win95 with one computer, the other was</i><br>
<i>&gt; able to get "some" data form the parallel port. I am really not an</i><br>
<i>&gt; expert in hardware. So i dont know whether this data ist usefull</i><br>
<i>&gt; or not.</i><br>
<p>
I would guess that it would depend to some extent on the scanner but I<br>
would not expect to get much information from many scanners this way. My<br>
reasoning is that the pass-through port of the scanner is intended to pass<br>
parallel port comms *not* intended for the scanner along to other devices.<br>
I would assume that if the comms are intended of the scanner, the scanner<br>
would process them itself and not pass anything on to the pass-through<br>
port. Similarly any protocol responses from the scanner to the PC would<br>
probably not appear on the pass-through port.<br>
<p>
I would think that it *might* be possible to do some sort of "man in the<br>
middle" attack on the protocol by having a second sniffing PC placed<br>
between the scanner and the Windows PC:<br>
<p>
[scanner]&lt;----&gt;[sniffer]&lt;----&gt;[WinPC]<br>
<p>
Quite how to do this is something I've been pondering myself. What I'd <br>
really like is about 16 input lines on the sniffer PC (no need for any<br>
output lines), which is stretching even two normal parallel ports. You<br>
might be able to do some sort of neat tricks with ECP/EPP ports if the<br>
scanner and the PC are talking using these but I'd guess it might get a<br>
bit icky. Ideally you'd want 16 (or more!) input lines, with a hardware<br>
buffer and the ability to clock in all 16 into the buffer any time one of<br>
them changed (or at least sufficiently fast that you can watch any<br>
protocol exchanges. Maybe if you could just decode the ECP or EPP<br>
protocol to work out the direction of data travel you could get away with<br>
10 inputs (8 bits of data, 1 bit for direction of travel and 1 for a<br>
"clock" so that you know when you have valid data).<br>
<p>
I wonder how the parallel port ZIP drive protocol was decoded? Any<br>
suggestions folks?<br>
<p>
Tatty bye,<br>
<p>
Jim'll<br>
<p>
#!/usr/bin/perl -- -Whois++-client-in-6-lines-of-Perl -Beat-that-Z39.50! <br>
use IO::Socket;sub w{$f=shift;$a{$f}=1;($h,$p,$q)=split("/",$f);$s=<br>
IO::Socket::INET-&gt;new(PeerAddr=&gt;"$h:$p")||return;print $s "$q\r\n";while(&lt;$s&gt;)<br>
{next if(/^%/);if(/^# SERVER-TO-ASK/){while(&lt;$s&gt;){$x=$1 if/Name: (.*)\r\n$/;$y<br>
=$1 if/Port: (.*)\r\n$/;$f="$x/$y/$q";@j=(@j,$f)if(/^# END/&amp;&amp;!$a{$f})}}else{<br>
print}}close($s)}@j=shift;while(@j){w(pop(@j))}# whois++.pl host/port/query<br>
<p>
<p>
<pre>
--
Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a>
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0252.html">Dr. Andreas Bolsch: "Re: 6000SP: open of device /dev/dg0 failed, invalid argument"</a>
<li> <b>Previous message:</b> <a href="0250.html">Christian Bucher: "Re: Epson GT-300, scanimage results"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>