The Psycho’s Homepage

Visit the Psycho Cod3r network for great tutorials, projects, and rambles on all things tech! Check out my blog articles and read about Linux, Unix, cyber-security, retrocomputing, Lenovo Thinkpads, and more!

psycho
Disclaimer: Don’t be a dumbass. Follow Norman Bates’ advice at your own risk.

Hello, and welcome to my WordPress site. I’m Michael Warren, a tech-savvy psychopath who likes to do hacky stuff and tinker with technology. I have a ton of interesting stuff on this site, so feel free to look around. Follow me if you like what you see. 😛


Hot Topics:

hottopic
Here are some of my top subjects that I write on, so look through the list below to see if you find anything that interests you:

Languages:
C
QBASIC
Unix shell scripting

Other topics:
Reverse engineering
Raspberry Pi
Unix and Linux
Cyber security
Computer graphics
MS-DOS
Lenovo/Thinkpads
Computer networking
VirtualBox
Anti-Apple rants

All posts by Psycho Cod3r



Latest Updates by Category:


Data Science:

Data Science in C: Programming a Turing Machine to Parse CSV Code


Okay, so maybe I ripped my featured image from the Hack-A-Day site, but that image of a personification of a Turing machine as an intelligent robot was too relevant to the topic of this post to pass up, so sue me. 😛 I want to talk about the first step to building data science or machine learning programs in C, which is to have a way to read the serialized data from a CSV file and convert…
Continue Reading

More Articles →


Unix and Linux:

Obfuscated Unix Scripting with sed


Okay, so I had something else planned for this Friday night, but the project I’m working on that I wanted to share is taking a lot longer than expected, so I’m having to push the publication date back a few days while I get all the code working and create all the visuals in SVG. In the meantime, I thought I’d keep my readers entertained with a weird scripting language that I used to have endless fun with back in my early days of coding…
Continue Reading

More Articles →


Retrocomputing:

A Review of MS-DOS, Version 6.22


So it has recently occurred to me that I never actually did a proper review of MS-DOS 6.22, either in this blog or in my old one. This bothers me, because in a previous post I did claim that I had “already talked extensively” about that version of DOS, when in fact I hadn’t. So here is my long-awaited review of the last and greatest (non-Windows) installment in the MS-DOS saga…
Continue Reading

More Articles →


C Programming:

Adding Rational Types to the C Programming Language


One of the main problems with the C programming language as opposed to something like Python is that it doesn’t provide any of the convenient amenities that more high-level languages provide in terms of abstract data types. Basically, you have to implement everything yourself. C provides integer types and floating point types, and that’s basically it. So implementing something like, say, a rational type requires…
Continue Reading

More Articles →


Hacking:

Uses for Reverse Engineering: Debugging C Code with a Disassembler


One thing I like about C programming for the DOS prompt is that when there’s a run time error, a whole collection of debugging information gets dumped to the console. This can be very useful in diagnosing errors, as opposed to the Unix command line, where all you get is a not-so-descriptive message like “Segmentation fault”. I was testing a C program I was writing when I got…
Continue Reading

More Articles →



My Projects:

These are ongoing projects that I’m working on, which I document in my blog.


Implementing a 2D game in QBASIC:

QBASIC_by_Bisquit

Part 1: Graphics modes, drawing functions, and scan codes

In this episode, our hero discovers the wonders of the QBASIC language. Intrigued by its quirky capabilities, he learns the ropes in one night of feverish coding, as well as learning some neat tricks for getting the most out of the language.

QBASIC_DATA_display

Part 2: Functions, subroutines, and recursion, and more drawing functions

Here our hero explores functions and subroutines in the QBASIC language and starts getting into pixel-level drawing with the DATA statement.

sprite

Part 3: Color tables, font files, and sprite animation

Here our hero graduates to writing useful programs in QBASIC, starting with one that prints a color table. Not content to stop there, he then designs his own font, calling it PsychoFont 5×6, and creates a full-fledged sprite animation through iterative use of the DATA statement.


My hacking arsenal, or, finding creative ways around tech lockdowns:

4d7

Using Javascript and GIMP skillz to pirate fonts

