Programming


Python 3 Single Threaded Ping Sweeper

Python 3 Single Threaded Ping Sweeper

I wouldn’t suggest this code be used for production (it’s very slow). We are using to demonstrate the difference in multi threading and single threading. This is the single threaded version of the ping sweeper. The multi threaded version of the python pingsweeper is also available to study. Python 3 Single ...

Python 3 Multi Threaded Port Scanner

Python 3 Multi Threaded Port Scanner

nmap does a better job of scanning, fingerprinting, detecting OS, etc. However if you wanted to roll your own port scanner, python can do it: Python 3 Multi Threaded Port Scanner Python import socket # as we are opening sockets, need the module import time # time our script import threading # we want to multi thread ...

Python 3 Multi Threaded Ping Sweep Scanner

Python 3 Multi Threaded Ping Sweep Scanner

We know that nmap and other tools are great for scanning a network. What if we want to do it in python? The following code is a demonstration of multi threading, using python 3 to sweep a network using pings on windows. The single threaded version took almost 2 minutes to check ...

WordPress Custom Template Short Code

WordPress Custom Template Short Code

If you have ever tried to configure a custom template but wanted to add a short code, then you probably used something like this…. I wanted the 404 page on Ruby Sash to list a dynamic sitemap in case someone was looking for a page that we removed or moved. However, the 404 template ...

Watermelon Chess SVG Using Perl

Watermelon Chess SVG Using Perl

Watermelon chess is a simple strategy game where you surround your opponent to remove them from the game. We are creating game boards for the CNC router. The first step is to create a SVG file. From the SVG file, we then create the g-code. This article contains rules about ...

Extract URI Using Perl Regexp::Common

Extract URI Using Perl Regexp::Common

I wanted to see the urls to several things and didn’t want any other text cluttering my notes. Perl to the rescue, specifically Regexp::Common. There are several ways to get a URI, and Regexp::Common will get 99% of the URIs. It works for what I needed, and took 10 seconds to implement – ...

WordPress PHP Fails After Ubuntu 18.04 Update

WordPress PHP Fails After Ubuntu 18.04 Update

After you upgrade to 18.04 using the do-release-upgrade command your php (and WordPress) might not be working. The Upgrade Procedure (16.04 to 18.04 Example) We’ll assume that you first backed up your system, took a snapshot, etc and then did your basic system updates first: Shell $ sudo apt update $ sudo apt upgrade $ sudo apt dist-upgrade 123 $ sudo apt ...

Perl List Files in Directory

Perl List Files in Directory

If you want to list all of the files in a directory, you can use glob. The following Perl code will put all “mp3” files in an array called @mp3s. The sample loop shows how to loop over that loop. Shell my @mp3s = glob "./*.mp3"; foreach my $in (@mp3s) { print $in . "\n"; } 1234 my @mp3s ...

SVG Perl Script to Make Alquerque Game Boards

SVG Perl Script to Make Alquerque Game Boards

Alquerque boards are used for a variety of games. Fanorama, Tigers vs Goats (Bagh bandi), Fox and Geese and other variants similar games are some of the examples. Here is how to make Alquerque game boards in SVG using Perl. Games that use Alquerque boards: Fox & Geese Several variants of this such ...

SVG Perl Script to Make 6 Point Star

SVG Perl Script to Make 6 Point Star

Solomon’s game is similar to checkers but uses the star of Solomon. It’s a modern game invented by . Here is the Perl code to generate an SVG file game board. What is the Star of David? First, there are 2 stars mentioned as false idols in the Bible (Acts 7:43 and Amos: 5:25–27). ...