• 2022
  • Oct
  • 17

Deleting bad files in Windows

Windows can be quite the turd at times. For example, while it enforces a 255 character limit on a file (both path and name,) it will still happily allow programs like Chrome to save filenames that can be overly long, or even full of invalid characters. You’re left with a file that you can’t delete - or even rename - because it’s invalid to Windows.

The easiest way around this, assuming you have admin access to the computer in question, is to install 7zip.

7zip is a cross-platform archiver that supports it’s own native format, supports archive/unarchive of a number of other formats, and can unarchive just about anything under the sun. (Sorry CP/M’ers, I think SQ is too old for even this program to handle!)

Download 7zip from it’s homepage, 7-zip.org

Once you install 7zip, open the file manager interface that comes with the program and navigate to your bad file. You can delete it right from the interface, as it ignores standard windows conventions and does what it’s instructed - which is what it should do!

I use 7zip for pretty much all archiving purposes, even letting it overwrite the native zipper in Windows. It’s just that useful.

7ziplogo.png

  • 2022
  • Oct
  • 11

StatusNet: Sending email instead of SMS with a new post?

What are you talking about?

If you’ve been around for a while, you’ll remember the birth of Twitter and the open-source clones that came out shortly after. While those clones are still useful, the Internet has become weaponized and services that worked because we had more trust now no longer work as intended.

This article is about StatusNet and it’s ability to send a SMS whenever someone posts a status to a timeline you follow. It uses the email gateway provided by most carriers to deliver a message to you - that is, it simply sends an email to “yourphonenumber@yourphonecompany.com.” In theory, anyway. These gateways now have a very suspicious eye when receiving messages containing links or other words that hurt the carrier’s feelings. They’re all but useless these days, and part of that is due to the ease at which spam can be delivered to your phone.

StatusNet in itself still does the same thing it did back when the last releases were made. We’re still using it for this reason, and because it’s visually more appealing than the lotsawhitespace Gnu Social that followed. It’s probably not something that you should expose to the outside world unless it’s on a low value server, however, as it is over 10 years old.

Yeah, so?

As mentioned, StatusNet can send an SMS any time your timeline is poked. However, this is just an email. Why not modify that so instead of sending an SMS instantly after a status is posted, it sends you an email instead?

That’s perfectly doable, and it’s all but transparent to the StatusNet instance.

This involves poking around in and editing your StatusNet database. In particular, we’re interested in the sms_carrier table. I’m using phpmyadmin because it’s easy to make these changes, but you’re free to use what tool you like. I assume you installed the instance yourself - if not, this may not make sense to you. I’m not going to talk about how and where databases and other files are in this post - if you’re not sure where those are then this isn’t going to be of any use to you.

Open your database by selecting whatever you called it, then navigate to the sms_carrier table. We’re going to make two changes for each of the entries we want to add to our instance. Pick the row you want to edit, and click “Edit.” You’ll be on the screen with all of the things you can change about this entry. (You can also do inline edit, but I like to bring up the full edit screen.)

There are two ways you can do this. Either put a complete email address in as an entry, or use the built-in variable and patterns to allow multiple users with the same domain to enter addresses.

If you want to simply add a complete email address:

The first thing we want to do is give it a useful name: In the “name” field, under the “Value” column (last one) delete what’s there and type something that is meaningful to you. Next, in “email_pattern,” delete what’s in the “Value” column and type your complete email address. Do not modify any other value or function. When you’re happy with the changes, hit “Go” to save it. The StatusNet code will happily ignore the “number” you gave it and send to the email address provided. If something was messed up, hit the “Reset” button.

change.png

If you’re running a multi-user instance, I don’t suggest doing this. Any person using the instance can select your email. They can’t verify it because they don’t have access to it, but they can still select it and try to attach it to their account. A better method is to use the patterns provided by the original programming.

If you want to use the patterns:

You still want to give it a useful name, and for this example we’ll use “gmail.” Delete what’s in the “name” field under the “Value” column and type “gmail.” In the “email_pattern” field, we need to make sure we give it the proper information. You’ll see something like “%s@phonecompany.com” - replace the “phonecompany.com” with “gmail.com” - you should have “%s@gmail.com.” This will allow StatusNet to fill in the “number” you give it later. Hit “Go” and save your changes, or “Reset” to clear and start over.

gmailphp.png

With both of these methods, make sure all of your changes are fully saved, and exit the tool you are using. Now we’ll go to the StatusNet instance in question and log in.

How do I get that email?

