Coder Social home page Coder Social logo

portalsmash's Introduction

PortalSmash

Utility to connect to open WiFi and click through "captive portal"-type agreements.

PortalSmash will scan, find open (or known, more on this later) WiFi, and then try to connect to it, get an IP address, and get to the Web. If it succeeds, it will keep checking the connection every few seconds, and restart if it fails (allowing it to be used on mobile devices).

PortalSmash needs to be run as root, because otherwise DHClient and WPA_Supplicant don't do what it wants. (Sorry about that.)

PortalSmash derives from Malice Afterthought's Reticle project.

Which portals does it get through? Try it yourself and see, but it's quite a few from a set of very basic heuristics. If you find one it doesn't handle, I'd love to get a pull request from you. (Hint: open IRB, load Mechanize, and work through it-- then send me the commands, and what differentiates the portal you found from the portals I do solve.)

Dependencies: Ruby Mechanize and Ruby Trollop. Mechanize is kind of a heavy library, but PortalSmash needs it to parse and interact with (often really badly coded) captive portal pages. They can be installed with:

gem install trollop mechanize

To use:

sudo ./portalsmash.rb [-d devicename] [-n netconfig file]

Netfile format: PortalSmash allows a network key file to be specified that includes, well, keys for networks. The file must be in YAML, and formatted approximately as so:

---
NetName:
    key: ohboyitsakey 
HypotheticalWPAE:
    username: foo
    password: bar

This will allow the program to connect to WiFi for which you have been given credentials (e.g., your home WiFi network). PortalSmash will connect to known networks before unknown networks.

(C) 2012-2013, Malice Afterthought, Inc.

This software is provided 'as-is', without any express or implied warranty, including the warranties of merchantability or fitness for a particular purpose. In no event will the authors be held liable for any damages arising from the use of this software. Use this software at your own risk; unauthorized access to systems by an end-user is not the responsibility of the author.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

(Some of the text for this license taken from the famous ZLib license, available at http://www.gzip.org/zlib/zlib_license.html .)

portalsmash's People

Contributors

ussjoin avatar

Stargazers

Dan Salmon avatar

Watchers

James Cloos avatar Dan Salmon avatar  avatar

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.