Linux Fu: Shell Script File Embedding

You need to package up a bunch of files, send them somewhere, and do something with them at the destination. It isn’t an uncommon scenario. The obvious answer is to create an archive — a zip or tar file, maybe — and include a shell script that you have to tell the user to run after unpacking.

That may be obvious, but it assumes a lot on the part of the remote user. They need to know how to unpack the file and they also need to know to run your magic script of commands after the unpack. However, you can easily create a shell script that contains a file — even an archive of many files — and then retrieve the file and act on it at run time. This is much simpler from the remote user’s point of view. You get one file, you execute it, and you are done.

In theory, this isn’t that hard to do, but there are a lot of details. Shell scripts are not compiled — at least, not typically — so the shell only reads what it needs to do the work. That means if your script is careful to exit, you can add as much “garbage” to the end of it as you like. The shell will never look at it, so it’s possible to store the payload there.

Continue reading “Linux Fu: Shell Script File Embedding”

Repairing A Capacitor Inside A Potted Transformer

We always enjoy watching [Mr. Carlson’s] videos because he looks like he is taping in a rocket ship set from a 1950s drive-in movie. In a recent video, he identified an old oscilloscope that had a transformer assembly that is potted with a pair of capacitor inside. The capacitor failed so [Carlson] decided he would repair it. The problem? The transformer and capacitor are potted together with some sort of tar compound. You can see the result in the video below.

He actually didn’t know for sure the capacitor was really in the transformer, but they were in the schematic and by process of elimination, it had to be inside. Once he liberated the transformer, he did some tests to identify the capacitor before the depotting. The depotting takes a lot of heat and could damage the transformer, so he wanted to make sure it was really in there.

Continue reading “Repairing A Capacitor Inside A Potted Transformer”

Mechanisms: Mechanical Seals

On the face of it, keeping fluids contained seems like a simple job. Your fridge alone probably has a dozen or more trivial examples of liquids being successfully kept where they belong, whether it’s the plastic lid on last night’s leftovers or the top on the jug of milk. But deeper down in the bowels of the fridge, like inside the compressor or where the water line for the icemaker is attached, are more complex and interesting mechanisms for keeping fluids contained. That’s the job of seals, the next topic in our series on mechanisms.

Continue reading “Mechanisms: Mechanical Seals”

Hackit: Researchers Wait 69-years To See Tar Move

69-year-science-experiement

This experiment was started at Trinity College Dublin way back in 1944. Its purpose is to prove that tar flows, and indeed it does let go of a drop about every ten years. The thing is that nobody has ever seen that happen, bringing up the “if a tree falls in the forest” scenario. The Nature article on this event even mentions another experiment whose last drop was missed because the camera monitoring it was offline. This time around they did get some footage of the (un)momentous event which you can see below.

So here’s the challenge for clever hackers: What’s the easiest rig you can think of that won’t just continuously film the experiment but can also ensure that you get the goods on tape when a drop does fall? We see all kinds of high-speed shutter triggers — here’s one of the latest. But we don’t remember seeing an extremely slow version of the same. Let us know your idea by leaving a comment.

Continue reading “Hackit: Researchers Wait 69-years To See Tar Move”