├── .gitignore ├── LICENSE.md ├── README.md ├── assets └── images │ ├── icon.icns │ ├── iconTemplate.png │ └── iconTemplate@2x.png ├── main.js ├── package-lock.json └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist/ 3 | .DS_Store 4 | out/ -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright 2020 Tiago Alves 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Airpass icon](https://user-images.githubusercontent.com/407470/36247877-281b38a2-1268-11e8-8a11-016df1abd6e9.png) 2 | 3 | # Airpass 4 | 5 | ![Airpass demo](https://user-images.githubusercontent.com/407470/36416324-5538a986-165b-11e8-97c2-08ea5a182028.gif) 6 | 7 | ![downloads](https://img.shields.io/github/downloads/alvesjtiago/airpass/total.svg) 8 | 9 | Are you tired of WiFi networks that only let you access for 30 mins? Do you wish you had more time? 10 | 11 | The solution is **Airpass** - a status bar Mac app to overcome time constrained WiFi networks. 12 | 13 | - One-click to renew your MAC address and trick the network 🤖 14 | 15 | ## Downloads 16 | 17 | ### [OSX](https://github.com/alvesjtiago/airpass/releases/tag/1.0.2) 18 | 19 | ## Building from source 20 | 21 | ```bash 22 | git clone https://github.com/alvesjtiago/airpass.git 23 | cd airpass 24 | npm install 25 | npm start 26 | ``` 27 | 28 | ## Credits 29 | 30 | Project created by [Tiago Alves](http://tiagoalves.me). 31 | 32 | ## License 33 | 34 | [MIT License](LICENSE.md) 35 | -------------------------------------------------------------------------------- /assets/images/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alvesjtiago/airpass/e12929711cf86b594308a598ede9d0def8149e79/assets/images/icon.icns -------------------------------------------------------------------------------- /assets/images/iconTemplate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alvesjtiago/airpass/e12929711cf86b594308a598ede9d0def8149e79/assets/images/iconTemplate.png -------------------------------------------------------------------------------- /assets/images/iconTemplate@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alvesjtiago/airpass/e12929711cf86b594308a598ede9d0def8149e79/assets/images/iconTemplate@2x.png -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | const { 2 | app, 3 | Menu, 4 | Tray, 5 | Notification, 6 | clipboard, 7 | shell 8 | } = require('electron'); 9 | 10 | const fs = require('fs'); 11 | const fse = require('fs-extra'); 12 | const path = require('path'); 13 | 14 | var appIcon = null; 15 | 16 | app.on('ready', function(){ 17 | 18 | // Menu bar icon 19 | appIcon = new Tray(path.join(__dirname, '/assets/images/iconTemplate.png')); 20 | const contextMenu = Menu.buildFromTemplate([ 21 | { 22 | label: 'Refresh MAC address...', 23 | type: 'normal', 24 | click: function(event) { renewMacAddress() } 25 | }, 26 | { 27 | label: 'Quit', 28 | type: 'normal', 29 | click: function(event) { app.quit(); } 30 | } 31 | ]); 32 | appIcon.setToolTip('Airpass'); 33 | appIcon.setContextMenu(contextMenu); 34 | 35 | // Hide dock menu 36 | app.dock.hide(); 37 | 38 | function renewMacAddress() { 39 | let notification = new Notification({ 40 | title: 'Changing MAC adddress 🤖', 41 | body: 'Please input your password when requested to make the necessary changes.', 42 | silent: true 43 | }) 44 | notification.show(); 45 | 46 | var sudo = require('sudo-prompt'); 47 | var options = { 48 | name: 'Airpass' 49 | }; 50 | sudo.exec("/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport en0 -z && ifconfig en0 ether `openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`", options, 51 | function(error, stdout, stderr) { 52 | if (!error) { 53 | let notification = new Notification({ 54 | title: 'MAC address changed 👌', 55 | body: 'Connect to the network again to start a new session 📡', 56 | silent: true 57 | }) 58 | notification.show(); 59 | } else { 60 | let issues_url = "https://github.com/alvesjtiago/airpass/issues" 61 | let notification = new Notification({ 62 | title: 'Could not refresh MAC address', 63 | body: 'Please check ' + issues_url + ' for help.', 64 | silent: true 65 | }) 66 | notification.show(); 67 | notification.on('click', function(event) { 68 | shell.openExternal(issues_url) 69 | }) 70 | } 71 | } 72 | ); 73 | } 74 | }); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "airpass", 3 | "version": "1.0.2", 4 | "description": "Renew MAC address to access time constrained wifi networks in airports.", 5 | "main": "main.js", 6 | "scripts": { 7 | "start": "electron-forge start", 8 | "package": "electron-forge package", 9 | "make": "electron-forge make" 10 | }, 11 | "keywords": [ 12 | "wifi", 13 | "airport", 14 | "mac", 15 | "address" 16 | ], 17 | "author": "Tiago Alves", 18 | "license": "MIT License", 19 | "devDependencies": { 20 | "@electron-forge/cli": "^6.0.0-beta.66", 21 | "@electron-forge/maker-deb": "6.0.0-beta.66", 22 | "@electron-forge/maker-rpm": "6.0.0-beta.66", 23 | "@electron-forge/maker-squirrel": "6.0.0-beta.66", 24 | "@electron-forge/maker-zip": "6.0.0-beta.66", 25 | "@electron-forge/maker-dmg": "6.0.0-beta.66", 26 | "node-abi": "2.30.1", 27 | "electron": "^11.0.1" 28 | }, 29 | "dependencies": { 30 | "fs-extra": "^4.0.2", 31 | "sudo-prompt": "^8.2.5" 32 | }, 33 | "config": { 34 | "forge": { 35 | "packagerConfig": { 36 | "arch": ["x64", "arm64"], 37 | "icon": "./assets/images/icon" 38 | }, 39 | "makers": [ 40 | { 41 | "name": "@electron-forge/maker-zip", 42 | "platforms": [ 43 | "darwin" 44 | ] 45 | }, 46 | { 47 | "name": "@electron-forge/maker-dmg" 48 | } 49 | ] 50 | } 51 | } 52 | } 53 | --------------------------------------------------------------------------------