A while ago, I read this article about abusing LOAD_CONST in Python 2.7. We are in Python 3.11 now, and CPython has since implemented quite a lot more features and checks. I wanna try to abuse the Python 3 VM to similarly execute shellcode, but I wanna do so without crashing CPython.
I mean there's the ctypes module that allows you to do literally anything. But that's not fun at all.
I did not know anything about the Python interpreter prior to starting this. I've written some high level explanation of how CPython does things below, hopefully it's correct and helpful for anybody just starting.
Also CPython source is just so easy to read. It's been a joy.
Since I wanna try this on the newest Python, I cloned CPython and built the x64 Debug and Release version of CPython. At the tim
So the Julia sets are a class of sets that have became very popular because of their beauty and an interesting object of study. The definition of a Julia set is really simple, it is the set of complex numbers \(\bold S_c\) such that for \(z \in \bold S_c\), we have \(|f^n_c(z)| \le 2\), where \(f_c(z) = z^2 + c\). Each choice of \(c\) gives rise to a different Julia set with distinct looks. I might write more about these stuff maybe but given how popular this subject is you can find a lot of it's cool properties anywhere on the internet. I suggest checking out Inigo Quilez on the subject of rendering them.
I hope your internet's good. Due to the nature of the subject it does require rather large images.
Given how simple the definitions of these sets are, it makes it really easy and straight-forward to render them. It can be done in a few lines and is one of the first things I ever coded.
The source code for the above is here, you can use the mouse to control the value of \(c\). I left the
Here I design circular screen patterns that can be used to magnify grid-like stuff, like the pixels on your screen or threads in a cloth via Moiré Patterns, such that you can calculate properties about them with a crude measuring tool like a ruler. At the same time, I present a mathematical formulation of what even are Moiré Patterns. It's a rather ad-hoc formulation, so if there are some things I missed do point it out.
I might write a follow up post where the patterns are printed on transparencies to be used IRL.
Some context: Most of these explorations happened back in 2018 with a friend of mine, Vernice. Me and Vernice even printed out the patterns on transparencies to slap on random things IRL. Unfortunately I don't have the original files and transparencies, neither did I document anything so here I've recreated everything and re-derived the Math and stuff.
What are Moiré Patterns?
Moiré Patterns are these trippy magnified patterns that come from overlapping repeated small screen pat
Hephaestus is the Greek God of design and creativity. More commonly known as the partner of Aphrodite, he was also the god of the Forge and was well known for creating some of the finest jewellery in Greek mythology. Hephaestus was banished from Mount Olympus, simply because he walked with a limp, and when he joined the mortals on Earth he taught them how to make art and the importance of doing so. Analogous to that, the Hephaestus project aims to cultivate unique people with different perspectives, spark creativity and dares the participants to propose the ideas people might dismiss out of hand.
Edit: We take admissions on a rolling basis, so once we get the required number of innovators, admissions will close
What is Hephaestus?
Hephaestus is a week long innovation boot camp for the people who dare to dream 🧠. It aims to bring together a group of 10 people, for a program where they are able to debate, discuss, brainstorm solutions to anything they might be interested in. It provides th
Have you seen something happen that seems almost impossible to replicate? Like dropping something and have it land in just the right way, or shoot an arrow and have it land on its tip?
From a simulation standpoint, you might ask what are the initial conditions required to produce that outcome. To solve this, you could attempt to search through the whole search space. For instance, you could try all possible velocity and position of the arrow and select the ones that land on it's tip. However this is plain impractical as despite only having 7 degrees of freedom (3 for rotation, 3 for position and one for initial velocity), the search space is already huge and chances are, the solutions are but a small portion of the unwieldy search space.
Ok first off, why should we care?
The arrow problem is arguable classified under 'cool' but definitely not 'practical'. However, these kinds of problems where there is a huge search space and we are searching for only a small subset of said space is ubiqu
A long long long long long time ago, in Talk.CSS #52, Gao Wei presented a talk on Bézier curves "The Obscurities of Bézier Curves Explained to My Computer Engineer Friends". She showed uses of Bézier curves in user interface animations, some rather interesting history about it and explained the mathematics behind it. Watch the meetup on Engineers.SG!
It's actually reasonable to store passwords in a database in plaintext, if your threat model excludes the possibility that an attacker could gain access to your database.
However, the reason for hashing/salting passwords is to account for the scenario that an attacker could gain a copy of the database or read-only access to the database. Have I Been Pwned lists many site breaches that have resulted in plaintext passwords being shared or sold. Many of which were due to unprotected databases, backups and poor access controls.
With a site user's password, an attacker can easily:
Gain access to the user's account on the site
Gain access to the user's accounts on other sites
Note that the first objective is also achievable if the attacker has write access to the accounts database.
A simple defence against exposure of the user's password is to apply an unrecoverable operation on the password before storage. A hash function is such an operation. Hash functions produce a digest fr
As a kid, I wasn't actually all that into technology. When I was 7/8 years old, the only real things that mattered to me was going to chess club and studying. So I was really surprised when I was introduced to Zubin, a rather inquisitive kid who just wants to tinker.
I was approached to coach Zubin, and help him along with the projects that he would want to make, and I met him for the first time yesterday! The first thing that caught my eye was how his parents had encouraged his maker habit, he had a room with a 3D printer, cardboard boxes, LittleBits, literally anything a 7 year old with maker ambitions might want. On top of that, when I met him, he was working on a 3D printed boat which he was in the middle of designing using TinkerCAD.
My first task with him was to help him finish his boat which came along splendidly. Unfortunately, it took about 4 hours to print it out, and our session was only 2 hours long so we had to come up with a way to keep ourselves busy. I told him that brush
This morning was rather unpleasant, when I woke up to notifications that my server decided to randomly off itself in the middle of the night. Upon digging, it turns out that the network driver connecting my RealTek Ethernet Interface just up and vanished. Seems like someone has cursed me :/
I went about the diagnosis by first trying the following methods.
ifconfig -a # Does not return eth0 or alternative representations
lspci -vv # Returns the detection of the Realtek Controller but does not have any kernel driver (suspicious?)
lshw -C network # Prints network UNCLAIMED
Then, I managed to identify that the driver I needed wasn’t even getting loaded onto the kernel. To reinstall the r8168 driver, you need to download these links to a hard drive/thumb drive.
As a electronics/design engineer cum software developer, I use a Macbook Pro running MacOS. For anyone familiar with MacOS and it’s never-ending battle to sparsely support all games and design productivity software, it would be needless to mention that running my suite of design/editing tools on MacOS was a pain.
Previously, I tried my best to switch to mostly Unix supporting open source variants of my design tools, such as KiCAD for PCB design and FreeCAD for 3D modelling. But some tools, are just no replacement for professional tools such as the Autodesk Suite. Not to mention, in many undergrad level EEE modules, board logic design IDEs (like Vivado for Xilinx FPGAs) only support Windows.
As such, it is the burden of students to either dual-boot, run a local VM, or get an additional Windows PC. Knowing the performance bottleneck for my 8GB RAM and 256GB SSD Macbook running VMs and professional productivity software, I wanted to find an alternative solution to this problem.
Currently finished coupling 6 legs to a simulation body, with the leg inverse kinematics functional for all of the legs. The remaining elements to implement would be select-able individual joint controls for each leg and the body kinematics itself.
Then I completed the inverse kinematics that allows for the coupling between the body of the robot and its 6 corresponding legs (arranged with 60 degrees between each leg). I won’t bother explaining the mathematics going into these calculations in detail as they have been outlined in Oscar Liang’s blog post and the equations from TogleFritz’s Lair.
The resultant equations needed a bit of tweaking, especially with the orientation of the coordinate plane and the direction of certain rotations. Additionally, the equations from TogleFritz’s Lair are unnecessarily redundant when implemented in code. I added some optimizations and loop logic to help make the equations less cumbersome to use.