IMDb Movie Title Parser in Bash

June 20, 2022

Originally published June 20, 2019 @ 7:13 pmThis is an update to the IMDb parser I wrote years back. From time to time IMDb makes small changes to their setup that break my script. This time they decided to start blocking curl, or so it would seem. Even using a…Read More

Sending Windows Logs to Remote Syslog

June 12, 2022

Originally published June 12, 2019 @ 8:43 pmNothing fancy here: just a quick note on directing Windows event logs and select application logs to a remote syslog server. For a Unix admin, searching Windows logs is a frustrating experience. Just looking at the event viewer GUI hurts my eyes. One…Read More

Plugging iPhone’s Privacy Holes

May 31, 2022

Originally published May 31, 2019 @ 9:23 pmMany recent publications 1, 2, 3 suggest the iPhone is full of security holes threatening your privacy. The threat seems to be coming not so much from the phone’s operating system, but from the apps, you installed on it. Indeed, monitoring my iPhone…Read More

Squeezing Video Files

May 14, 2022

Originally published May 14, 2019 @ 1:59 pmAll that crap I’ve been saving from YouTube, Facebook and whatnot tends to add up. As quality is not a huge concern here (not that it was very high to begin with), optimizing those video files can recover a surprisingly significant amount of…Read More

Finding Passwords in Logs and Shell History

April 25, 2022

Originally published April 25, 2019 @ 8:12 pmSooner or later it will happen: you type something after which you expect a password prompt then, as a reflex, you type the password. However, you fat-fingered the first command, and your password ended up in clear text in your shell history, likely…Read More

Controlling Your Laptop’s Fan Noise

April 18, 2022

Does your laptop sound like a fully-loaded B-52 bomber going for a takeoff? I have a Dell XPS-15. These generally well-regarded machines are also known for making excessive cooling fan noise even when not under load. The issue is the “active” cooling scheme in Windows that kicks in whenever your…Read More

Anatomy of Internet Bullshit

April 13, 2022

Originally published April 13, 2019 @ 11:38 pmHere’s an oldie from two years ago that reared its ugly head on Pocket: Starting Your Day on the Internet Is Damaging Your Brain, by Srinivas Rao. The author presents his personal opinion that reading stuff online in the morning is damaging your…Read More

Late Night Rant: College Admissions Scandal

April 9, 2022

Originally published April 9, 2019 @ 9:43 pmThis is America: you’re either a duper or a dupee. I’m a duper. You guys are the dupees. — Frank Reynolds (Danny DeVito), It’s Always Sunny in Philadelphia How will the 2019 college admissions scandal work out? Likely to the best interest of…Read More

Adding and Removing sshd instances on CentOS 7

April 3, 2022

Originally published April 3, 2019 @ 10:36 amAs a follow-up to my previous post about adding sshd instances on CentOS 5 & 6, here’s a script that does the same on RHEL/CentOS 7. The script still checks for iptables and if it is active, will add a rule to accept…Read More

Adding and Removing sshd instances on CentOS 6

March 26, 2022

Originally published March 25, 2019 @ 8:46 pmThis is a process and a couple of script to allow you to setup an additional sshd service on an alternate port. The two scripts below are for CentOS/RHEL 6, but they can be easily adapted for the current versions. The new script…Read More

Creating a Chroot Jail for SSH Access

March 25, 2022

Originally published March 25, 2019 @ 5:09 pmJust a quick collection of notes on – rather than a definitive guide to – setting up an SSH chroot jail on RHEL 6. The same should work on RHEL 7 and unrelated flavors. For the most part. Similar to FTP, the SSH…Read More

Late Night Rant: Facebook

March 23, 2022

Originally published March 23, 2019 @ 1:22 amAccording to media reports, since 2012, millions of Facebook and Instagram logins and plaintext passwords have been sitting on some internal Facebook system, accessible by  thousands of the company’s employees. This wasn’t just discovered: many Facebook employees knew about this data for years…Read More

Notes on ownCloud configuration

March 22, 2022

