├── LICENSE ├── README.md ├── Wigle-WiFi.py ├── config.json └── requirements.txt /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 emedina 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 3 | y@@@@@@@@@@@@@@@@@@@@@@KMM%%%@@@@%%%MMK@@@@@@@@@@@@@@@@@@@@@@p 4 | ]@@@@@@@@@@@@@@@@@KM%@@@@@@@@@@@@@@@@@@@@@@RMK@@@@@@@@@@@@@@@@@@ 5 | $@@@@@@@@@@@@@@M@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@MK@@@@@@@@@@@@@@ 6 | $@@@@@@@@@@@M@@@@@@@@@@@@@@@@@@@KMMM%%%%%%%%%MMKK@@R@@@@@@@@@@@@ 7 | $@@@@@@@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RBBBBRRRRRRRRRRRRRRRRRBwTBBBBFTTBFkBBRBBBBBBBBBB@@R&@@@@ 24 | $@@@@@@%@BBBBBBBBBRRRRRRRRRRRRRBBBBBH|kkkkkkkkkkkBBBBB@@@k@@@@@@ 25 | $@@@@@@@RkBBBBBBBBBBBBBBBBBBBBBBBBBBPkkkkkkkkkBBBBB@BB@B$@@@@@@@ 26 | $@@@@@@@@@|%BBBBBBBBBBBBBBBBBBBBBRkkkkkkkkkBBBBBB@B@BB$@@@@@@@@@ 27 | $@@@@@@@@@@@|TBBBBBBBBBBBBBBBBBBkkkkkkkkBBBBBB@B@BBR@@@@@@@@@@@@ 28 | $@@@@@@@@@@@@@@|TBBBBBBBBBBBBBBBBkBBBBBBBBB@BBBBR$@@@@@@@@@@@@@@ 29 | 1@@@@@@@@@@@@@@@@@p}PBBBBBBBBBBBB@@BBB@BBBBBR$@@@@@@@@@@@@@@@@@@ 30 | %@@@@@@@@@@@@@@@@@@@@@@p@IPRBBBBBBRPP$$@@@@@@@@@@@@@@@@@@@@@@@F 31 | 'I%MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM%F' 32 | ```````````````````````````````````````````````````````` 33 | 34 | # Wigle-WiFi - WiFi Access Point Trilateration Tool. 35 | 36 | # Wigle-WiFi 37 | 38 | This tool allows you to get the approximate location of a Wi-Fi access point (AP) using the long-awaited: Wigle.net API. The tool uses trilateration to calculate the AP's location based on its signal strength and the location of nearby access points. 39 | 40 | ## Requirements 41 | 42 | To use this tool, you need to have Python 3 installed on your system. You also need to create a free account on Wigle.net and obtain an API key. 43 | 44 | ## Installation 45 | 46 | - Clone this repository or download the ZIP file and extract it to a directory of your choice. 47 | - Create a file named config.json in the same directory as wigle-Wifi and add your Wigle.net API key in the following format: 48 | 49 | { 50 | "api_auth": "YOUR_API_KEY_HERE" 51 | } 52 | 53 | - Open a terminal or command prompt in the directory where you extracted the files and run the command 54 | 55 | pip3 install -r requirements.txt 56 | 57 | ...to install the required Python libraries. 58 | 59 | ## Usage 60 | 61 | - Open a terminal or command prompt in the directory where you extracted the files. 62 | - Run the command: 63 | 64 | python3 Wigle-WiFi.py 65 | 66 | - Choose option 1 to get the location of a Wi-Fi access point. 67 | - Enter the MAC address of the access point when prompted. 68 | - The tool will display the latitude and longitude of the access point's location. 69 | 70 | ### License 71 | 72 | This tool is licensed under the MIT license. See the LICENSE file for more information. 73 | 74 | ### Acknowledgments 75 | 76 | This tool was created using the Wigle.net API and the trilateration algorithm developed by Thomas Pototschnig. Thanks to the developers of these tools for making this project possible. 77 | -------------------------------------------------------------------------------- /Wigle-WiFi.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import json 3 | 4 | def load_config(): 5 | try: 6 | with open('config.json', 'r') as f: 7 | return json.load(f) 8 | except FileNotFoundError: 9 | print('Error: config file not found') 10 | return None 11 | 12 | def get_location(netid, config): 13 | headers = { 14 | 'Authorization': 'Basic ' + config['api_auth'] 15 | } 16 | 17 | url = 'https://api.wigle.net/api/v2/network/search?onlymine=false&netid=' + netid 18 | response = requests.get(url, headers=headers) 19 | 20 | if response.status_code != 200: 21 | print('Error: ' + response.text) 22 | return None 23 | 24 | data = response.json() 25 | 26 | if not data['results']: 27 | print('Error: no results found') 28 | return None 29 | 30 | location = (data['results'][0]['trilat'], data['results'][0]['trilong']) 31 | return location 32 | 33 | def main(): 34 | config = load_config() 35 | if not config: 36 | return 37 | 38 | while True: 39 | print('-------------------------------------------------------------') 40 | print('| . ...... |') 41 | print('| . ,;;;;, .. ,;;;;;,. |') 42 | print('| .;:: . ..;:;:; |') 43 | print('| .;c,. ....... ..:;:; |') 44 | print('| c;. . ,:loxxdxO OO0OOkxolod; |') 45 | print('| .l; .:dOK0OO00O0O0 OkdxO0000OxokO: |') 46 | print('| .c:. .;dk0KKKKKKK0Ok xxO0OddkO00k oodkk |') 47 | print('| .o. lddOKKKKKKKKK dddx0KOkkdddxkOoo oldOc |') 48 | print('| o . odddkKKKKKKKKK K00 0KKKKK0OxdddoooolloO. |') 49 | print('| o. .lddddOKKKKKKK0O 0K KKKKKKOkxk0kddooo ollooO |') 50 | print('| . ,ddddx0KKKKKKKKK0 k0 0 0K0OO0kddxddoooo llld0. |') 51 | print('| c :ddddd0KKKKKKKKKKK 00 0 00kddddd ddd oooollllkd |') 52 | print('| o, cdddddx0KKKKKKKKKKKkKKKK Oddddd dddddo oo kkkkd0 |') 53 | print('| x. ;dddddddO0KKKKKKKKKKKKKK0k dddd ddddddooo okkkkkO |') 54 | print('| d. .ddddddddOkKKKKK0OkOOkO0 ddddd dddddddddddkkkkkkk |') 55 | print('| d. lddddddddkxk0KKKOddddd dOdddddddd ddddoooookkkkkkk |') 56 | print('| o .dddddddddddkKK0ddddd ddxxdddddddddd doooookkkkkklO |') 57 | print('| .c dddddddddddxOKKOddk0 dddxxkxdxddddddo oookkkkkccdd |') 58 | print('| o ,dddddddddddddxkOO0K0 dddddddxkxddddoooo kkkkkcclO. |') 59 | print('| .o. dddddddddddddddddxk0 0ddddddddddooooooo dddddccx. |') 60 | print('| l..oddddddddddddddddddddO ddddkOxxxddddool kkkkkcdl |') 61 | print('| .l.ooooddddddddddddddddddx xx000O00OOOOkk kkkkkcx |') 62 | print('| .codooooooodddddddddddddooo O00OOOOOOkk kxxoco |') 63 | print('| xkooooooooooooooooooooxkO OOOOOkkkkk xdodk |') 64 | print('| xkdooooooooooooooodOOOOOOO kkkkkx ddxk |') 65 | print('| .lkxokkkkkkkkkkkkkkkkkk kkxxx x dko |') 66 | print('| cxkdkkkkkkkkkkkkxkk xxdd dddk. |') 67 | print('| .xcxxcxxdddoodxkkk ooo |') 68 | print('| |') 69 | print('|-----------------------------------------------------------|') 70 | print('| Wigle-WiFi --- WiFi-Access Point Trilateration Tool |') 71 | print('|-----------------------------------------------------------|') 72 | print('| 1. Get location |') 73 | print('| 2. Exit |') 74 | print('|-----------------------------------------------------------|') 75 | choice = input(' Enter choice (1/2): ') 76 | 77 | if choice == '1': 78 | netid = input('Enter WiFi network MAC address: ') 79 | location = get_location(netid, config) 80 | 81 | if location: 82 | print('Location: ' + str(location)) 83 | elif choice == '2': 84 | break 85 | else: 86 | print('Error: invalid choice') 87 | 88 | if __name__ == '__main__': 89 | main() 90 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "api_auth": "YOUR_API_KEY_HERE" 3 | } 4 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | requests 2 | json 3 | --------------------------------------------------------------------------------