Coder Social home page Coder Social logo

Live decoding? about iridium-toolkit HOT 1 CLOSED

muccc avatar muccc commented on June 17, 2024
Live decoding?

from iridium-toolkit.

Comments (1)

Sec42 avatar Sec42 commented on June 17, 2024

This is more of a python/unix question & not really related to the iridium-toolkit.

Most programs on unix behave specially when their output is a terminal - Terminal output is usually "line buffered" i.e. the output is flushed/printed at each newline. Whereas for pipes you have the some (larger) standard buffer. On Linux it is about 64k bytes these days, i think.

So while piping there needs to be a larger amount of output before it is "flushed" and sent to the next program.

So your pipe should work as it is, but will only send output to udp-for-il.py in larger batches, which may - depending on the amount of traffic you see - take quite some time.

Different programs on unix have command line options to address this issue. For example for grep it is:

   --line-buffered
          Use line buffering on output.  This can cause a performance penalty.

For python one can use the -u option as shown in man python:

   -u     Force the stdout and stderr streams to be unbuffered.  This option has no effect on the stdin stream.

so your pipe would need to look like .... | python -u reassember.py -m sbd | udp-for-il.py

Technically, the same issue happens with iridium-parser.py in your pipeline, but as that one produces far more output, it is less noticable.

from iridium-toolkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.