Skip to content

Instantly share code, notes, and snippets.

View BigNerd95's full-sized avatar

Lorenzo Santina BigNerd95

View GitHub Profile
@BigNerd95
BigNerd95 / openwrt_curl_second_pppoe.sh
Created November 13, 2019 20:55
Make a curl request using a new pppoe connection (this allows you to make requests using many different IPs without dropping your internet connection)
#!/bin/sh
url="http://api.ipify.org/"
user="pppoeuser"
pass="pppoepwd"
nic="dsl0.835"
name="wan100"
echo "Starting new pppoe connection"
/usr/sbin/pppd updetach ipparam $name ifname pppoe-$name user $user password $pass lcp-echo-interval 86400 lcp-echo-failure 1024 lcp-echo-adaptive +ipv6 set AUTOIPV6=1 set PEERDNS=0 nodefaultroute usepeerdns maxfail 1 ip-up-script /lib/netifd/ppp-up ipv6-up-script /lib/netifd/ppp6-up ip-down-script /lib/netifd/ppp-down ipv6-down-script /lib/netifd/ppp-down mtu 1492 mru 1492 plugin rp-pppoe.so nic-$nic
# BigBlueButton downloader by BigNerd95
url="$1"
proto=$(echo "$url" | sed -e 's|^\(.*://\).*|\1|g')
domain=$(echo "$url" | sed -e 's|^[^/]*//||' -e 's|/.*$||')
mid=$(echo "$url" | sed -e 's|.*meetingId=||')
base=$(echo "$proto$domain/presentation/$mid")
audio=$(echo "$base/video/webcams.mp4")
video=$(echo "$base/deskshare/deskshare.mp4")