When you are logged in, click Connect at the top. You’ll get a screen showing your connected applications, of which you probably don’t have any. There will be two options to the side, SMS and Connections. Click SMS.

connect.png

sms.png

You have two options here, depending on how you set up your database changes:

You added a complete address.

pick the name you gave the address in the “Mobile Carrier” dropdown menu, type anything you want in the “SMS phone number” box (it doesn’t care because we deleted that variable) and hit “Add.” It will process for a bit, then you’ll end up at the screen asking for your confirmation code.

You added a domain only.

In this case, chose the domain you want in the “Mobile Carrier” dropdown menu and type the username portion of your address in the “SMS phone number” box. For example, if your address is “mygmailaddress@gmail.com,” pick “gmail” (assuming you called it that,) and type “mygmailaddress” in the phone number box. Hit add, and you’ll end up at the screen asking for your confirmation code.

gmail.png

If you did everything correctly, you’ll have an email waiting for you with a confirmation code in it. Paste that in the box, hit “Confirm,” and you’re done. Now you can go back to Connect > SMS and select the “Send me notices” checkbox under “SMS Preferences” to receive a notification every time someone posts to you or on your timeline.

number.png

confirm.png

If you don’t receive an email, check that your spam filter hasn’t trapped it due to the name or sender. It’s kind of unusual to get an email for an SMS confirmation, so mail systems may say “No.”

Both of these steps assume you have an email sender set up on your machine, it’s configured properly, the relay or service you’re using is configured properly, and your receiving email isn’t overly aggressive about looking for spam. If not, this isn’t going to work (obviously!)

It works?

So now, whenever someone posts a message that is on a timeline you’re following, you should get an email notification.

itworks.png

status_email.png

It works! There’s still a chance that your email provider can trap the message as spam, especially if there are links that look spammy. Whitelist the email these are being sent from, and you shouldn’t have any problems.

StatusNet itself is getting pretty old, and there aren’t many instances left out there. If you’re like me, and have a couple of internal systems under your control, this can restore some of the functionality lost over the past 10 years.

This is part 1 of a 2 part series about bringing StatusNet a little bit into the modern era. The next and final article will be about removing some of the identifying information to provide a little less of an attack surface should someone happen to run across your instance.

Now tell the little blue bird to get lost. We have some statuses to post!

  • 2022
  • Oct
  • 9

The SwitchBOARd, a general purpose I/O device using the ESP-03.

When I was spinning up a number of ESP-01 devices, and before I found out how much RF noise they put out, I started exploring some of the other devices that were available in the ESP family. Specifically, the ESP-02 (A SMT version of the ESP-01, hard to get) and the ESP-03.

This board was designed to be a general purpose I/O board where you could read or write three individual bits and monitor those bits for control or notification purposes. Specifically, this was designed as a door open/closed device for garages. The ESP-03 was chosen because it was small, had a built-in ceramic antenna, and had the required number of I/O pins. It also looks kind of cool.

The board featured an onboard programming port and switch, a regulated power supply with a temperature monitor for the regulator, and indicators for all of the I/O. If desired, a passthru for the power supply could be placed, as to provide power for another board of this series without needing a regulator and extra supply.

Ultimately, I never could get the ESP-03 to take a program properly, and had just started to investigate why when I found out how bad these devices were at 320MHz. This board is one of two prototypes I built, the other having been sacrificed to the prototype gods during troubleshooting. Some other WiFi devices have shown up on the market, so this board may live again someday.

The boar outline found it’s way on to other projects, including this blog - and this is where the main page gets it’s name: Red Boar Design.

switchboard.jpg

  • 2022
  • Oct
  • 5

Re-opened my github account.

Some time ago, I had a github account with a few projects on it. That was closed due to various reasons, but I’ve decided to open it again and replace some of the material that was there originally.

The repository is here, if you’d like to check it out.

pigpen.jpg

  • 2022
  • Oct
  • 4

The Fort Wayne (Indiana) Hamfest

The last one in the area that I usually attend, the Ft. Wayne show is indoors and doesn’t get rained out. It’s usually a good portion of the day show, and I’ve never regretted the drive.

http://www.acarts.com/hfmain.htm

The 50th Annual Fort Wayne Hamfest
November 19th and 20th, 2022
9A-4P Saturday, 9A-2P Sunday
Admission $8, Parking $8

Allen County War Memorial Coliseum
4000 Parnell Ave
Fort Wayne, IN 46805.

This one can’t get rained out! See you there.