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 / kindle_get_ota.py
Created January 29, 2025 20:51
Simple script to grab latest direct ota url for your kindle
from Crypto.Hash import SHA256
from Crypto.PublicKey import ECC
from Crypto.Signature import DSS
from urllib.parse import urlparse
import re
import json
import requests
import datetime
import base64
import sys
import requests
import json
import re
from requests_toolbelt.multipart.encoder import MultipartEncoder
WEBHOOK = ""
TOKEN = ""
CHANNEL_ID = ""
AVATAR_URL = lambda uid, aid: f"https://cdn.discordapp.com/avatars/{uid}/{aid}.webp?size=96"
EMOJI = lambda name, id: f"[{name}](https://media.discordapp.net/emojis/{id}.webp?size=48&quality=lossless&name={name})"
STICKER = lambda name, id: f"[{name}](https://media.discordapp.net/stickers/{id}.webp?size=240)"
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <cstdint>
#include <filesystem>
#include <format>
#include "MinHook.h"
#define ORIG(fn) static_cast<decltype(&(fn))>(o_##fn)

AssetOwnership.DeviceSharingUpdated

Name Type Access Value
adm_message Str w
adm_registration Str w
s2dm_message Str w

CampaignSync.Invalidate

Name Type Access Value
adm_message Str w
// ==UserScript==
// @name New script - animebytes.tv
// @namespace Violentmonkey Scripts
// @match https://animebytes.tv/torrents.php*
// @grant none
// @version 1.1
// @author -
// @description 11/10/2023, 4:38:44 PM
// ==/UserScript==
(async()=>{
// ==UserScript==
// @name SendToClient
// @namespace NotMareks Scripts
// @description Painlessly send torrents to your bittorrent client.
// @match *://*.gazellegames.net/*
// @match *://*.animebytes.tv/*
// @match *://*.orpheus.network/*
// @match *://*.passthepopcorn.me/*
// @match *://*.greatposterwall.com/*
// ==UserScript==
// @name AnilistBytes
// @match https://anilist.co/*
// @match https://animebytes.tv/*
// @run-at document-end
// @version 1.9.7
// @author notmarek
// @updateURL https://gist.github.com/notmarek/4d1d8f91cb90b4b1292fb7c8e28b8f16/raw/AnilistBytes.user.js
// @downloadURL https://gist.github.com/notmarek/4d1d8f91cb90b4b1292fb7c8e28b8f16/raw/AnilistBytes.user.js
@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.`);
 }