Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🤦‍♂️

Ali Borhani alibo

💭
🤦‍♂️
View GitHub Profile
@alibo
alibo / shadowsocks_ubuntu1604.org
Created Jan 28, 2021 — forked from nuhuo08/shadowsocks_ubuntu1604.org
Install Shadowsocks-libev + simple-obfs on Ubuntu 16.04
View shadowsocks_ubuntu1604.org

Install Shadowsocks-libev + simple-obfs on Ubuntu 16.04

Install shadowsocks-libev via Ubuntu PPA

sudo apt-get install software-properties-common -y
sudo add-apt-repository ppa:max-c-lv/shadowsocks-libev -y
sudo apt-get update
sudo apt install shadowsocks-libev
@alibo
alibo / tlslog.go
Last active Sep 3, 2020
Capture TLS traffic and log SNI and TLS version using GoPacket and TLSx: (https://github.com/google/gopacket & https://github.com/dreadl0ck/tlsx)
View tlslog.go
// It's modified version of: https://github.com/dreadl0ck/tlsx/blob/master/example/main.go
package main
import (
"flag"
"fmt"
"log"
"os"
"sync"
@alibo
alibo / helloworld.pb.go
Created Aug 3, 2020
GRPC HTTP2+TLS Helloworld example
View helloworld.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.12.4
// source: helloworld.proto
package main
import (
context "context"
@alibo
alibo / http2.go
Created Jul 20, 2020
Simple HTTP2 echo headers
View http2.go
package main
import (
"flag"
"fmt"
"log"
"net/http"
"time"
)
@alibo
alibo / cafebazaar-apk-downloader.sh
Last active Feb 19, 2021
[Updated: 19 Feb 2021] Cafebazaar APK Downloader
View cafebazaar-apk-downloader.sh
#!/bin/bash
pkg=$1
sdk=${2:-22}
cpu=${3:-x86,armeabi-v7a,armeabi}
body=$(cat << EOF
{
"properties": {
"language": 2,
@alibo
alibo / main.go
Last active May 27, 2020 — forked from walm/main.go
Simple Golang DNS Server (simplified version)
View main.go
package main
import (
"fmt"
"log"
"strconv"
"github.com/miekg/dns"
)
@alibo
alibo / apple-ocsp-hosts
Created May 21, 2020
If you're trying to open an app in OSX, but it takes so long! (and apparently you also live in Iran!)
View apple-ocsp-hosts
# Add this record to your `/etc/hosts` file; You can run one of these commands to do so:
#
# $ sudo bash -c 'echo "0.0.0.0 ocsp.apple.com" >> /etc/hosts'
#
# or
#
# $ sudo nano /etc/hosts
#
# More info: https://support.apple.com/en-us/HT210060
@alibo
alibo / main.go
Created May 13, 2020
Simple http echo headers
View main.go
package main
import (
"fmt"
"net/http"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
@alibo
alibo / ilo3_g7.py
Created Nov 10, 2018
Getting Health information from FUCKING old ilo3 on g7
View ilo3_g7.py
# issue: https://github.com/seveas/python-hpilo/issues/189
# thanks to @Shados: https://github.com/seveas/python-hpilo/issues/189#issuecomment-430893230
import re
import ssl
import json
import hpilo
ilo3_context = ssl.create_default_context()
@alibo
alibo / sites.conf
Last active Nov 5, 2018
How to send traffic of some endpoints to a different app in Nginx (php + golang)
View sites.conf
upstream @api_golang {
server 127.0.0.1:8080; # same node
server 111.222.111.222:8080;
}
upstream @api_php {
server 127.0.0.1:80; # nginx/apache/... - another node
server 111.222.111.222:80; # nginx/apache/... - another node
}