Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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

by zentara (Archbishop)
on Oct 08, 2012 at 11:03 UTC ( #997796=note: print w/replies, xml ) Need Help??


in reply to Sniffing a telnet session into a file ...

It also dawned on me last night that you don't need telnet to do this. In that train of thought, see Tk Realtime data aquisition

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh
  • Comment on Re: Sniffing a telnet session into a file ...

Replies are listed 'Best First'.
Re^2: Sniffing a telnet session into a file ...
by RedTussock (Acolyte) on Oct 11, 2012 at 05:40 UTC
    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.
      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://997796]
help
Chatterbox?
[marto]: List EXE_FILES installed by CPAN so a couple of people suggest that your code looks obfuscated. I'd have to ageree, from the perspective of those who can't follow all of that one liner, it doesn't read well
Veltro is a weirdo, obsessed with whitespace
[marto]: to use the word "obsession" when so few people have said so little about it is grasping at staws
marto wishes tye was around, he's so much better at this sort of thing
usemodperl likes tye!
usemodperl tye  too
[choroba]: Re^3: LiBXML: New markup while preserving earlier tags? would benefit from a couple of test cases
usemodperl meant tye 
usemodperl pokes Veltro with line noise
usemodperl will try to make better shapes with his line noise, like a camel, or boobs, then it will be called "clever" :-)

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2018-06-24 16:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (126 votes). Check out past polls.

    Notices?