Our hero wants to use the Papyrus font for his art. Unfortunately it’s not on his computer and every download page for the font is paywalled. So he decides to be sneaky and write a script that will allow him to use the font for free.

ajit-pai-banner

Shell script to fuck with bandwidth throttling bots

Take that, Ajit Pai!

1540587838854

Shell script to download photos directly from Instagram

Our hero gets sick and tired of bullshit web interfaces interfering with his pastime of ogling sluts on the Internet and devises a plan to bypass Instagram’s default interface and get the boobies delivered directly to his hard drive.

chunk-title

Hacking image files

Our hero gets into reverse engineering and starts digging through image files with a hex editor, trying to figure out how they’re built and how they can be safely altered without being corrupted or having their appearance changed.

hacker-hacking-dark-hoodie

Getting information on people the 1337 H4xx0r Way

A mini-arsenal of tools and hacks for doing reconnaissance on people and organizations.


Disassembling a Windows PE binary:

ida-freeware-interactive-disassembler-assembly-dump-reverse-engineering

Introducing IDA

Our hero starts using the IDA freeware disassembler to reverse-engineer Windows PE binaries, because he’s too cheap to actually pay for IDA Pro.

ida-freeware-interactive-disassembler-procedures-proximity-browser

Deciphering the program setup

Now that we’ve disassembled the binary, let’s start reading some assembly code! Everything up to the first WinAPI call is covered here.


My Battlestation:

rig

Making the switch from Macbooks to Thinkpads

Our hero takes the essential first step in the construction of his battlestation and his hacker lair. It’s pretty hard to have an awesome hacker setup with a deliberately crippled hardware platform like the Mac.

home-office

Getting a new office chair

Another essential component. Can’t have an epic battlestation without something to put your butt on while you’re hacking.

green-ethernet

The Ethernet Island

In this chapter of our story, our hero builds an island of wired Ethernet connectivity inside the WiFi network imposed on him by his evil overlords (otherwise known as the tech staff), thus allowing him to control the security policy and other aspects of the system even though he’s not allowed to access the house’s gateway.

van-eck

Escaping from the Matrix with the Van Eck tinfoil hat

After suffering a psychotic episode, our hero becomes extremely paranoid about a government conspiracy against him. Here he envisions a completely isolated and unhackable air-gapped system that the Illuminati can’t get to.

lenovo

Why Lenovo laptops are THE SHIT

Our hero reflects on why switching to Lenovo was probably the best decision he ever made in his career as a hacker.

82891943_c8e9f382f5_o

The Tactical DOS VM

Our hero works on some of the software for the rig – a super-secret DOS-based spy VM for doing spy stuff and h4xx0r stuff!

arch-linux-tmux-terminal-dual-monitor-battlestation

Using Arch Linux with the dual monitor setup

Our hero hacks his system to run a text-mode Arch Linux system that utilizes both monitors.

57b285b8ab65ee95ce950c9349aec99e

Raspberry Pi Reboot

Our hero gives his Pi a complete makeover with a new OS, new software, and a new monitor, turning it into a complete Linux desktop and server.

lenovo-thinkpad-x131e-netbook-laptop-refurb

My New Thinkpad X131e

Our hero rambles excitedly about his new laptop.


Corona-Chan Project: Predictive analytics for COVID-19:

Corona-Chan

Part 1: Project launch

Our hero wants to exploit the COVID-19 recession and buy cheap stocks that are guaranteed to go up when it’s over, but he wants to wait until the market hits its lowest point. So he devises a system to predict when the epidemic will hit its peak. Also made some predictions based on SARS which later turned out to be wrong.

Corona-Chan

Part 2: Smoothing the prediction function

Our hero modifies his data modeling program to smooth out the curve, because it’s all wonky and doesn’t make sense.

Corona-Chan

Part 3: Analyzing the prediction function

We’re taking a step back from programming here to analyze the prediction function and how the smoothing of the curve distorts its critical points, research that will allow us to correct for such errors in the future.

Corona-Chan

Part 4: Fitting the model to the data

Our hero uses an empirical approach to find the critical points of the curve (meaning when the virus hits its peak). Later simplifications of the model have made much of this part of the research unnecessary, but it’s still interesting to look at.

Corona-Chan

