Skip to content

Instantly share code, notes, and snippets.

View jonbarrow's full-sized avatar
🏠
Working from home

Jonathan Barrow jonbarrow

🏠
Working from home
View GitHub Profile
class AsyncLoop {
constructor(length, looper, cb) {
this.i = -1;
this.length = length;
this.looper = looper;
this.callback = cb;
this.loop();
}
loop() {
this.i++;
# **********************************************************************
# * Project: 00-piws-vars *
# * Created: 05/06/2018 22:27 *
# * Author: Martin Svensson aka ztealmax - pi-workbench.org *
# * Info: create in /etc/chromium-browser/customizations/ *
# * Note: replaces rpi-chromium-mods *
# **********************************************************************
#
PICHROMIUMMODS="/etc/chromium-browser/customizations/00-rpi-vars"
@jonbarrow
jonbarrow / writeup.md
Last active September 4, 2019 04:37
[Vulnerability] GitKraken Pro Free write up

I emailed GitKraken on August 12th, 2019 about this issue which went nowhere

In GitKraken there is a potential vulnerability that allows access to Pro features without paying for them. I have tested this in 6.0.1, 6.1.1, and 6.1.4, but I suspect it works in all other versions as well.

Using a proxy server, such as Fiddler on Windows, it is trivial to change the response from the "https://api.gitkraken.com/phone-home" API endpoint to trick GitKraken into thinking the user has a Pro (or other) plan, unlocking the features of that plan even if the user has not paid for it.

This is done by changing the response from the "https://api.gitkraken.com/phone-home" endpoint to:

{
@jonbarrow
jonbarrow / wonderfulsubs.py
Created November 14, 2019 04:01
Python scraper for wonderfulsubs.com
from pyee import BaseEventEmitter # Event emitter class base
import requests # request module
import asyncio # async utils
import concurrent.futures # futures (like a JS promise)
# constants
URL_BASE = "https://www.wonderfulsubs.com/api/media"
SEARCH_URL = "%s/search?q=" % URL_BASE
SERIES_URL = "%s/series?series=" % URL_BASE
STREAM_URL = "%s/stream?code=" % URL_BASE
@jonbarrow
jonbarrow / kickassanime.js
Created July 31, 2019 03:16
Scrapes kickassanime.io
const got = require('got');
const crypto = require('crypto');
const querystring = require('querystring');
const JSON5 = require('json5'); // Lazy-parse JSON
const URL_BASE = 'https://www18.kickassanime.io';
const SEARCH_URL = `${URL_BASE}/api/anime_search`;
const IV_REGEX = /"vt":"(.*?)"/;
const KEY_REGEX = /"sig":"(.*?)"/;
@jonbarrow
jonbarrow / animeultima.js
Created October 24, 2019 01:08
Scraper for animeultima.eu
const cloudscraper = require('cloudscraper'); // Bypass cloudfare
const { JSDOM } = require('jsdom'); // DOM access in Node
const async = require('async'); // async utils
const animeIdRegex = /anime-id="(\d*)"/; // Regex to find the anime ID for the site
const sourceRegex = /file: "(.*)"/g;
const iframeRegex = /iframe .* src="(.*)"/;
// URL list
const URL_BASE = 'https://animeultima.eu';
@jonbarrow
jonbarrow / wonderfulsubs.js
Created November 8, 2019 22:51
Scraper for wonderfulsubs.com
const got = require('got');
const async = require('async');
const URL_BASE = 'https://www.wonderfulsubs.com/api/media';
const SEARCH_URL = `${URL_BASE}/search?q`;
const SERIES_URL = `${URL_BASE}/series?series`;
const STREAM_URL = `${URL_BASE}/stream?code`;
// Options for "got"
const OPTIONS = {
@jonbarrow
jonbarrow / wiiu-title-ticket-downloader-parser.js
Created November 16, 2019 03:21
Script to download title tickets and certificates from the NUS CDN and parse them
const got = require('got');
const fs = require('fs');
const NodeRSA = require('node-rsa');
const { xml2js } = require('xml-js');
// Client to connect to the eShop SOAP api
const soapClient = got.extend({
baseUrl: 'https://ecs.wup.shop.nintendo.net',
method: 'post',
cert: fs.readFileSync('./eshop-common.crt'), // Client certificates. You can find these online, they are common to all consoles
@jonbarrow
jonbarrow / archive.py
Last active April 11, 2021 04:24
Rip SMM1 course data and metadata from Nintendo's servers using NEX
'''
Credit Jonathan Barrow 2021
This will rip courses from SMM1 using NEX to automate the process
Use at your own risk, I am not resposible for any bans
Requires Python 3 and https://github.com/Kinnay/NintendoClients
Licensed under GNU GPLv3
'''
@jonbarrow
jonbarrow / connect.js
Last active October 22, 2023 21:20
Discord remote login script example
/*
Discord is able to log users in by scanning QR codes on the login screen,
these are randomly generated by the server and are sent to the client
over a secure web socket as a fingerprint, which gets scanned in by the app
and then used to login remotely. The QR codes actual contents are just
https://discord.com/ra/FINGERPRINT
This script shows how to connect to Discord and generate these
fingerprints automatically
*/