Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Sniffing a telnet session into a file ...

by RedTussock (Acolyte)
on Oct 11, 2012 at 05:40 UTC ( #998366=note: print w/ replies, xml ) Need Help??


in reply to Re: Sniffing a telnet session into a file ...
in thread Sniffing a telnet session into a file ...

Yep that is all fine and dandy ... but what I have coming in of the 1 wire network is multiple 1 wire devices with uynique ID's ... what is coming out the tcp port on 8891 from oww looks like

Smitty@smittytech:~> telnet localhost 8891 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 11/10/12 , 18:36:27 , ,�C , 6.87, KPH, South ,180.0 + , 8 , 0.00, mm 11/10/12 , 18:36:27 , ,�C , 6.00, KPH, SE ,135.0 + , 6 , 0.00, mm 11/10/12 , 18:36:30 , ,�C , 5.91, KPH, SSE ,157.5 + , 7 , 0.00, mm 11/10/12 , 18:36:32 , ,�C , 4.31, KPH, South ,180.0 + , 8 , 0.00, mm 11/10/12 , 18:36:34 , ,�C , 4.26, KPH, South ,180.0 + , 8 , 0.00, mm 11/10/12 , 18:36:37 , ,�C , 4.25, KPH, South ,180.0 + , 8 , 0.00, mm 11/10/12 , 18:36:39 , ,�C , 5.09, KPH, SW ,225.0 + , 10 , 0.00, mm 11/10/12 , 18:36:41 , ,�C , 4.16, KPH, SE ,135.0 + , 6 , 0.00, mm 11/10/12 , 18:36:44 , ,�C , 3.35, KPH, SW ,225.0 + , 10 , 0.00, mm 11/10/12 , 18:36:46 , ,�C , 4.21, KPH, SW ,225.0 + , 10 , 0.00, mm 11/10/12 , 18:36:48 , ,�C , 4.28, KPH, SSW ,202.5 + , 9 , 0.00, mm ^C^C
So I either need to kill oww and read the device of the net and do all the 1W net comms using a perl script and hand the result into your suggested send script. Clever idea ... but I need to go deeper into the network comms, which means reinventing a wheel.


Comment on Re^2: Sniffing a telnet session into a file ...
Download Code
Re^3: Sniffing a telnet session into a file ...
by zentara (Archbishop) on Oct 11, 2012 at 12:04 UTC
    I don't know what oww is exactly, a c program? If my assumption is correct, oww reads the 1w net and reports it out on port 8891. Maybe you should see if oww has options to just print out to STDOUT instead of port 8891, if so you could run it with some Perl IPC, like a piped open or Open3, then let Perl send it out on a regular socket connection.

    It may also be a McGiver hack, but you could have another Perl script on the oww machine to read port 8891, and relay it out a normal socket.

    Can you get the source code to oww? You could hack it to wtite to STDOUT.


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://998366]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2014-12-25 18:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (161 votes), past polls