Seat Leon spark plugs

Seat Leon 5f Spark Plug Replacement Procedure

To access all the spark plugs, I had to remove the air filter box and a part of the intake manifold, which was a bit tedious. Afterward, I just had to disconnect the plug and could unscrew the spark plug using a spark plug socket. I applied a bit of ceramic paste to each new spark plug and then reinstalled them with a torque wrench (in my case, 25Nm - check the manual if unsure)....

January 27, 2024 路 Jannis
Seat Leon

Seat Leon 5f Frontlight Repair Procedure

Remove the cover plates to access the frontal lights. Ensure to reconnect the bulb in the same orientation. Pay close attention to the polarity; the little rectangle should face downwards for the inner lights and upwards for the outer lights. Reversing the polarity may cause malfunction or damage. Always double-check the orientation to avoid potential issues with reverse polarity.

January 27, 2024 路 Jannis
Opened cat toy with a esp32

Make a Cat-Toy smart

I buyed my cats this toy that drives around with a laserpointer on top. It was a banger on first sight so I decided to add a remote controlling ESP-32 that can be reached over HTTP to control it. I built a simpe web page with a button to start and stop it. Wiring diagram: Arduino source code for this: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 #include <WiFi....

December 21, 2023 路 Jannis

Using the FASM Assembler

If there is a project in which you need to assemble code in a C# project, you found the right place. I鈥檒l be using the flatassembler (https://flatassembler.net/) and it鈥檚 FASM.dll (which you can download in the forum https://board.flatassembler.net/topic.php?t=6239) to achieve this. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 // remove fixed(stackalloc) if buffer gets to big to fit on the stack or if safe context is needed, it is only used for performance here fixed (byte* pBytes = stackalloc byte[64]) // 64 is the size of the buffer for the assembled instructions { if (FasmAssemble("use32\nXOR EAX,EBX", pBytes, 64, 16, IntPtr....

October 24, 2023 路 Jannis

Memory Editing

In many projects, I needed to access another process鈥檚 memory but there are only a few examples that are not using C#鈥檚 full potential and some of them are very old. I came up with a simple way of reading and writing memory with very little code. Keep in mind that this way only works for unmanaged data types like int or byte, to read strings from memory you need to do some more work, have a look into this class: https://github....

October 24, 2023 路 Jannis
windows dumpbin showing VirtualAlloc import

Hiding Dll Imports in Windows Executables

Sometimes you have to hide stuff that your code does from a reverse engineer鈥檚 eye or static analysis tools. To achieve that, I came up with a few helper macros and functions to search for functions at runtime and call them without leaving a trace in the executable鈥檚 import table. TL;DR Hiding function imports Let鈥檚 take this simple program as an example: 1 2 3 4 5 6 7 #include <Windows....

October 22, 2023 路 Jannis

Compile-Time Hashing: Fnv1a

There may come a time that you don鈥檛 want to leave strings in your executable but still need to do some kind of string comparison. For that I use the compile-time constexpr features of modern c++ compilers. 1 2 3 4 auto hash = CX_Fnv1a("shady_lib.dll") // in case you need to ignore case, string will be converted to lowercase auto hash = CX_IFnv1a("shady_lib.dll") Check the output binary using string.exe, there will be no trace of shady_lib....

October 22, 2023 路 Jannis

Simple Memory Pattern Search Algorithm

While digging in my old code repositories I stumbled upon a memory pattern search algorithm I once used in a cheat I made. Maybe i鈥檛s useful for someone at some time. It may be used like this: 1 2 3 4 constexpr unsigned char patD3Device[] = { 0xA1, '?', '?', '?', '?', 0x50, 0x8B, 0x08, 0xFF, 0x51, 0x0C }; // search for the patD3Device ('?' characters are non static values) from memory address 0x400000 to 0x408192 auto patternAddress = SearchPattern(patD3Device, sizeof(patD3Device), 0x400000, 0x8192); 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 /// <summary> /// Search a memory pattern....

October 22, 2023 路 Jannis