Patrick Gaskin

Software engineering student interested in systems development, backend development, Linux systems administration, cybersecurity, reverse engineering, and a bit of networking.

Experienced in Go, C, C++, JavaScript, and Bash. Familiar with Python, Java, SQL, PromQL, and ARMv7 assembly. Learning x86_64 assembly and Rust.

Very experienced with Linux (desktop, embedded, and server), but have some knowledge of Windows and Android.

Contact

Open-Source

Lithium EPUB Reader Patches

  • Go
  • Smali
  • Android
  • Reverse Engineering
  • Java
  • JavaScript

Patches for the Lithium EPUB Reader app adding an offline dictionary, custom fonts, additional progress information, series metadata support, support for inverted rotation, and more.

The custom Android app patching functionality is written in Go and uses apktool to decompile APKs and provides abstractions to safely modify resources and smali (i.e., dalvik/java bytecode).

The dictionary is implemented as a script injected into the reader webview, but will work fine in an ordinary web browser too. The dictionary code is written in modern JavaScript and is optimized for performance, while still being relatively memory-efficient. The binary dictionary files are generated other dictionary sources, including the Project Gutenberg's Webster's 1913 Unabridged Dictionary. The frontend JavaScript uses Shadow DOM to isolate the dictionary from the book content.

Android VNC Viewer Patches

  • Smali
  • Android
  • Reverse Engineering
  • Java

Patches for the RealVNC Viewer app to fix bugs and improve usability.

As of 4.7.0.51044, this includes: making the gigantic distracting connection toolbar FAB invisible when inactive, allowing more than the first 4 connections to be pinned to the home screen, adding key repeat support to the extension keyboard (e.g., arrow keys), and fixing missing key presses when rapidly pressing buttons on the extension keyboard.

Innosoft Fusion Schedule Generator

  • Go
  • HTML
  • CSS
  • File Formats

Innosoft Fusion is a recreation facility management software suite used by many universities in North America. The official white-labeled app (Fusion Go) provides schedule information, cancellations, and notifications for drop-in events, but does not provide an overview of an activity. Moreover, the official swim schedule is often outdated, and never includes cancellations or excluded dates.

The data comes from the HTTP requests the official app makes, and the schedule generation is powered by a custom algorithm to generate the best schedule by combining event dates/times optimally based on metrics like the number of exceptions, the number of exclusions, the duration, the most common times, and so on.

To ensure correctness, there are comprehensive unit tests ensuring the schedule accurately represents the events from the source data. There are also tests to ensure the optimal schedule is generated from complex combinations of activity dates.

I chose to make this highly configurable to allow it to be used for other universities too. The color scheme is dynamically generated using the Material Design 3 Color Utilities. For efficiency, there are multiple layers of caching.

Windy Live Wallpaper

  • Android
  • Java
  • OpenGL ES
  • Go
  • Weather
  • Reverse Engineering

Android live wallpaper visualizing local wind patterns. Based on the shaders from the original Pixel 2017 live wallpaper, but with up-to-date wind data (the official one was last updated in 2019), more themes, permission fixes for newer Android versions, lower power consumption, and other fixes. The Java code has been completely rewritten from scratch; only the shaders are based on the original APK.

The custom backend which generates the wind vector field textures is written in Go and uses the NOAA GFS forecast data.

Qt Resource Extraction

  • Go
  • Python
  • Qt
  • C++
  • File Formats
  • Reverse Engineering
  • Library

Library and tools to extract embedded resources from Qt 5.13 binaries and RCC files. Supports localized resources.

To automatically determine the offsets for ARMv7 binaries, Unicorn is used to emulate the initialization functions and extract the offsets.

Innosoft Fusion iCalendar Feed

  • Go
  • JavaScript
  • iCalendar
  • File Formats

Innosoft Fusion is a recreation facility management software suite used by many universities in North America. The official white-labeled app (Fusion Go) provides schedule information, cancellations, and notifications for drop-in events, but does not provide a way to integrate this with external calendar software.

Based on the app's HTTP requests and data models, I implemented an API to provide the drop-in event information and notifications as an iCalendar feed or JSON, including support for inferring recurrence rules for events, and ensuring compatibility across clients including Outlook/Exchange, Apple Calendar, ICSx5, and Google Calendar.

For convenience, events can be filtered by various categories with wildcard support, and subscribing the calendar is as simple as pasting the link into the calendar application (replacing html with ics if not auto-detected).

Microsoft Edge Dictionary Parser

  • Go
  • Reverse Engineering
  • File Formats
  • Library

Library to parse offline dictionary files from Microsoft Edge's Immersive Reader.

Essentially, the dictionaries are stored as a sqlite3 database containing two tables: a mapping of terms to one or more shard/word indexes, and a mapping of shards to blobs. The gzipped blobs contain a binary header followed by a sequence of headers and entry JSON.

Chrome Bookmarks

  • Go
  • File Formats
  • Data Recovery
  • Library

Library and tools for parsing and exporting Chrome bookmarks. Includes a simple file carving utility.

cmus

I've contributed features and bugfixes to the cmus music player including greatly improved mouse support and relocatable playlists/libraries.