Skip to content

Instantly share code, notes, and snippets.

View notmarek's full-sized avatar
🗾
haha

Marek Veselý notmarek

🗾
haha
View GitHub Profile
@notmarek
notmarek / most_seen_color.cs
Created September 23, 2021 19:45
Code to get the most used color in the middle 100x100 area of an image
using System;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using System.Collections.Generic;
namespace picture_perfet
{
class Program
{
static void Main(string[] args)
const alwaysTrueHook = (name, address) => {
  Interceptor.attach(address, {
    onLeave: function (retval) {
      if (retval != 0x1) {
        console.log(`[~] ${name} failed, patching... [${retval} -> 0x1]`);
        retval.replace(0x1);
      } else {
        console.log(`[i] ${name} successful, no patch needed.`);
 }

Keybase proof

I hereby claim:

  • I am veselysps on github.
  • I am notmarek (https://keybase.io/notmarek) on keybase.
  • I have a public key ASA-We2iqUbjy-ohM8eCmztCJ0qdTxg0ue05VAjroSzxfwo

To claim this, I am signing this object: