hakk

software development, devops, and other drivel
Tree lined path

Blog

Ubuntu apt update/upgrade sa-compile E: Sub-process

A quick post with some notes on how to solve this issue. When running apt update and apt upgrade on Ubuntu I received this error message: Errors were encountered while processing: sa-compile E: Sub-process /usr/bin/dpkg returned an error code (1) So I tried running sa-compile myself which returned the following: sa-compile: not compiling; 'spamassassin --lint' check failed! It wasn’t obvious to me at first but running spamassassin --lint helped. It lead me to my main. Read more...

Python One liners

A couple of helpful(?) one liners in python, I use these for quick development or when troubleshooting and testing. Start a static file http server in the current directory python -m http.server If you only want it to listen on localhost you can pass a bind parameter python -m http.server --bind 127.0.0.1 It’s also possible to specify a port (default is 8000) python -m http.server --bind 127.0.0.1 8080 If you need an smtp server for trouble shooting, it’s possible to fire one of those up in one line. Read more...

Setting up MariaDB on FreeBSD

This will briefly cover building from source and some notes for some silly mistakes that I made and how to “fix” them or at least get things working. Let’s get started. Make sure everything is up to date Before starting anything else make sure that all ports are there and up to date. root:~/# portsnap fetch update && portupgrade -a Note: If this is new install you might need to extract first, portsnap extract. Read more...

Exploring Python Metaclasses

In this post I will take a look at using the type keyword to create dynamic classes on the fly (metaclasses). I’ll focus on type first and then look at using it as it relates to creating metaclasses. Type The most widely known use of type is to determine the type of an object. Python is an object oriented language which means that everything has a type. Let’s take a look at some examples: Read more...

Building Python on Ubuntu 16.04

For this post I am specifically working on Ubuntu 16.04 but I’m sure it could work on other versions as well, however a little while back I wrote another post about building python on docker. In this post I’m going to look at creating a chroot environment and then setting that up to complete the build. To setup the chroot environment I am going to be following along with this community post Let’s get started by installing the necessary packages Read more...

Creating a FreeBSD bootable USB on OS X

It’s pretty straightforward but I can’t remember some of the commands like I can on Linux. So I’m creating a little post for it so I don’t have to keep searching and thinking what did I do last time every time. Download the installation media Head over to the download page to and download the memstick image that’s right for your architecture, in my case it’s the amd64 image. Note: Make sure to verify the checksum, in order to do this you’ll need to download the checksum file. Read more...

Building Python on OpenBSD 6.2

Note: If there are patches for the software you want available in the ports tree, you probably want to look at the working with ports page. However, if you want to customize your build further read on. At the time of this writing I am in the process of building python 3.6.4. The build process could change in the future, but this is current build process, hopefully this will give someone the jumpstart they need to get going on this. Read more...

Building Python on Ubuntu 14.04

While hunting for the source of a bug earlier, I thought that it might be the cause of a bad binary. To remedy this I thought that I would build python from source and now I’m creating this post for some documentation on the process. During this I was using Ubuntu 14.04 (trusty) running on docker. First, install all the packages that will be needed for the build: root:~/# apt-get install build-essential libz-dev libssl-dev root:~/# apt-get build-dep python3 Notes: libz-dev is only needed if you want/need zlib support libssl-dev is only needed if you require ssl support. Read more...

Mr Robot - vulnhub write up

After getting this fired up virtualbox, the first thing I did and like to do is run an nmap scan. Huh, only http(s) ports open. PORT STATE SERVICE VERSION 22/tcp closed ssh 80/tcp open http Apache httpd 443/tcp open ssl/http Apache httpd When first visiting the site, I found this in the index source code USER_IP='208.185.115.6' I was hungup on this for quite a while. I kept thinking I could get more access if my ip address matched this but I finally moved on. Read more...

Vulnhub - RickdiculouslyEasy: 1

I had some time to play on the computer this weekend, so I decided that I would look into finding a CTF. After poking around reddit for a bit I finally remembered Vulnhub, how could I have forgotten. Any how, I found this challenge on the first page and thought it looked pretty interesting. Now let’s take a look at solving it. After booting it up on virtualbox it shows the assigned ip address, perfect. Read more...