Skip to content

Instantly share code, notes, and snippets.

@dushankw
dushankw / MITM -SSL-Proxies.md
Created August 13, 2018 04:36 — forked from jeremiahsnapp/MITM -SSL-Proxies.md
Man In The Middle (MITM) SSL Proxies - Simple ways to see traffic between an SSL server and client in clear text.

HTTP(S) specific MITM SSL Proxies

mitmproxy

mitmproxy is an excellent console app written in Python.

It is easy to use on Linux and OS X.

Use brew install mitmproxy to install it on OS X.

@dushankw
dushankw / inline_file.rb
Created September 14, 2020 04:01 — forked from pda/inline_file.rb
A basic !InlineFile YAML tag/function resolver for inlining Lambda into CloudFormation; assumes two-space indentation
PATTERN = %r{
^
(?<indent>\s*)
(?<key>\S+):
\s*
!InlineFile
\s*
(?<file>.*)
$
}x
# Create this file in /etc/udev/rules.d/51-android.rules (root owned, bitmask 0644)
# Reload udev (udevadm control --reload-rules)
#
# It will allow members of the `adbusers` group to access the phone over usb without being root
# You should create a new unprivileged user who is a member of this group, then run `adb` as said user
#
# To add a new device, plug in the device and run `lsusb` to determine its device id then add it in, eg:
# $ lsusb
# Bus 002 Device 063: ID 18d1:4ee7 Google Inc. Nexus/Pixel Device (charging + debug)
# /etc/udev/rules.d/NN-rtl-sdr.rules
# sudo udevadm control --reload-rules && sudo udevadm trigger
# sudo usermod -a -G plugdev $USER
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", MODE="0660", GROUP="plugdev"
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.22 (GNU/Linux)
mQENBGTtIoIBCAD2M1aoGIE0FXynAHM/jtuvdAVVaX3Q4ZejTqrX+Jq8ElAMhxyO
GzHu2CDtCYxtVxXK3unptLVt2kGgJwNbhYC393jDeZx5dCda4Nk2YXX1UK3P461i
axuuXRzMYvfM4RZn+7bJTu635tA07q9Xm6MGD4TCTvsjBfViOxbrxOg5ozWbJdSw
fSR8MwUrRfmFpAefRlYfCEuZ8FHywa9U6jLeWt2O/kqrZliJOAGjGzXtB7EZkqKb
faCCxikjjvhF1awdEqSK4DQorC/OvQc4I5kP5y2CJbtXvXO73QH2yE75JMDIIx9x
rOsIRUoSfK3UrWaOVuAnEEn5ueKzZNqGG1J1ABEBAAG0J1NTTSBBZ2VudCA8c3Nt
LWFnZW50LXNpZ25lckBhbWF6b24uY29tPokBPwQTAQIAKQUCZO0iggIbLwUJAsaY

To get the channel ID of a public YouTube channel, you can follow these steps:

  1. Go to YouTube: Open YouTube in your web browser.

  2. Find the Channel: Use the search bar to find the channel you're interested in. Once you've found the channel, click on the channel name to go to the channel's homepage.

  3. Check the URL: There are a couple of ways the channel ID can appear in the URL, depending on how the channel URL is structured:

    • Standard Channel URL: For many channels, the URL when you visit their homepage will directly contain the channel ID. It will look something like https://www.youtube.com/channel/UCXXXXXXXXXXXXXXXXXXXXXX. In this URL, the channel ID is the alphanumeric string after /channel/ (e.g., UCXXXXXXXXXXXXXXXXXXXXXX).
@dushankw
dushankw / chrome_websocket_messages.py
Created March 16, 2024 03:24 — forked from achmel/chrome_websocket_messages.py
Tiny parser to get websocket messages from Google Chrome Developer Tools > Network > Export HAR...
# !/usr/bin/env python3
# encoding: utf-8
import json
file_name = 'websocket.har'
f = open(file_name)
j = json.load(f)
entries = j['log']['entries']
for e in entries:
if e['_resourceType'] == 'websocket' and '_webSocketMessages' in e.keys():