{"id":13432721,"url":"https://github.com/kylemcdonald/FreeWifi","last_synced_at":"2025-03-17T10:32:26.565Z","repository":{"id":41539856,"uuid":"78862695","full_name":"kylemcdonald/FreeWifi","owner":"kylemcdonald","description":"How to get free wifi.","archived":false,"fork":false,"pushed_at":"2018-02-20T03:47:47.000Z","size":19,"stargazers_count":2910,"open_issues_count":12,"forks_count":228,"subscribers_count":87,"default_branch":"master","last_synced_at":"2025-03-10T12:05:01.609Z","etag":null,"topics":["internet-access","spoof","tcpdump","wireless-network"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kylemcdonald.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-13T15:45:14.000Z","updated_at":"2025-03-10T08:37:59.000Z","dependencies_parsed_at":"2022-08-10T02:43:05.123Z","dependency_job_id":null,"html_url":"https://github.com/kylemcdonald/FreeWifi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylemcdonald%2FFreeWifi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylemcdonald%2FFreeWifi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylemcdonald%2FFreeWifi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylemcdonald%2FFreeWifi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kylemcdonald","download_url":"https://codeload.github.com/kylemcdonald/FreeWifi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244016806,"owners_count":20384210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["internet-access","spoof","tcpdump","wireless-network"],"created_at":"2024-07-31T02:01:15.723Z","updated_at":"2025-03-17T10:32:26.298Z","avatar_url":"https://github.com/kylemcdonald.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Free Wifi\n\nThis short tutorial describes a few methods for gaining access to the Internet, [a basic human right](https://en.wikipedia.org/wiki/Right_to_Internet_access#2011:_UN_Special_Rapporteur_report), from public wireless networks.\n\nThis tutorial has been tested on Mac and a Raspberry Pi. It should generally work on Linux, and hasn't been tested on Windows.\n\n## Preparation\n\nMake sure you do this step *before* you are stuck without Internet access:\n\n1. Install [Python pip](https://pip.pypa.io/en/stable/installing/)\n2. On Linux, install Python Developer package, a dependency for the `netifaces` package.\n\n  **Ubuntu:**\n  ```\n  $ sudo apt-get install python-dev\n  ```\n  \n  **Fedora:**\n  ```\n  $ sudo dnf install python-devel\n  ```\n  Note: For Centos, substitute `dnf` with `yum`\n  \n2. Make a copy of this repository and install dependencies for the script:\n\n```\n$ git clone https://github.com/kylemcdonald/FreeWifi\n$ cd FreeWifi \u0026\u0026 sudo pip install -r requirements.txt\n```\n\n## How to get additional time\n\nIf you had free internet access but your time has run out, the first thing to try is open an incognito/private window. Here are instructions for a few browsers:\n\n* [Chrome](https://support.google.com/chrome/answer/95464?source=gsearch\u0026hl=en) (mobile and desktop)\n* [Safari for iOS](https://support.apple.com/en-us/HT203036)\n* [Safari for Mac](https://support.apple.com/kb/ph21413?locale=en_US)\n* [Microsoft Edge](https://support.microsoft.com/en-us/instantanswers/34b9a3a6-68bc-510b-2a9e-833107495ee5/browse-inprivate-in-microsoft-edge)\n\nAn incognito/private window will temporarily clear any cookies that may have been used for tracking how much time you spent online, making you look like a \"new user\" and allowing you to log into the wireless portal again.\n\nUnfortunately, most systems track MAC addresses instead of cookies. A MAC address is a unique identifier assigned to every network interface. This means you need to get a new MAC address to get additional time. Fortunately, MAC addresses can be changed in software, without swapping the hardware. The `spoof-mac` command line utility makes this easy by entering `sudo spoof-mac randomize Wi-Fi`. If the command fails to run, try entering `spoof-mac list --wifi` to check what the name of your wireless device is first, and use that manually. After randomizing your MAC, try logging into the wireless portal again. When you're done using the Internet, run `sudo spoof-mac reset Wi-Fi` to reset your MAC address.\n\nNote that MAC address spoofing may be interpreted as an illegal activity depending on why you do it. In some cases it is certainly not illegal: recent mobile operating systems like iOS 8+ and Android 6+ automatically randomize their MAC address when searching for wireless networks to avoid being tracked. But when [Aaron Swartz liberated JSTOR](https://en.wikipedia.org/wiki/MAC_spoofing#Controversy), MAC address spoofing was claimed as a signal of intention to commit a crime.\n\n## How to get free access\n\nIf the network is open, but you can't get access for some reason, you can also try spoofing the MAC address of a device that is already using the network. To the router, your device and the other device will look like one device. This can cause some minor problems if they interrupt each other, but for light browsing it usually works out fine.\n\nTo find the MAC addresses of other devices using the network, first you need to connect to the network. You don't need to have Internet access, just a connection. First, on Mac OS run the command `sudo chmod o+r /dev/bpf*` once to make sure you can sniff wireless data (you need to do this again if you restart your computer). Then run the command `python wifi-users.py`. You should see a progress bar immediately:\n\n```\nAvailable interfaces: en0\nInterface: en0\nSSID: nonoinflight\nAvailable gateways: en0\nGateway IP: 10.0.1.1\nGateway MAC: 00:e0:4b:22:96:d9\n100%|██████████████████████████| 1000/1000 [00:46\u003c00:00, 21.46it/s]\nTotal of 5 user(s):\n27:35:96:a8:66:7f\t6359 bytes\n36:fe:83:9c:35:eb\t9605 bytes\n65:01:3c:cc:20:e8\t17306 bytes\n8c:6f:11:2c:f0:ee\t20515 bytes\n0a:4f:b2:b8:e8:56\t71541 bytes\n```\n\nIf there isn't much traffic on the network, it might take longer. If it's taking too long, type `CTRL-C` to cancel the sniffing and print whatever results are available. Finally, we want to spoof one of these MAC addresses. For example, in this case we would enter `sudo spoof-mac set 0a:4f:b2:b8:e8:56 Wi-Fi` to try spoofing the address with the most traffic (they probably have a connection). After running that command, try to access the Internet. If you don't have a connection, try the next MAC in the list. If your Internet connection drops out while using this MAC address, try disconnecting and reconnecting to the wireless network. Note that the original user of the MAC you copied may experience these same connection drop outs if you are both actively using the network.\n\n### How it works\n\n`wifi-users.py` uses `tcpdump` to collect wireless packets. Then we look through these packets for any hints of the MAC address (BSSID) of our wireless network. Finally, we look for data packets that mention a user's MAC as well as the network BSSID (or the network gateway), and take note of that MAC using some amount of data. Then we sort the user's MACs by the total amount of data and print them out.\n\nInstead of sniffing wireless traffic, in some situations you can also use the command `arp -a` to get a list of MAC addresses of devices on the wireless network. Then you can either use `spoof-mac` to copy the address, or use `ifconfig` directly on Linux and OSX. For the specifics of using `ifconfig` look at the implementations of `set_interface_mac` inside [SpoofMac's interfaces.py](https://github.com/feross/SpoofMAC/blob/master/spoofmac/interface.py).\n\n*This repository is dedicated to Lauren McCarthy, who has taught me the most about the art of getting a good deal.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylemcdonald%2FFreeWifi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkylemcdonald%2FFreeWifi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylemcdonald%2FFreeWifi/lists"}