Categories
Linux Networking Programming

Sending an email via Microsoft O365 SMTP Servers using Python

This is a simple script to send an email via MS’s O365 Service: Note how you need to set up an SSL context and perform .starttls() to properly create a secure connection.

Categories
Linux Programming Systems Administration

Tips for doing “shell” scripting in Python

I’ve been moving a bunch of my shell scripts to python recently, because of how much better it handles the concept of “a process didn’t run successfully”. Consider the bash script: What happens here if Command 2 fails? Note that we still get the success message at the end – bash silently ignored our error-ing […]

Categories
General Tech Linux Systems Administration

New Project – coconut-deadmanswitch – A tool to monitor Cron Jobs and Scheduled Tasks

I’ve started a new project! I recently talked about my experiments with coconut-lang here: https://jaytuckey.name/2020/10/25/thoughts-on-coconut-the-compile-to-python-functional-language-extension/ I’ve now started a project using coconut! It’s what I’m calling a “Dead Man’s Switch” (DMS) monitoring tool. The idea is this: Every cron job / scheduled task sends an update to the DMS monitor The monitor records the updates […]

Categories
Linux Programming

Thoughts on Coconut – the Compile-to-Python Functional Language Extension

Today I have been playing with the Coconut Language – see http://coconut-lang.org/ – so I thought I would put down some thoughts on using it, going through what I like and find interesting. What Is Coconut? So what is coconut? From their website: Coconut is a functional programming language that compiles to Python. One super-neat […]

Categories
Linux Networking Systems Administration

A script to bring Cisco Switch VLAN data into phpIPAM

We have recently set up an IPAM at my workplace, the excellent phpIPAM – https://phpipam.net/ I went through our install and added all our subnets into the IPAM, but to make the data much more useful we wanted to have the VLAN information also: However, I didn’t want to go through by hand, adding each […]

Categories
Linux Networking Uncategorized

How Websites Load – A deep dive into the IP network stack and how it is used to connect to a site

I’ve made a series of videos exploring the Internet Protocol Suite, and how it is used to make a connection to a website. It’s a deep dive into the stack, explaining all the way down to the ethernet frames that a computer sends on the local link.

Categories
Linux Systems Administration

A bind9 Rest API tool – bind-rest-api

I made an API for bind9! Recently I have been looking for an api for a bind server. I found an existing project, https://github.com/dmyerscough/BIND-RESTful, which is quite nice but didn’t have some of the functionality I needed. I looked at updating the existing project, but instead decided to write a new API from scratch, inspired […]

Categories
General Tech Linux

Jupiter Broadcasting Matrix Quick Start Guide

This is a quick guide on how to get started with Matrix chat for the Jupiter Broadcasting shows. It is also in video form here: Instructions You will need a client, and you can use a web-based one by going here:https://app.element.io If you don’t already have an account: Choose to “Create Account” Choose “Advanced” (Other […]

Categories
Linux

Problems with OneDrive as a Backend to Restic Backup Tool

I’ve been trying to use OneDrive as my restic backend – which is supported through the rclone backend. Using this, restic can use any backend that rclone supports, which is very cool. However, it has revealed that the OneDrive API is very buggy and unreliable! I’m surprised by how many issues I’ve been getting. I’m […]

Categories
Linux Networking Systems Administration

A script to scan a network range and create Kea DHCP reservations for devices it finds

This script is very simple. It will scan a network range attached to the device it is run from, and will turn what it finds into a list of reservations for the Kea dhcp server – https://kea.readthedocs.io/ You run it something like this, giving it a network range to scan. Then network should be a […]