#1017804 RFP: pw -- interactively filtered pipe watcher

#1017804#5
Date:
2022-08-20 19:17:52 UTC
From:
To:
* Package name    : pw
  Version         : 2
  Upstream Author : Kaz Kylheku
* URL             : https://www.kylheku.com/cgit/pw/
* License         : BSD-2
  Programming Lang: C
  Description     : interactively filtered pipe watcher

pw can monitor anything that produces textual output. tail -f
/var/logfile, tcpdump, strace, ...

pw does not show you everything. Of course, it reads all the data, but
it does that in the background. It continuously pumps lines of input
through a small FIFO buffer. This buffer is sampled, and the sample is
displayed. When that sampling occurs is controlled in various
interactive ways. What goes into the FIFO can be filtered and the
filters can be edited interactively.

With pw you can:

 * Interactively apply and remove filters on-the-fly, without
   interrupting the source.

 * Make recurring patterns in the stream appear to "freeze" on the
   screen, using triggers.

 * Prevent the overwhelming amount of output from a program from
   flooding the terminal, while consuming all of that output so that
   the program isn't blocked. pw can pause its display updates
   entirely.

 * Juggle multiple shell background jobs that produce output, yet
   execute indefinitely without blocking. When pw runs as part of a
   shell background job, it continues to consume input, process
   filters and take snapshots, without displaying anything. When put
   into the foreground again, display resumes.

For instance the command "tcpdump -i <ethernet-device> -l | pw" turns
tcpdump into an interactive network monitoring tool in which you can
use the dynamic filtering in pw to select different kinds of packets,
and use the trigger feature to capture certain patterns of
interaction.

pw is like an oscilloscope for text streams. Digital oscilloscopes
sample the signal and pass it through a fifo, which is sampled to the
oscilloscope screen, and can trigger the sampling on certain
conditions in the signal to make waveforms appear to stand still. pw
does something like that for text streams.
----

I am rather intrigued by this program. It's the sort of "swiss army
knife" kind of tool that kind of makes no sense until you find a
purpose for it. I've been trying to figure out where this tool fits in
my toolbox and, just today, I was trying to find out what this silly
Purism Librem firmware upgrade tool was doing in the background, with
`ps axfu`. But I was having all this garbage out there, and it was
hard to filter things out properly. I might have been able to pull
something out with `watch`, but I think pw might have been better for
this particular case. I'm also quite interested in using it to analyse
logs or packet dumps during attacks or outages.

Another similarly named package, already in Debian (and maintained by
yours truly) is `pv`, the "pipe viewer". But it has a completely
different function; whereas pw shows you the content of the pipe in a
specific way, pv just counts lines or bytes going through it,
specifically without showing you its content.

There is another tool similar to "watch" that overlaps with this a
little bit:

https://github.com/sachaos/viddy

... it's basically the "watch" command with history. It supports
searching (which pw does, and probably better) and going back in
history (which pw does not). I had a hard time finding that package
name again, for what that's worth...

I suspect I could also forget the name `pw` quite quickly, but by
packaging it, I guess I'm more confident I will forget it less. :p
Probably the worst reason to package something ever, but there you go,
that's how I ended up maintaining pv in the first place, so probably
that means.. uh... something good something.

#1017804#14
Date:
2022-08-20 20:18:18 UTC
From:
To:
Hmm... isn't it a little rude to close a bug report without notifying
the owner/author of why you did so?

Furthermore, I looked at #903814 the ITP which you claim to be the same
as this one, and it's not the same program. This is "pipewatch" and
#903814 is "password manager".

Obviously, maybe there's a namespace clash here, but is that supposed to
be resolved in the WNPP / BTS, even before any one of those packages is
packaged at all?

Furthermore, it looks like the password manager project is abandoned
now:

https://github.com/dashohoxha/pw

.. so I doubt we want that in the archive anyways.

#1017804#21
Date:
2022-08-20 20:52:15 UTC
From:
To:
I have made some progress on the package and pushed what i have on
salsa:

https://salsa.debian.org/debian/pw

upstream's makefile is a little... odd. the manpages are executable and
it doesn't seem like we have a working PREFIX (manpages are in
/share). but all stuff that's kind of easy to fix.

a.

#1017804#26
Date:
2022-08-21 03:09:03 UTC
From:
To:
source code to ensure it's not just a total backdoor. Then up to
experimental, if I actually like what the thing does... I still have to
run this in prod! ;)

