Skip to content

Instantly share code, notes, and snippets.

@ironpillow
ironpillow / gist:80f3ee608ad93243a2ca6c2901eb2bb5
Created March 11, 2019 21:17
Hacking router - wlctl usage help
Usage: wlctl [-a|i <adapter>] [-h] [-d|u|x] <command> [arguments]
-h this message and command descriptions
-h [cmd] command description for cmd
-a, -i adapter name or number
-d output format signed integer
-u output format unsigned integer
-x output format hexdecimal
ver get version information
@ironpillow
ironpillow / docker-ce-ubuntu-17.10.md
Last active August 24, 2018 21:58 — forked from levsthings/docker-ce-ubuntu-17.10.md
Install Docker CE on Ubuntu 17.10

Installing Docker CE on Ubuntu 17.10 Artful Aardvark

docker releases: https://download.docker.com/linux/ubuntu/dists/artful/

If you are used to installing Docker to your development machine with get-docker script, that won't work either. So the solution is to install Docker CE from the artful package.

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
@ironpillow
ironpillow / post.lua
Created March 2, 2018 03:38 — forked from defp/post.lua
use luasocket send post data
#!/usr/bin/env lua
local http=require("socket.http");
local request_body = [[login=user&password=123]]
local response_body = {}
local res, code, response_headers = http.request{
url = "http://httpbin.org/post",
method = "POST",
headers =
local iwinfo = require("iwinfo")
networks = iwinfo.wext.scanlist("wlan0")
--[[
...
{
bssid = "C0:61:18:FB:B0:A0",
channel = 11,
encryption = {
auth_algs = { }, auth_suites = { }, description = "None"
enabled = false, group_ciphers = { }, pair_ciphers = { }
@ironpillow
ironpillow / uci-guest-wifi.sh
Created November 22, 2017 19:31 — forked from tongpu/uci-guest-wifi.sh
uci script for OpenWRT guest WiFi configuration
#!/bin/sh
uci batch << EOF
add network switch_vlan
set network.@switch_vlan[-1].device='switch0'
set network.@switch_vlan[-1].ports='1t 5t'
set network.@switch_vlan[-1].vlan='2'
set network.guest='interface'
set network.guest.type='bridge'
@ironpillow
ironpillow / uap-ac-lite-openwrt.txt
Created November 14, 2017 21:42 — forked from lg/uap-ac-lite-openwrt.txt
making the ubnt wifi awesome (uap ac lite) w/ openwrt
making the ubnt wifi awesome (uap ac lite) w/ lede (openwrt)
the reasons you would do this:
- you get 802.11r
- you get better roaming
- you get access to some new 5ghz channels
I AM NOT TO BE HELD RESPONSIBLE FOR ANYTHING IN HERE. DO AT YOUR OWN RISK. THANK YOU AND HAVE A LOVELY DAY.
** note that though we're using Lede, it's essentially openwrt minus the drama
@ironpillow
ironpillow / sign-openwrt-packages
Created November 7, 2017 04:20 — forked from hongkongkiwi/sign-openwrt-packages
Little script to sign OpenWRT packages after running a build. I used this because I couldn't figure out how to do it automatically when using the SDK.
#!/bin/bash
#
# AUTHOR: Andy Savage <andy@savage.hk>
# GITHUB: https://gist.github.com/hongkongkiwi/cfef6910c5c644eaebc9
# PURPOSE: After building one or more packages in OpenWRT this script signs them with a key file
# this can then be easily used in opkg to verify signatures.
#
KEY_DIR="$HOME/signify-keys"
@ironpillow
ironpillow / build-openwrt.sh
Created September 29, 2017 04:44 — forked from lool/build-openwrt.sh
OpenWRT build script
#!/bin/sh
set -e -x
# for Ubuntu 16.04
#PACKAGES="git build-essential libssl-dev libncurses5-dev unzip gawk python subversion mercurial"
PACKAGES="git build-essential libssl-dev libncurses5-dev unzip gawk python subversion"
sudo apt -y install $PACKAGES
if ! [ -d openwrt ]; then
@ironpillow
ironpillow / wireless-link-wds.sh
Created September 20, 2017 22:09 — forked from braian87b/wireless-link-wds.sh
How to setup Wireless Links to avoid Wired backbone using WDS on Atheros for OpenWRT / LEDE
@ironpillow
ironpillow / angry_wifi.sh
Created April 22, 2017 03:11 — forked from lg/angry_wifi.sh
auto disconnects clients with a low signal strength on LEDE / OpenWRT
#!/bin/ash
#
# angry_wifi.sh
#
# auto disconnects clients with a low signal strength on LEDE / OpenWRT. great
# for clients who hold onto a lower-signal-strength accesspoint instead of
# roaming. before running, make sure to download the latest MAC addresses with:
#
# wget --no-check-certificate -O - 'https://services13.ieee.org/RST/standards-ra-web/rest/assignments/download/?registry=MAC&text=apple' | cut -d, -f2 > apple_mac_addresses
#