Rust Variadic Functions

Rust does not allow function overloading or variadic functions, so a few different options are available to handle different use cases. I will not go into depth about all the options, but I want to show off one of option that I didn’t see in the blog posts I found but instead discovered while working with TcpStreams. The signature for connect() is pub fn connect<A: ToSocketAddrs>(addr: A) -> Result<Self> and it can be called with a variety of arguments, without any explicit conversion:...

May 20, 2024 · X53 Authors

Clacking hacking

It has been a very long journey with input methods for me, but I pretty much settled on the ErgoDox as my daily driver. At least when I’m at my perfect desk. But between commuting and traveling and late night hacking on the couch, I can be bound to a borrowed keyboard or the laptop keyboard. And that’s usually when my tendinitis flares up, since I use the GUI button heavily and can’t easily rebind it – but also never found a good placement for fn keys....

May 7, 2024 · X53 Authors

Powershell Customization

Why should Linux have all the fun? Configuration Find help here. Not so obviously: the configuration file path is stored in $PROFILE. Usually that directory and file don’t exist, so they should be created. if (!(Test-Path -Path $PROFILE)) { New-Item -ItemType File -Path $PROFILE -Force } source Then use code $PROFILE Because Windows has stricter defaults than they did in the past, the ExecutionPolicy has to be updated. Please understand the change!...

August 26, 2023 · X53 Authors

Binary Ninja Jump Tables

Sometimes jump tables are borked, especially when a binary has to be loaded rwx, specifically the issue is with writable memory. So fixing up the jump table from int32_t jt[0xd] to int32_t const jt[0xd] makes Binary Ninja happy again. This is a relevant GitHub issue Example In a recent firmware I encountered that issue. The whole blob was mapped as rwx because some of the memory ranges would change, but I didn’t know which ones yet, and I didn’t want to hand-pick the ranges either....

August 23, 2023 · X53 Authors