The base commit to audit is on salsa, it's:

commit 750414a11255d23771f833d12b487d753fcdd346 (origin/master, origin/HEAD, master)
Author: Kaz Kylheku <kaz@kylheku.com>
Date:   Mon Jul 4 08:32:10 2022 -0700

    Add LICENSE file.

a.

#1017804#31
Date:
2022-08-22 18:33:09 UTC
From:
To:
Antoine Beaupre dijo [Sat, Aug 20, 2022 at 03:17:52PM -0400]:

Might I suggest the name "pipewatcher" or "pipewatch"? Two-letter-long
package names abuse the namespace. Maybe the installed binary, yes,
can remain pw (I think I'd use it quite often, less typing is good),
but you should think it calmly :-]

The whole thing looks _quite_ interesting! I hope you do get to
package it. And, given I know your inclinations.. Once you do, please
blog so we all remember to download it, test it, and add it to our
toolbelt!

#1017804#36
Date:
2022-08-22 18:33:09 UTC
From:
To:
Antoine Beaupre dijo [Sat, Aug 20, 2022 at 03:17:52PM -0400]:

Might I suggest the name "pipewatcher" or "pipewatch"? Two-letter-long
package names abuse the namespace. Maybe the installed binary, yes,
can remain pw (I think I'd use it quite often, less typing is good),
but you should think it calmly :-]

The whole thing looks _quite_ interesting! I hope you do get to
package it. And, given I know your inclinations.. Once you do, please
blog so we all remember to download it, test it, and add it to our
toolbelt!

#1017804#41
Date:
2022-08-22 18:51:43 UTC
From:
To:
name. The first time was bartm that closed this issue linking to
#903814, which is another "pw" but completely different project. So I
dismissed that objection based on the fact that the other project is
actually abandoned.

But now you're making the argument we shouldn't have a project name with
just two letters. Yet it's how upstream calls it in the URL and in their
documentation. I think it would be confusing for users to call the
(binary) package differently. After all, I have also packaged `pv` in
the same way and people haven't (yet?) requested that I rename that
package `pipeviewer`.

I don't buy the ground rule of "two letter package names abuse the
namespace" though, what's the background on that? Is that official
policy?

I understand the concern, that said: it's possible there is a clash in
the future. I think it's a bridge we should cross when we get there
though.

I will probably get around packaging it, but not before I audit and fuzz
it thoroughly. I'm not sure I'll find the time to blog about it, and
assume people are keeping dilligent tabs on new packages that come into
Debian anyways... ;)

a.

#1017804#46
Date:
2022-11-19 22:39:33 UTC
From:
To:
Hey There,

Your information out of your devices was duplicated to my personal storage space with a help of my bespoken virus via the wireless network, I was able to gain access to your computer thru the wireless gadget you have been linked to, a couple weeks ago & I currently have all the online passwords and admission to your social networks e-mail, contact information, etc.

The driver kind along with its additional fingertips regularly changes and is not trackable nor it's visible by other antivirus software.
But that's not all, I also have an access to your web cam in addition to your browser history and what's occurring in your computer screen. And so I noticed that you really love to visit some adult web sites & you do that quite frequently and you probably currently realize exactly why I waited this long to message you. Hence anyway I pasted a few of your jerking video footage together with the display screen footage & right now I need an academy award. It is currently up to you to be able to determine if this video along with a lot of your confidential info will be shared with all of your contact information social network close friends or maybe not. I'm thinking that this really can ruin your status.

But there is definitely the right way to fix this matter: You'll need to send me 1100 $ (USD) using BTC (equivalent at the day of the trade it self).
When this will happen I guarantee to erase your entire data from my web hosting space & leave you alone.
My BTC transaction address: 36BCyN9PswStZSnSk1c2Zd6dxYkCUicWfB
Simply search on-line how to purchase or forward btc if you do not know-how.
It's a tracable text & i'll find out once it's open. The address is likewise not tracked and there isn't any point in responding to me. You got right now 2 days from the time you read it to transmit me the finances.

Your data will likely be released to people if you attempt to get hold of law enforcement or find additional third party solutions, & there's furthermore no reason for altering online passwords to your social media networking, devices, or whichever, as I've already downloaded every single thing to the host.

It's now your decision to either act dumb or consider your feasible destiny and act wise.