Skip to content

Instantly share code, notes, and snippets.

View teknogeek's full-sized avatar

Joel Margolis teknogeek

View GitHub Profile
@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 / 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 / universalUnpin.js
Last active November 19, 2024 10:33
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 / 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.
#!/usr/bin/env ruby
require 'open-uri'
require 'pathname'
require 'json'
def strip_hash(f)
ext = f.extname
if ext.include?("?")
@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 / 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 / sshpass-1.06.rb
Created November 2, 2016 14:32
sshpass 1.06 for homebrew
require 'formula'
class Sshpass < Formula
url 'http://sourceforge.net/projects/sshpass/files/sshpass/1.05/sshpass-1.05.tar.gz'
homepage 'http://sourceforge.net/projects/sshpass'
sha256 'c3f78752a68a0c3f62efb3332cceea0c8a1f04f7cf6b46e00ec0c3000bc8483e'
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
@teknogeek
teknogeek / sshpass.rb
Last active November 2, 2016 14:33
sshpass 1.06 for homebrew
require 'formula'
class Sshpass < Formula
url 'http://sourceforge.net/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz'
homepage 'http://sourceforge.net/projects/sshpass'
sha256 'c6324fcee608b99a58f9870157dfa754837f8c48be3df0f5e2f3accf145dee60'
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
@teknogeek
teknogeek / SnapchatMemories.md
Created July 8, 2016 15:45 — forked from NSExceptional/SnapchatMemories.md
Basic documentation on the new Memories API

Alrighty, so Memories:

  • First uploaded to storage.googleapis.com/snallery-m/a1ca9af0-be6b-4874-a6a1-8e30823ae0cf/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx with the following query parameters:

  • GoogleAccessId: GOOGMR536EIHHSJL2KAK

  • Expires: 14679XXXXX

  • Signature: base64 string

The thumbnail is uploaded to storage.googleapis.com/snallery-t/a1ca9af0-be6b-4874-a6a1-8e30823ae0cf/yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy with the same queries. HTTP method is PUT for both