Plasma

If you’re familiar with the demo-scene, you’ve probably seen the plasma effect: In this article, you’ll learn how to implement plasma effects of your own. The Algorithm To generate a plasma effect, you iterate the pixels in the screen buffer. For each pixel: Apply a function to the pixel’s coordinate producing some value \(v\). Use \(v\) to calculate the new RGB value of the pixel. Update the pixel’s RGB value in the screen buffer. Repeat steps (1)-(3) until you have processed the entire image frame. Display the updated frame. Applying these steps at a high frequency creates the plasma animation. As you’ll see, the choice of function determines the shape and scale of the output image. ...

February 13, 2025 · 3 min

Port Scanning

Port scanning is the name given to the process of discovering open ports on a remote host. In this article, you’ll explore the design and implementation of a basic port scanner written in Rust. Starting with a Ping Utilities with port scanning capabilities often start by sending a ping to the target. For example, nmap pings the target before scanning. This ensures the target is reachable. To send a ping or an ICMP packet, you need to create a raw socket which requires the CAP_NET_RAW capability. A regular user doesn’t have CAP_NET_RAW capability meaning a ping requires sudo or elevated privileges. Luckily, modern Linux provides unpriviledged ping. The unpriviledged ping uses a dgram socket rather than a raw socket. ...

January 21, 2025 · 7 min

colorbot

A previous article explored writing rsbot, a scriptable auto clicker meant to automate training the most repetitive skills in RuneScape. As a recap, that bot would take as input a script defining click events where each click event includes an ID, click box, and delay range. The bot would continuously execute each event. Executing an event means randomly clicking within the click box and waiting a random amount of time within the delay range. Bonus points, rsbot mouse movements look human. ...

January 15, 2025 · 7 min