Skip to content

Instantly share code, notes, and snippets.

View adammw's full-sized avatar
👨‍💻
Hacking on Kubernetes Platform @ Zendesk

Adam Malcontenti-Wilson adammw

👨‍💻
Hacking on Kubernetes Platform @ Zendesk
View GitHub Profile
@adammw
adammw / gist:6257550
Last active September 14, 2023 01:29
HLS / M3U8 Downloader for AES-128 Encrypted Streams
#!/usr/bin/env node
// M3U8 Downloader (not working)
var fs = require('fs');
var http = require('http');
var https = require('https');
var crypto = require('crypto');
var program = require('commander');
var ee = require('streamee');
@adammw
adammw / content_script.js
Created June 19, 2013 10:27
Chrome Extension for Debugging Secure Websockets on Spotify Web Player. Clone the repo, install extension as unpacked then navigate to `https://play.spotify.com/?ap=wss://ash1-linkap-a1.ap.spotify.com:443`
(function debugify_content_script(){
console.log('debugify content script running');
var nativeWebSocket = window.WebSocket;
var requests = window.requestLog = {};
var WebSocket = window.WebSocket = function(uri) {
console.log('new WebSocket created', uri);
this.websocket = new nativeWebSocket(uri);
this.websocket.onopen = this.onOpen.bind(this);
this.websocket.onmessage = this.onMessage.bind(this);
this.listeners = {onmessage: null, onopen: null};
@adammw
adammw / wifi_inject.c
Created November 1, 2016 05:00
WiFi raw packet injection
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <net/if.h>
#include <linux/if_packet.h>
#include <linux/if_ether.h>
#include <linux/nl80211.h>
#include <linux/genetlink.h>
@adammw
adammw / api-main.js
Last active October 1, 2022 20:40
Spotify
/*
* https://spapps.spotify.edgekey.net/api/12e172c/scripts/main.js
*
* 15/12/2012
*/
function SpotifyApi() {
this._modules = {};
this._requested = {};
this._moduleQueue = [];
this._delayedFns = [];
@adammw
adammw / client.js
Last active September 13, 2022 02:33
simple-peer / socket.io test
var Peer = require('simple-peer');
var io = require('socket.io-client');
var debug = require('debug')('client');
var socket = io.connect();
var peers = {};
var useTrickle = true;
socket.on('connect', function() {
debug('Connected to signalling server, Peer ID: %s', socket.id);
});
@adammw
adammw / omegle_chat.js
Created August 4, 2011 16:56
Omegle Command Prompt Chat Client written in Node.JS
/*
* Omegle Command Prompt Chat Client
* =================================
* Version 1.0 by adammw111
* Requires Node.JS
*/
var net = require('net');
var OMEGLE_HOST = 'cardassia.omegle.com';
var OMEGLE_PORT = 1365;
@adammw
adammw / bootstrap.sh
Created June 29, 2021 04:46
/usr/local/share/eks/bootstrap.sh
#!/usr/bin/env bash
# CLOUD_IMG: This file was created/modified by the Cloud Image build process
#
# This file is part of the Ubuntu EKS image. This is a customized version of the
# Amazon bootstrap script for the use with Ubuntu EKS images.
#
# Copyright (C) 2020 Canonical Ltd.
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 3, as published by the
(function(root, factory) {
if(typeof define === 'function' && define.amd) {
define([], factory);
} else {
root.forge = factory();
}
})(this, function() {
/**
* @license almond 0.2.9 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.