Skip to content

Inspecting Network Traffic on macOS

I ran into a scenario where I wanted to sniff out exactly what was being communicated by a macOS app. It’s been a long time since I’ve done any http sniffing so it great to try out some new tools. Packet Sniffing Packet sniffing is the easiest way to see what is happening on your network device. No sudo, no proxies. However, you can only see the domain being contacted for SSL requests. Great for high level activity, not great for understanding the details of what an application is doing on your computer. Using a Proxy to Inspect HTTPS Traffic In order to view HTTP traffic, you need to route all network traffic on your device through a proxy. mitmproxy is exactly what you need…

Continue Reading

Automatically Download and Rename Your LabCorp PDFs

Over the last couple of years, I’ve incrementally tried to improve my understanding of my health. Part of this is understanding my lab work and collecting the data in a way that I can personally understand and analyze it. In order to do this, I needed to download all of my past LabCorp PDFs. My goal in downloading these PDFs is to funnel them into my custom GPT, which will extract the results into a nicely formatted CSV that I can then copy and paste into Google Sheets. This enables me to easily graph, chart, and otherwise analyze my blood work results. Given the lack of a straightforward way to download all PDFs from the LabCorp website, I created scripts to automate the downloading and renaming of the PDFs for easier analysis and storage…

Continue Reading

How to Inject Custom Code on Python Interpreter Startup

Ruby and Javascript both allow you to execute arbitrary code before your main application runs without modifying your application code. My most common use case is executing monkey patches to make it easier to debug an application. However, this is not possible with Python. This makes using development tools like pretty-traceback challenging. In my case, I work across a bunch of reports, and injecting six lines of Python into each repo is annoying (especially since many open-source repos don’t have a concept of a PYTHON_ENV, so there’s not an easy way to disable it in prod). The Magic .pth File In any engineering discipline, the more you understand the entire stack you are working with, the faster you’ll be able to fix issues…

Continue Reading

Fixing Broken Ethernet on Orange Pi 3B

I attempted to get my Orange Pi running as a tail-scale exit node. To do this, I had to enable IPv6 on the device. I ran the commands to enable the IPv6 connection, but it didn’t seem to work, so I rebooted the Orange Pi. After rebooting the Pi, the Ethernet would not connect. I ended up having to plug a screen into the orange Pi and wasted a bunch of time trying to understand why the Ethernet connection wasn’t working. I eventually ran into this blog post which indicated that there’s some low level memory issue with a recent firmware upgrade which broke the Ethernet device on the orange Pi. Super dissapointing! Here’s how to fix the ethernet across reboots…

Continue Reading

Copy Path / Directory to Clipboard OS X Lion Service

Someone at work recently wanted an easy way to get the path of a file in a format he could paste into an IM or an email. I wrote up a quick applescript and bundled it into a service which enables a user to easily copy the path of a file to the clipboard. The package also includes a service that copies the directory path of a given file to the clipboard. The biggest use case for this service is for an office environment where many people are connected to the same drive externally via VPN or internally via ethernet. It is challenging to easily point a colleague to a specific file if your shared drive is badly organized (which, odds are, it probably is). This tool mitigates most of that issue and works consistently across machines.

Continue Reading