Author Archives: Rink

Implementing a std::function<>-like wrapper in C++, part 3: using a static storage buffer

Previously, we’ve made our version of std::move_only_function<> generic so that it can be used to store any function signature, regardless of the number of parameters or return type. The implementation we’ve ended up with is the following: This works for … Continue reading

Posted in Programming, Uncategorized | Tagged | Leave a comment

Implementing a std::function<>-like wrapper in C++, part 2: generalizing the return type and arguments

Introduction Previously, we’ve seen a way to implement our own version of std::move_only_function<>. The implementation we ended up with is as follows: This works for any movable function, for example: Unfortunately, it is restricted to the function prototype int fn(int, … Continue reading

Posted in Programming | Tagged | Leave a comment

Implementing a std::function<>-like wrapper in C++, part 1: type erasing

Introduction Recently, a chat with a friend peeked my interested: how would you store an arbitrary function and call it, similar to std::function<>. It turned out a plain C function pointer would suffice for this specific use-case, but I got … Continue reading

Posted in Programming | Tagged | Leave a comment

Hacking into a Foscam FI9853EP camera, part 2

In my last post, I examined how to get U-Boot access and obtain the flash data from a Foscam FI9853EP camera. Whereas this data is very useful for offline analysis, I wanted to get a root shell so I can … Continue reading

Posted in Reverse engineering | Tagged | Leave a comment

Hacking into a Foscam FI9853EP camera, part 1

I have a Foscam FI9853EP, which was introduced in 2014 and has long since been obsoleted. One of the things that stands out, is that all firmware is encrypted: I was curious: what could be in the firmware that needs … Continue reading

Posted in Reverse engineering | Tagged | 1 Comment

Behind the magic of magic_enum

Recently, a coworker pointed me towards a C++17 library to convert enumeration values to strings and vice versa. The library called magic_enum (https://github.com/Neargye/magic_enum) and it indeed feels like magic. I was immediately curious: how did they pull this off? The … Continue reading

Posted in Programming | Tagged | 1 Comment

On NetWare 3.x password hashing

Way back when, I was involved in trying to obtain passwords for a Novell NetWare 3.12 server. I won’t go into details here, suffice to say that the topic has always interested me – sufficiently to return to it 30-ish … Continue reading

Posted in Reverse engineering | Tagged , | Leave a comment

Reverse engineering the NetWare 386 filesystem format

I decided to take a look into the NetWare 386 filesystem, which was used in NetWare 3.x and 4.x and perhaps later versions as well. This post serves to give a high-level background on the design and layout. Tools to … Continue reading

Posted in Reverse engineering | Tagged , | Leave a comment

Creating a binutils/gcc toolchain for your OS

I wanted to update the binutils/gcc-based compiler toolchain of my Dogfood operating system. This entry describes some concepts and the changes that needed to be made in order to add this target to binutils 2.39 and gcc 12.2.0. Configuration targets … Continue reading

Posted in Operating System Development, Toolchain | Tagged , | Leave a comment