Skip to content

Instantly share code, notes, and snippets.

View teknogeek's full-sized avatar

Joel Margolis teknogeek

View GitHub Profile
@teknogeek
teknogeek / universalUnpin.js
Last active May 12, 2026 19:46
Frida Universal™ SSL Unpinner
Java.perform(function() {
console.log('\n[.] Cert Pinning Bypass');
// Create a TrustManager that trusts everything
console.log('[+] Creating a TrustyTrustManager that trusts everything...');
var X509TrustManager = Java.use('javax.net.ssl.X509TrustManager');
var TrustyTrustManager = Java.registerClass({
name: 'com.example.TrustyTrustManager',
implements: [X509TrustManager],
methods: {
@teknogeek
teknogeek / README.md
Last active October 18, 2023 15:06
A Greasemonkey Script to Whitelist YouTube Channels with uBlock Origin

NOTE: This script has been designed to work only with YouTube's new material design layout

How to Whitelist a Channel

Personally, I use uBlock Origin since it's faster, more efficient, and less biased than Adblock Plus. So, here are instructions on how to add a whitelist rule for a channel in uBlock

  1. Goto a YouTube video posted by the channel you want to whitelist
  2. Wait for it to load and copy the text following the &user= portion of the URL
  3. Click on the uBlock icon
  4. Click on the gear in the corner of the pop-up window
  5. Click on the "Whitelist" tab in the options page
@teknogeek
teknogeek / overlay.css
Last active January 3, 2023 22:10
Discord OBS Overlay CSS (Browser Source)
body {
zoom: 1.5;
}
div[class*="sidebar-"],
div[class*="notice-"],
nav[class*="guilds-"],
form[class*="form-"],
div[class*="newMessagesBar-"],
#---new-messages-bar,
@teknogeek
teknogeek / SwitchDevice.ps1
Last active November 10, 2022 15:24
Switch audio device between Voicemod and USB Line In
# Requires: Install-Module -Name AudioDeviceCmdlets -Force -Verbose
$targetDevice = $args[0].ToLower()
$targetDeviceID = $null
if ($targetDevice -eq 'usb') {
$targetDeviceID = (Get-AudioDevice -List | Where-Object { $_.Type -eq 'Recording' -and $_.Name -match 'Line \(\d+- USB AUDIO CODEC\)' }).ID
} elseif ($targetDevice -eq 'voicemod') {
$targetDeviceID = (Get-AudioDevice -List | Where-Object { $_.Type -eq 'Recording' -and $_.Name -eq 'Microphone (Voicemod Virtual Audio Device (WDM))' }).ID
} else {
throw 'Invalid target type'
@teknogeek
teknogeek / dc27_badge.c
Created August 9, 2019 17:46
DC27 badge code
/*
DEFCON 27 Official Badge (2019)
Author: Joe Grand, Grand Idea Studio [@joegrand] aka Kingpin
Program Description:
This program contains the firmware for the DEFCON 27 official badge.
@teknogeek
teknogeek / chromedev.sh
Last active March 8, 2019 02:52
Add this to your .bashrc to make a command to restart chrome without that pesky XSS auditor
# launch chromium with or without proxy
function chromium() {
if [[ "$#" -eq 0 || "$#" -gt 2 ]]; then
echo
echo "Usage: chromium [port] [enable xss Auditor]"
echo " example:"
echo " $ chromium 8080 1 - runs Chromium listening on 8080 and XSS Auditor enabled"
return
fi
@teknogeek
teknogeek / ace-browser-editor.md
Last active September 19, 2018 19:22
Ace Browser Editor

Change e.getSession().setMode(...) to "ace/mode/<language>" where <language> is your preferred programming language to have proper syntax highlighting. Then copy and paste the code into your browser bar and edit away :D.

data:text/html,
<div class="e" style="position: absolute; top: 0; right: 0; bottom: 0; left: 0;" id="editor"></div>
<script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
<script>
	var e = ace.edit("editor");
	e.setTheme("ace/theme/monokai");
	e.getSession().setMode("ace/mode/javascript");
@teknogeek
teknogeek / The Technical Interview Cheat Sheet.md
Last active May 11, 2018 06:01 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@teknogeek
teknogeek / memoryhog.cpp
Created April 25, 2016 18:15
Snippet that causes g++ to hang and use gigabytes of ram (no template/include loops)
#include <stdio.h>
// tested on gcc-4.9.3 on linux gentoo amd64
// warning: compiling this will eat gigabytes of ram really fast so keep
// your CTRL-C ready
// compile with --std=c++14
struct v2f {
float x=0, y=0; // must be =0 to reproduce (probably works with other vals)
};
#!/usr/bin/env ruby
require 'open-uri'
require 'pathname'
require 'json'
def strip_hash(f)
ext = f.extname
if ext.include?("?")