Skip to content

Instantly share code, notes, and snippets.

@chocolatkey
chocolatkey / README.MD
Last active April 8, 2023 08:13
Cloudflare S2 Browser Isolation Trace

This is just some quick data from the CF browser isolation beta. If you inspect the isolated webpage, there's a debug-sidebar you can add a show class to to make visible. From there, you can run a trace and get some info about the machines these VMs are on. These are the stubs of the metadata elements of two random traces I made.

P.S. no exploits found yet ;)

@chocolatkey
chocolatkey / hash.ts
Created February 4, 2023 10:52
CDB over HTTP
const STARTING_HASH = 5381;
export default function cdbHash(key: string) {
let hash = STARTING_HASH;
const length = key.length;
for (let i = 0; i < length; i++) {
hash = ((((hash << 5) >>> 0) + hash) ^ key.charCodeAt(i)) >>> 0;
}
@chocolatkey
chocolatkey / drive:v2internal.json
Last active September 24, 2022 12:21
No, I don't work at Google
{
"kind": "discovery#restDescription",
"discoveryVersion": "v1",
"id": "drive:v2internal",
"name": "drive",
"version": "v2internal",
"revision": "20180702",
"title": "Drive API",
"description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.",
"ownerDomain": "google.com",
@chocolatkey
chocolatkey / filter.txt
Created September 30, 2019 20:20
Bypass Komiflo region detection (add to ublock origin filter)
||region-test.komiflo.com/region-test.gif$image,redirect=1x1-transparent.gif,domain=komiflo.com
@chocolatkey
chocolatkey / regex.md
Last active January 10, 2021 23:50
Stimulus.JS 2.0.0 target upgrade from 1.x

Easy to do in VS Code global search

Search: data-target="([\w\d]+)\.([\w\d]+)"

Replace: data-$1-target="$2"

@chocolatkey
chocolatkey / loopbackCookie.go
Created December 16, 2020 23:17
Express signed cookie parser (for loopback) in go
import (
"crypto/hmac"
"crypto/sha256"
"crypto/subtle"
"encoding/base64"
"net/http"
"net/url"
"strings"
)
@chocolatkey
chocolatkey / slack.php
Created October 23, 2015 18:09
Slack team invite sign-up form handler
<?php
/*
Slack team invite sign-up form handler
Henry Stark 2015
Original Idea: https://levels.io/slack-typeform-auto-invite-sign-ups/
*/
/* VARIABLES TO EDIT */
$slackTeam = 'scanlation';// Slack team name
$slackToken = 'xoxp-1234';// Slack API token (Generate at https://api.slack.com/web)
@chocolatkey
chocolatkey / rekmathletics.user.js
Last active December 14, 2020 20:56
Press Shift+D and start reking
// ==UserScript==
// @name RekMathletics.exe
// @version 1.0
// @downloadURL https://gist.githubusercontent.com/chocolatkey/0c98caaee25e425e066d361d0493e534/raw
// @supportURL https://gist.github.com/chocolatkey/0c98caaee25e425e066d361d0493e534
// @description Get reked
// @author chocolatkey
// @homepage https:/github.com/chocolatkey
// @include http://*live.mathletics.com*
// @run-at document-start
@chocolatkey
chocolatkey / EBookJapanRipper.user.js
Last active September 3, 2020 21:11
Doesn't work right now
// ==UserScript==
// @name EBookJapanRipper
// @version 1.10
// @downloadURL https://gist.githubusercontent.com/chocolatkey/ad0c04b0768f5fcdd3ea3c6cb089b8b2/raw
// @supportURL https://gist.github.com/chocolatkey/ad0c04b0768f5fcdd3ea3c6cb089b8b2
// @description Send my regards to "t-hamaguchi" lol
// @author chocolatkey
// @homepage https:/github.com/chocolatkey
// @include http://*br.ebookjapan.jp*
// @include https://*br.ebookjapan.jp*