Part 5: Final model-fitting program

Our hero comes up with a more algebraic approach to the model-fitting problem and implements it with a program that performs logistic regression on the data, coming up with a ballpark estimate of when the peak of the virus will occur and how many confirmed cases there will be.

Corona-Chan

Part 6: Predicting the end

The end of COVID-19 that is. Our hero speculates about how long the virus will last and how herd immunity will cause it to slow down over time.


MIX emulator:

taocp

Project launch

Introducing the MIX emulator project… Our hero designs an emulator for the fictional MIX architecture used in Knuth’s famous TAOCP series. This introductory entry looks at the two main components of the system: an assembler for MIX assembly language code, and an execution environment for running MIX executables, both written in C.


Highlight Reel:

Some of the best or most important articles I’ve written (in my opinion).

gamma_function

Factorial Overflow

While working on his latest coding masterpiece, our hero makes an astounding mathematical discovery. Read all about it here.

8o0V6pkqFkUhSB4YRQ7LDZtvlYRUaGsAnXKWa2le338

The Joy of Hacking

What does it mean to be a hacker? What does it mean to hack? What does the future hold for hackers and the hacker culture? All these and more questions are explored here.

setup

Online Content Marketing and the Future of the Economy

Follow our hero’s journey in building his dreams and escaping from the rat race through the magic of passive income. Learn about his rules and secrets to success.

ms-dos

Adventures in VirtualBox

Follow the adventures of our intrepid explorer as he pushes the limits of retrocomputing with VirtualBox and travels to distant systems long forgotten by humanity. Explore the wonders of MS-DOS 6.22, Windows 2.0, Windows 3.1, OS/2 Warp, and Windows 95 in this whirlwind tour of computing’s past.

1545790091905

5 Things I Hate About Apple Culture

Listen to our hero rant about Apple-using hipsters and why their entire culture is fucking cancer.

After Dark Panel

5 Awesome Software Titles for DOS

Our hero reviews some of his favorite DOS software on the market. Titles include After Dark, Borland Turbo C, Tandy Deskmate, DOS Navigator, and MATLAB. Tons of cool screenshots to look at in this article as well.

x11

Marketable Skills (Random X11 Post)

Oh shit, 15 years of knowing how to code and our hero still can’t get a job. Better stop procrastinating and learn some graphics programming so he can write programs that dumb normies can use. In this chapter our hero gets his feet wet with the X11 API and explains all the basic concepts so you guys can learn too.

Apple-Logo

Chickenshit Minimalism: How Apple Ruins Product Design for Everyone

Our hero makes the case that Apple’s shitty product designs are bad for everyone, not just Apple customers.


Top Tutorials:

Learn how to do all kinds of neat stuff with computers.

tux-package

How Linux Package Managers Work

Have you ever wondered what goes on under the hood when you install a package in Linux? This tutorial will explain the exact step-by-step process, based on observations made while reverse-engineering pacman.

VimColorPart2

Custom Syntax Highlighting for Vim

Learn about our hero’s tried-and-true system for automatically adding custom syntax highlighting rules to Vim.

c-daemon

How to Write a Daemon Process in C

Ever wanted to write your own servers? Ever wondered what goes into making a Unix process run as a daemon so that it can provide services to other processes? This tutorial will explain the exact process, with example code so you can implement it yourself.

hosts

How to Block Websites and Prevent DNS Leaks Using Your Hosts File

This tutorial will show you a quick-and-dirty method you can use to completely block any website, as well as to automatically access websites by their IP addresses to prevent DNS-related vulnerabilities when using a VPN.

errno

A Guide to Error Handling in C

All the information you will ever need to know about the C Standard Library’s error handling features, conveniently collected in one place.

c-tux

How to Get the Dimensions of a Linux Terminal Window in C

A tutorial that will come in handy for anyone wishing to implement full-screen terminal applications from the ground up.

hard-drive

Implementing the DoD Data Sanitation Algorithm in C

Example code for how to implement DoD 5220.22 – the new state-of-the-art hard drive sanitation method designed to replace Gutmann.


Odds and Ends:

Interesting nuggets that you probably won’t find anywhere else on the Web.

headless-raspberry-pi