Originally published March 22, 2019 @ 11:22 pmThe ownCloud file sharing application has been around for some time now, but somehow evaded my attention. My limited imagination makes me say “think of it us Dropbox hosted on the server in your basement”. Of course, it is much more than that.…Read More

GPG Encryption QSG

March 4, 2022

It always seems that just enough time has passed since the last time I worked with GnuPG for me to forget not just the exact syntax of these commands completely but the workflow in general. Here are some basics about using GnuPG and managing keys. If you need to know…Read More

Encrypting Log Data During Log Rotation

March 1, 2022

Originally published March 1, 2019 @ 11:54 amMost log files do not contain personally-identifiable information or other sensitive data. And even if they do, encryption of all personal data is not mandatory under GDPR. Still, on occasion, for testing and troubleshooting purposes you may want to log potentially sensitive information.…Read More

DevOps Obfuscation

February 10, 2022

Originally published February 10, 2019 @ 1:43 pmSome years ago I’ve been reading “DevOps in Straight English” by Magnus Hedemark 1 and encountered the Release Frequency vs. Risk chart that supposedly illustrated the advantages of DevOps. It seemed convincing enough to not give it a second thought. The other day I’ve…Read More

The Unix Oriental

February 1, 2022

Originally published February 1, 2019 @ 12:42 amPlaced quite appropriately in the “Security” category – my favorite Oriental cocktail recipe. Distinguishing it from the classic preparation, are absence of sweet vermouth and lime juice, as well as addition of just a couple of humble but crucial ingredients. Without any doubt,…Read More

Gnuplot with Bash

January 31, 2022

Originally published January 31, 2019 @ 12:12 amOK, so both of these things have been around forever and will be around long after we’re gone. It’s worth your time to learn how to use the to together. Frequency Histogram I have a DHCP server that logs to /var/log/messages. Relevant lines…Read More

Multi-Dimensional Arrays in Bash

January 29, 2022

Originally published January 29, 2019 @ 12:58 amBash does not support multi-dimensional arrays, but there is a way to imitate this functionality, if you absolutely have to. As a quick example, here’s a data table representing a two-dimensional array.   1 2 3 a1 n1 n2 n3 a2 m1 m2…Read More

Asciinema Notes

January 28, 2022

Originally published January 27, 2019 @ 9:36 pmAsciinema is an awesome tool for recording your console sessions. It’s great for documenting processes and, in general, showing people how shit works: one look is worth a thousand words, as they say. Unfortunately, I don’t use asciinema often enough to remember the…Read More

File Compression Testing

January 27, 2022

Originally published January 27, 2019 @ 5:01 pmFor some reason I haven’t used zip much on Linux, sticking to the standard tar/gzip combo. But zip seems to be a viable alternative. While not as space-efficient, it is definitely faster; syntax is simple; and, if you need to share the archive…Read More

Measure DNS Server Performance

January 10, 2022

Originally published January 10, 2019 @ 6:35 pmThis is not an entirely proper way to benchmark a DNS server, but, in a pinch, it should give you some idea of its responsiveness and stability. The commands below require dig (provided by the bind-utils package), and shuf (provided by the coreutils…Read More

The Facebook Fracas

December 22, 2021

Originally published December 20, 2018 @ 10:31 pmThe Facebook privacy saga is getting ridiculous. You’re using a free service that you signed up for – nobody was holding a gun to your giant head. And it’s not Gulag either: just delete your profile, uninstall the damned app, and forget Facebook…Read More

Killing Process Network Access

December 21, 2021

Originally published December 19, 2018 @ 6:32 pmImagine this scenario: a particular process on your server is connecting to a host outside your internal network and you don’t like that. On the other hand, you can’t just kill that process because you need it. The simple script below uses tcpkill…Read More

Generating and Running Multiple Scripts

December 20, 2021

Originally published December 19, 2018 @ 5:41 pmAdmittedly, this has a limited range of practical applications and is more of a scripting exercise. The command shown here generates a bunch of temporary scripts each containing the sleep command for up to one minute. The scripts are ran in the background…Read More