Skip to content

Instantly share code, notes, and snippets.

View random-robbie's full-sized avatar
💭
Hacking!

Robbie random-robbie

💭
Hacking!
View GitHub Profile
@random-robbie
random-robbie / parseproxy.php
Created September 23, 2015 14:27
Parse Proxy Auto Conf
<?php
$list = file_get_contents("http://www.tellypass.com/pac/annie-2315");
function scrape_between($data, $start, $end){
$data = stristr($data, $start); // Stripping all data from before $start
$data = substr($data, strlen($start)); // Stripping $start
$stop = stripos($data, $end); // Getting the position of the $end of the data to scrape
$data = substr($data, 0, $stop); // Stripping all data from after and including the $end of the data to scrape
return $data; // Returning the scraped data from the function
## send request back to apache1 ##
location / {
proxy_pass http://$host$uri;
proxy_set_header Accept-Encoding "";
proxy_redirect off;
proxy_buffering off;
proxy_ssl_verify off;
proxy_ssl_server_name on;
proxy_set_header Host $host;
resolver 8.8.8.8;
@random-robbie
random-robbie / brokenSSL
Created September 29, 2015 07:11
nginx reverse proxy
events {
worker_connections 1024;
}
user www-data;
worker_processes 4;
http {
# Basic Settings
sendfile on;
@random-robbie
random-robbie / dockerinstall.sh
Last active September 30, 2015 13:45
Install Docker for ubuntu 15
apt-get update
curl -sSL https://get.docker.com/ | sh
update-rc.d docker defaults
service docker start
@random-robbie
random-robbie / build.sh
Created September 30, 2015 12:47
No Iptables
#!/bin/bash
# Note, this script assumes Ubuntu Linux and it will most likely fail on any other distribution.
# bomb on any error
set -e
# change to working directory
root="/opt/netflix-proxy"
"videos":[
{
"ss_id":95244,
"sport_name":"",
"tournament_name":"Blitz",
"name":"Blitz",
"description":"Blitz ",
"thumbnail":"http://cdn.dstv.com/supersport.img/videoimages/2014/12/live_stream_lauren_SSBlitz_120x90.jpg",
"image":"http://cdn.dstv.com/supersport.img/videoimages/2014/12/live_stream_lauren_SSBlitz_536x400.jpg",
@random-robbie
random-robbie / build_nginx.sh
Last active November 2, 2021 23:45 — forked from Belphemur/build_nginx.sh
Compiling Nginx with LibreSSL & RTMP module
#!/usr/bin/env bash
# names of latest versions of each package
export NGINX_VERSION=1.11.5
export VERSION_PCRE=pcre-8.39
export VERSION_LIBRESSL=libressl-2.5.0
export VERSION_NGINX=nginx-$NGINX_VERSION
export NPS_VERSION=1.11.33.0
export VERSION_PAGESPEED=v${NPS_VERSION}-beta
POST /proxy/channelStream HTTP/1.1
User-Agent: Mozilla/5.0 (Linux; Android 6.0; beIN SPORTS/5.4)
X-AN-WebService-IdentityKey: 2OogXO1e2R7dhS19O0hXeV3Bf8itRt2K
Content-Type: application/x-www-form-urlencoded
Content-Length: 23
Host: proxies-beinmena.portail.alphanetworks.be
Connection: Keep-Alive
Accept-Encoding: gzip
authToken=&idChannel=17
@random-robbie
random-robbie / json2xml.php
Created October 30, 2015 10:26
JSON TO XML via POST request
<?php
$json_post = $_REQUEST['json'];
function json_validate($string)
{
// decode the JSON data
$result = json_decode($string);
// switch and check possible JSON errors
switch (json_last_error()) {
@random-robbie
random-robbie / replace_apt_sources.sh
Created November 10, 2015 15:39 — forked from eculver/replace_apt_sources.sh
Replace default Ubuntu apt repository URLs w/ DigitalOcean's
sudo sed -i "s/archive\.ubuntu/mirrors.digitalocean/g" /etc/apt/sources.list