Use SyncTERM as a Remote Login Terminal for the Raspberry Pi

This tutorial will show you how to take two hitherto unrelated platforms and use one as a terminal for the other, just like in the old days of time-sharing networks.

real_programmer

Real Programmers Don’t Use Structs

Ever wondered how you would build complex data structures without using structs or objects? No? Well, I’m going to show you anyway, using the incredible power of void pointers!

Gullivers_Travels

How to Check the Byte Order (Endianness) of Your System in C

This tutorial will show you a quick method you can use to easily determine whether your CPU is little-endian or big-endian.

rescue-vm-0

VirtualBox Data Recovery: How to Rescue Files from a Corrupted VM

This tutorial will give you some valuable tips in case you ever find yourself unable to start a VirtualBox VM because it’s corrupted and want to be able to access the files on that VM again.

OpenWatcom-installation

Overcoming the Idiosyncrasies of C Programming in Windows

Not a lot is written about C programming on the Windows platform. This article looks at how C programming in Windows differs from C programming in Unix/Linux and how Windows C can be thought of as a subset of Unix C.


All Other Articles (that aren’t utter shite):

meta-tags

My top 5 favorite browser extensions

Our hero shares five browser extensions that are useful or just kinda cool.

Vexplore

Using Vim as a file browser

Learn how to use the little-known file browsing capabilities of the Vim editor.

equations1

How to convert a TeX file directly to PDF format

After several frustrating attempts to make a PDF from a LaTeX file, our hero discovers a much simpler method that could have saved him a whole lot of time if he’d known earlier.

tunnel

Up and Running: Using the TunnelBear VPN Service Through OpenVPN

Our hero embarks on a fantastic journey towards ultimate privacy, in hopes of eventually wreaking havoc and anarchy on the world from behind his computer and not getting caught. Well, maybe. Can’t tell you too much right now, heheheh.

zombie-hand

I’m not dead.

Just so y’all know.

digital_forensics

Forensics Tool to Detect Encrypted Files

Read about this fascinating digital forensics project that our hero started way back in May of this year and then never touched again.

mr._robot_-_darlene_and_elliot_-_h_-_2016

Shared Memory Exploits

Our hero tries to actually git gud at hacking as opposed to just using stupid loopholes in software, starting with some research of the CVE database.

stock-cpu-image

Run 64-Bit Guests in VirtualBox Using Hardware Virtualization (Lenovo Host)

Ever gotten weird errors when trying to run 64-bit operating systems on VirtualBox VMs? This tutorial will explain what you need to do, using a Lenovo BIOS (though the knowledge found here applies to other hardware platforms as well).

random

How to Generate Truly Random Numbers in POSIX Systems

A tutorial on the generation of truly random numbers in C programs using the facilities of the POSIX system.

crontab

Scheduling Jobs in Linux with crontab

Learn all about the legendary cron job scheduling system used in Unix and Linux systems for decades.

legal

The Michael Warren Free Software License

A software license designed by yours truly for the purpose of protecting open source software, its authors and contributers, and its users from those with malicious intent.

uuid

How to Generate UUIDs in Linux

Learn how to generate Universally Unique Identifiers from the Linux command line or in programs using the libuuid library.

the-code-geek-demotivational-poster-1196965478

The Lost Art of the All-Nighter

Do you like staying up late at night to work on coding projects? Does the midnight silence give you a buzz? Come here to have your love of nighttime hacking validated.

psycho

The Psycho is Back!

Our hero returns after a one-week absence and announces great things that are to come.

1538152298569

SSD Data Sanitation in Linux

Like the DoD article, but for SSDs.

cbc

Understanding and Using the OpenSSL Command Line Utility

An explanation of how to use the OpenSSL command line utility to encrypt and decrypt files, as well as some key concepts in cryptography theory.

c-tux

Finding the Day Difference Between Two Dates in C

Just some random C programming.

arch-linux-startup

My Step-by-Step Process for Starting Arch Linux Live

Our hero details his exact sequence of steps for constructing a fully functional Arch Linux system from a minimalist live CD, because he can’t be assed to actually install anything.

cropped-gobbledigook.png

Hi, Everyone!

The first ever post on this site. Introducing our hero and his computing awesomeness.