Giter Club home page Giter Club logo

wheresaddie / routerwars Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 5.52 MB

RouterWars is an access point mod for people to leave broadcast messages via a wireless network. It's a custom firmware (based on OpenWRT) that sets up public access points to broadcast SSIDs. Each ID is a string that can be edited through a web interface to broadcast to anyone within range of the routers broadcast. When connecting to any of the SSIDs the access point sets up a captive portal to reroute any web page requests to the web interface. It can be used to leave anonymous messages to people within its range like warnings to activists or protesters in the area or even to troll your neighbors. This project was made possible with a grant from the Clinic for Open Source Arts in 2020.

Home Page: https://www.du.edu/ahss/opensourcearts/

License: GNU General Public License v3.0

Shell 6.94% Lua 63.74% HTML 27.63% CSS 1.69%
firmware wireless ssids custom-firmware broadcast-ssids open-ssids range protesters

routerwars's Introduction

RouterWars

RouterWars is a wifi mod to leave SSID messages via wireless network SSID within it's range.

RouterWars utilizes custom firmware based on OpenWrt, a Linux OS which targets embedded devices. All messages are publicly accessible to anyone within the routers range, i.e. so instead of seeing 'NETGEAR' in the menu of available networks from your devices, you might see 'Watch out for the Cop on 4th and Perry'. The SSID once selected automatically opens and reroutes any request to its GUI.

Each ID is a field string that can be edited through a web interface portal which is accessible when you click on the open SSIDs being broadcast. When connecting to any of the SSIDs the access point sets up a captive portal to reroute any web page requests to the web interface. It can be used to leave anonymous messages to people within its range, warnings to activists or protesters in the area or even to troll your neighbors.

This project was made possible by the support of Clinic for Open Source Arts (COSA) http://clinicopensourcearts.org/ and is under a GPL-3.0 License in 2020.

Setup Process

  • buy a TP-Link WiFi Router (reference https://openwrt.org/toh/hwdata/tp-link/start for supported models)
  • flash firmware
  • setup ssh and login password (sexylama)
  • run setup.sh
    • chmod +x setup.sh
    • ./setup.sh
  • restart access point
  • connect to "Free Public WifiTagger"
  • open any url -> web interface should open

Flash Firmware

  • plugin router to ethernet (not wan port)
  • open web interface at http://192.168.0.1/ or http://192.168.1.1/
    • user: admin
    • password: admin
  • restore factory settings if anythings was changed
  • run system upgrade uploading the firmware with the "factory" suffix
    • openwrt-ar71xx-generic-tl-wr741nd-v4-squashfs-factory.bin
  • do not interrupt upload

Setup SSH and Login Password

  • after restart you can now telnet to router "telnet 192.168.1.1" and
  • set a password with "passwd"
  • then telnet gets disabled and ssh login works with "ssh [email protected]"
  • also "ssh -o UserKnownHostsFile=/dev/null [email protected]" if you have key problems

Run setup.sh

  • this will copy a bunch of files to the router
  • amoung them setup_remote.sh
  • which it will then also execute

Troubleshooting

  • if something doesn't work ssh to router and
  • run setup_remote.sh manually
  • check output for errors

Need to Know More

shell

Upgrade Firmware

  • copy firmware with "sysupgrade" suffix to /tmp on router
  • rename to tplink.bin
  • run "mtd -r write /tmp/tplink.bin firmware"

Install Lua Webserver stuff (latest firmware includes this)

docs

setting up uhttp-mod-lua

  • opkg install uhttpd-mod-lua
  • uci set uhttpd.main.lua_prefix=/ ... using root disable statis file served
  • uci set uhttpd.main.lua_handler=/www/index.lua
  • uci commit uhttpd ... make changed persistent after reboot
  • /etc/init.d/uhttpd restart
  • wget -qO- http://127.0.0.1/

index.lua

function handle_request(env) uhttpd.send("HTTP/1.0 200 OK\r\n") uhttpd.send("Content-Type: text/plain\r\n\r\n") uhttpd.send("Hello world.\n") end

wireless stuff

  • config file
    • /etc/config/wireless
  • restart network
    • /etc/init.d/network restart
  • using uci
    • uci get wireless.@wifi-iface[0].ssid
    • uci set wireless.@wifi-iface[0].ssid="What up?"
    • uci commit wireless

More package info

  • luci-lib-core /usr/lib/lua/luci/store.lua /usr/lib/lua/luci/fs.lua /sbin/luci-reload /usr/lib/lua/luci/model/network.lua /usr/lib/lua/luci/ip.lua /usr/lib/lua/luci/debug.lua /usr/lib/lua/luci/util.lua /etc/config/ucitrack /usr/lib/lua/luci/ltn12.lua /usr/lib/lua/luci/ccache.lua /usr/lib/lua/luci/model/uci.lua /usr/lib/lua/luci/init.lua /usr/lib/lua/luci/version.lua /usr/lib/lua/luci/model/firewall.lua

CAPTIVE PORTAL

Use dnsmsqr to wildcard all domains to the routers IP. In "/etc/dnsmasq.conf" add "address=/#/192.168.1.1" and restart dnsmasq. The "#" could also be a "com" to reroute all .com domains.

Typical HTTP HEADER

DOCUMENT_ROOT='/www' GATEWAY_INTERFACE='CGI/1.1' HTTP_ACCEPT='text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8' HTTP_ACCEPT_ENCODING='gzip, deflate' HTTP_ACCEPT_LANGUAGE='en-US,en;q=0.5' HTTP_CONNECTION='keep-alive' HTTP_COOKIE='SessionID_R3=0; FirstMenu=Admin_9; SecondMenu=Admin_9_1; ThirdMenu=Admin_9_1_0; Language=de' HTTP_HOST='192.168.1.1' IFS=' ' OPTIND='1' PATH='/sbin:/usr/sbin:/bin:/usr/bin' PPID='1050' PS1='\w $ ' PS2='> ' PS4='+ ' PWD='/www' QUERY_STRING='' REDIRECT_STATUS='200' REMOTE_ADDR='192.168.1.211' REMOTE_HOST='192.168.1.211' REMOTE_PORT='56381' REQUEST_METHOD='GET' REQUEST_URI='/cgi-bin/print_env.sh' SCRIPT_FILENAME='/www/cgi-bin/print_env.sh' SCRIPT_NAME='/cgi-bin/print_env.sh' SERVER_ADDR='192.168.1.1' SERVER_NAME='192.168.1.1' SERVER_PORT='80' SERVER_PROTOCOL='HTTP/1.1' SERVER_SOFTWARE='uHTTPd'

routerwars's People

Contributors

wheresaddie avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

altoplano

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.