Skip to content

Instantly share code, notes, and snippets.

View zackmark29's full-sized avatar

zackmark29 zackmark29

View GitHub Profile
@jondanao
jondanao / hmac.md
Created August 26, 2015 08:19
Signing API Requests via HMAC

Signing API Requests via HMAC

Ingredients of Authenticated Request

  1. API Secret Key (aka Private Key)
  • API Access Key (aka Public Key)
  • API Endpoint
  • Timestamp
  • Signature
  • Custom Headers
@physacco
physacco / README.md
Last active December 27, 2023 09:05
Python 3 extension example

Python 3 extension example

Build

python3 setup.py build

Output: build/lib.macosx-10.11-x86_64-3.5/hello.cpython-35m-darwin.so

Run

@Tithen-Firion
Tithen-Firion / minified version for bookmarklet
Last active April 21, 2021 07:46
Steam background cropper. Crops showcase and avatar images from background. Works on background image url.
javascript:(function(){function%20a(a){var%20b=document.createElement("script");b.onload=function(){++d},b.src=a,document.body.appendChild(b)}function%20b(){2==d&&(window.clearInterval(e),c())}function%20c(){var%20a,b,c=document.createElement("canvas"),d=new%20JSZip,e=new%20Image,f=c.getContext("2d"),g=function(a,b,d,g){c.width=d,c.height=g,f.drawImage(e,a,b,d,g,0,0,d,g);var%20h=c.toDataURL("image/png");return%20h.substr(h.indexOf(",")+1)},h=function(a,b,c,e,f){d.file(a,g(b,c,e,f),{base64:!0})},i=function(){d.generateAsync({type:"blob"}).then(function(a){saveAs(a,"Steam-cropped-background.zip")})},j=function(){h(l+"avatar.png",b-461,34,164,164),h(l+"artwork_big.png",b-452,271,506,a-271),h(l+"artwork_small.png",b+62,271,100,a-271),i()},k=window.location.pathname.split("/"),l=k.length>1?k[k.length-2]+"_":"";e.onload=function(){b=Math.ceil(this.naturalWidth/2),a=this.naturalHeight,j()},e.src=document.location.href}window.location.host.indexOf("akamaihd.net")>-1&&(alert("try%20again%20now"),window.location="http:
@svrooij
svrooij / Certificates.cs
Last active November 26, 2023 11:20
C# generate X509Certificate2
/* By Stephan van Rooij
* See https://svrooij.nl/2018/04/generate-x509certificate2-in-csharp/
*/
using System;
using System.Security.Cryptography.X509Certificates;
using System.Security.Cryptography;
using Org.BouncyCastle.X509;
using Org.BouncyCastle.Utilities;
#!/usr/bin/env python3
from __future__ import print_function
import frida
import sys
import json
import time
def on_message(message, payload):
if(message['type'] == 'send'):
@Tithen-Firion
Tithen-Firion / 1_WeTV_cKey_function.md
Last active April 6, 2024 04:26
WeTV - cKey function

Here's the code (in JavaScript and Python) to make the cKey for downloading stuff from WeTV. This works for encryption version 8.1. Both versions accept the same arguments, first 5 (vid, tm, appVer, guid and platform) are the same as in the call to https://play.wetv.vip/getvinfo. url is optional for JavaScript but required for Python - that's the URL of the page you're on. userAgent, referer, navCodeName, navName and navPlatform are optional, check the code for default values.

Usage

JavaScript

makeCKey(/* arguments here */);
@agyild
agyild / FSR.glsl
Last active July 7, 2024 16:02
AMD FidelityFX Super Resolution v1.0.2 for mpv
// Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
@csm10495
csm10495 / locked_cookie_test.py
Last active June 1, 2024 03:55
POC that fetches cookies from a locked cookies file on Windows with Chromium based browsers