{"id":23105384,"url":"https://github.com/zentrocdot/wapscan_sd","last_synced_at":"2025-04-03T22:21:39.746Z","repository":{"id":225315593,"uuid":"765647012","full_name":"zentrocdot/wapscan_sd","owner":"zentrocdot","description":"Wireless Access Point Scanner (wapscan) for the command line","archived":false,"fork":false,"pushed_at":"2024-03-19T08:49:36.000Z","size":2186,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T10:14:11.481Z","etag":null,"topics":["ap","bash","bash-script","deb","debian","dual-band","gnome","mint","scanner","shell","ubuntu","wap","wapscan","wep","wi-fi","wifi-scanner","wlan","wlan-scanner","wlan-sniffer","wlan-tool"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zentrocdot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":"zentrocdot","custom":"https://www.buymeacoffee.com/zentrocdot"}},"created_at":"2024-03-01T10:40:10.000Z","updated_at":"2024-03-15T06:58:51.000Z","dependencies_parsed_at":"2024-03-19T09:56:14.990Z","dependency_job_id":null,"html_url":"https://github.com/zentrocdot/wapscan_sd","commit_stats":null,"previous_names":["zentrocdot/wapscan_package","zentrocdot/wapscan","zentrocdot/wapscan_sd"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentrocdot%2Fwapscan_sd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentrocdot%2Fwapscan_sd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentrocdot%2Fwapscan_sd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentrocdot%2Fwapscan_sd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zentrocdot","download_url":"https://codeload.github.com/zentrocdot/wapscan_sd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247086840,"owners_count":20881272,"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":["ap","bash","bash-script","deb","debian","dual-band","gnome","mint","scanner","shell","ubuntu","wap","wapscan","wep","wi-fi","wifi-scanner","wlan","wlan-scanner","wlan-sniffer","wlan-tool"],"created_at":"2024-12-17T00:50:23.625Z","updated_at":"2025-04-03T22:21:39.728Z","avatar_url":"https://github.com/zentrocdot.png","language":"Shell","funding_links":["https://buymeacoffee.com/zentrocdot","https://www.buymeacoffee.com/zentrocdot"],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"\\IMAGES\\wlan_logo.png\" width=\"22\" alt=\"wapscan logo\" title=\"wapscan logo\"\u003e Wireless Access Point Scanner\n\n### ASCII Logo\n\n\u003cpre\u003e\n__      __ __ _  _ __   ___   ___   __ _  _ __     \n\\ \\ /\\ / // _` || '_ \\ / __| / __| / _` || '_ \\    \n \\ V  V /| (_| || |_) |\\__ \\| (__ | (_| || | | |   \n  \\_/\\_/  \\__,_|| .__/ |___/ \\___| \\__,_||_| |_|   \n                |_|                                 \n\u003c/pre\u003e\n\n### Announcement\n\n\u003e [!TIP]\n\u003e \u003cp align=\"justify\"\u003e\u003ccode\u003ewapscan\u003c/code\u003e is now available on \u003ca href=\"https://launchpad.net/~zentrocdot/+archive/ubuntu/wapscan-cli\"\u003eLaunchpad\u003c/a\u003e. For more information about this topic see also the section \u003c/code\u003e\u003cb\u003eInstallation\u003c/b\u003e.\u003c/p\u003e\n\n# README\n\n\u003e [!NOTE]\n\u003e \u003cp align=\"justify\"\u003eI started working on this package on March the 1st, 2024. So be patient until I remove this note. At that time, all the necessary information will be included here. The removal of the note is then followed by the usual irregular updating of the software.\u003c/p\u003e\n\n\u003cp align=\"justify\"\u003eThis repository consists of a \u003ccode\u003eBash\u003c/code\u003e based \u003ccode\u003eWireless Access Point Scanner\u003c/code\u003e for the command line. The user can decide, if he is using the bunch of scripts or if the DEB package from launchpad is used.\u003c/p\u003e\n\n## Foreword\n\n\u003cp align=\"justify\"\u003eA WLAN Scanner is sometimes called a WLAN sniffer. In the context of this package I prefer the naming WLAN scanner. WLAN sniffing is hacker-like or is used in connection with penetration testing. I use the WLAN scanner to check and optimise my WLAN working environment.\u003c/p\u003e\n\n\u003cp align=\"justify\"\u003eThe work on the \u003ccode\u003eWireless Access Point Scanner\u003c/code\u003e started in the year 2017. The goal was to program a simple wlan scanner that has the ability to address different wlan hardware devices. After invokation the wireless access point scanner is asking which wlan device should be used for scanning. Then the data will be collected and afterwards pretty printed in the terminal window which after that is contiously updated.\u003c/p\u003e\n    \n\u003cp align=\"justify\"\u003eNext to the wireless access point scanner I wrote over the years a bunch of scripts related to wifi or wlan. For the wireless access point scanner I created a script which automatically prepares a package for packaging as \u003ccode\u003eDEB\u003c/code\u003e package. That knowledge how to do was the base for my first steps on \u003ccode\u003eLaunchpad\u003c/code\u003e.\u003c/p\u003e\n\n\u003cp align=\"justify\"\u003eAs expected it is a big difference between writing a working script or building a DEB package from that script. It is even more complicated to use a platform like \u003ccode\u003eLaunchpad\u003c/code\u003e for publishing.\n\n\u003cp align=\"justify\"\u003eThe first package I have released one week ago is in the first shot for educational purposes. In the current and following versions I will move on to productive versions.\u003c/p\u003e\n\n\u003cp align=\"justify\"\u003eAt the time I started writing the program in the year 2017, iwlist was still more common than iw. This limits the analysis possibilities. Nevertheless one can see the important things related to WLAN.\u003c/p\u003e\n\n\u003e [!NOTE]\n\u003e The current version is developed on \u003ccode\u003eLinux Mint 21.3 (Virginia)\u003c/code\u003e. It should also be runnable without restrictions on \u003ccode\u003eDebian 12 (Bookworm)\u003c/code\u003e, \u003ccode\u003eUbuntu Jammy Jellyfish LTS (22.04)\u003c/code\u003e and \u003ccode\u003eRaspbian 12 (Bookworm)\u003c/code\u003e.\n\n## Introductory Words\n\n\u003cp align=\"justify\"\u003eBefore I started the development I was looking for a good name. After finding a name I checked if there will be a package with the same name [1]. No match said to me that this will be a good name.\u003c/p\u003e\n\n## Short Description\n\n\u003cp align=\"justify\"\u003eThe wireless access point scanner is listing 2.4 GHz as well as 5 GHz access points. The hardware must have the capability for dualband should be clear. Three versions of the wireless access point scanner can be used.\u003c/p\u003e\n\n1. wapscan\n2. wapscan_beacon\n3. wapscan_oui\n5. wapscan_protocol \n  \n\u003cp align=\"justify\"\u003e\u003ccode\u003ewapscan\u003c/code\u003e is the base apllication. wapscan_beacon and wapscan_oui offer further informations. Sometimes it is of interest how often an access point is sending the beacon. This is monitored by wapscan_beacon. It can also be of interest to know the hardware on which the access point runs. The is realised by wapscan_oui.\u003c/p\u003e\n\n\u003cp align=\"justify\"\u003eThe wireless access point scanner is well tested on für wlan on 2.4 GHz as well as 5 GHz. Both bands are monitored as expected on differnent hardware devices.\u003c/p\u003e\n\n## Prerequisites\n\n\u003cp align=\"justify\"\u003eThe wireless access point scanner will run on \u003ccode\u003eLinux Mint\u003c/code\u003e and should be also run on \u003ccode\u003eLinux Ubuntu\u003c/code\u003e and also on \u003ccode\u003eDebian\u003c/code\u003e like operating systems. I developed the scanner on \u003ccode\u003eLinux Mint\u003c/code\u003e for usage on \u003ccode\u003eLinux Mint\u003c/code\u003e.\u003c/p\u003e\n\n## Repository Organisation \n\nThis repository will have three parts:\n\n1. Howto for creating the DEB package from scratch\n2. Required directory tree structure for packaging of the DEB package \n3. Source code in form of some Bash scripts used for packaging\n\n## Look and Feel\n\n\u003cp align=\"justify\"\u003eYou can run 3 versions:\u003c/p\u003e\n\n1. wapscan        (for regular usage)\n2. wapscan_beacon (for user who needs two konow how often beacons can be seen)\n3. wapscan_oui    (for user who needs to know which hardware the AP is using)\n\nFirst, you choose the WLAN device for scanning:\n\n\u003ccenter\u003e\n\u003cimg src=\"\\IMAGES\\menu.png\" alt=\"Alt text\" title=\"Optional title\"\u003e\n\u003c/center\u003e\nImage for presentation purposes\n\nThe first data is collected and than the WLAN environment is scanned continously.\n\n\u003ccenter\u003e\n\u003cimg src=\"\\IMAGES\\scan.png\" alt=\"Alt text\" title=\"Optional title\"\u003e\n\u003c/center\u003e\nImage for presentation purposes\n\n## Development\n\n\u003cp align=\"justify\"\u003eI started the development on wapscan implementing pure basic functionality. Current improvements are first tested with wapscan. When the program works as expected I am changing wapscan_beacon and wapscan_oui in a way, that they work like wapscan.\u003c/p\u003e\n\n## Installation\n\n\u003cp align=\"justify\"\u003eThe easiest way for the future is to use PPA from Launchpad.\u003c/p\u003e\n\n\u003cpre\u003e\nsudo add-apt-repository ppa:zentrocdot/wapscan-cli\n    \nsudo apt update\n\nsudo apt-get install wapscan\n\u003c/pre\u003e\n\n\u003cp align=\"justify\"\u003ewapscan will be build for use with Ubuntu Noble, Mantic, Jammy, Focal, Bionic, Xenial and Trusty.\u003c/p\u003e\n\n\u003cp align=\"justify\"\u003eAt the moment I am building wapscan for Ubuntu Noble. After that is done I prepare the DEB packages inside of Launchpad for use with the other versions of Ubuntu. Then I am testing the installed program with Linux Mint (Ubuntu Jammy). This is at least Debian 12, Ubuntu Jammy, Mint Vanessa or Rapsian Bookworm.\u003c/p\u003e\n\n## Installation Note\n\n\u003cp align=\"justify\"\u003eOpen issue is, that I not know if the zst compression, which was introduced with Debian 12, is at all a problem for elder versions.\u003c/p\u003e\n\n## Uninstallation\n\n\u003cp align=\"justify\"\u003eUninstallation can be done doing:\u003c/p\u003e\n\n    sudo apt-get remove --purge wapscan\n\n## Comments on operation\n\n\u003cp align=\"justify\"\u003eCollecting WLAN data the first time can take up to 5 seconds.\u003c/p\u003e\n\n\u003cp align=\"justify\"\u003eYou can invoke the program with or without using sudo. If you are using sudo the program asked for the hardware devices. If you ar not using sudo the program first needs the sudo permission for operation.\u003c/p\u003e\n\n\u003cp align=\"justify\"\u003eIf you see\u003c/p\u003e\n\n    Could not get data from the device ...\n\n\u003cp align=\"justify\"\u003ein operation then there are two possible reasons.\u003c/p\u003e\n\n1. In general there are not data from hardware\n2. Same hardware is used multiple times\n\n## Testing\n\n\u003cp align=\"justify\"\u003eThe scripts have been tested on different Debian derivatives and versions and have been executable.\u003c/p\u003e\n\n# Limitation\n\n\u003cp align=\"justify\"\u003eIt looks as if I have been able to overcome a known limitation. Until now, using the same hardware two or more times has been a problem when collecting and displaying data. In the current solution, the program waits until it has received data and prints it in the terminal window. To make this transparent, I have added a time of the last scan to the output on the screen. \u003c/p\u003e\n\n## Known Restriction\n\n\u003cp align=\"justify\"\u003eOne of the most important restrictions is the fact that sudo rights are required for execution. This is due to the use of iwlist in the background. iwlist only works as root.\u003c/p\u003e\n\n## Bugs\n\n\u003cp align=\"justify\"\u003eNo bugs are known yet.\u003c/p\u003e\n\n## To-Do\n\n### List of things to do\n\n\u003cp align=\"justify\"\u003eThis has to be done:\u003c/p\u003e\n\n1. Review the code on problems, typing errors and bugs\n2. Improvement of the code\n3. Optimisation of the code\n4. Add a command line evaluation using getopt\n5. Add used hardware device to output in terminal window\n\n\u003cp align=\"justify\"\u003eThis has to be checked:\u003c/p\u003e\n\n8. Catch error message \"No scan results\" from interface\n5. Catch error message \"Interface doesn't support scanning : Device or resource busy\" from interface\n\n### Further things to do\n\n\u003cp align=\"justify\"\u003eI had not yet checked whether I could obtain further information from the Information Elements. This is still to be done.\u003c/p\u003e\n\n\u003cp align=\"justify\"\u003eSince I call sudo from within the program now, it is necessary to check how I can separate the first call of wapscan from the second sudo call of wapscan. This is a similar process to my daemonising process of a daemon script.\u003c/p\u003e\n\n## Spin-Off\n\n\u003cp align=\"justify\"\u003eWrite another program using other tool for extracting mor informations from a scan.\u003c/p\u003e\n\n## Planned Further Developments\n\n\u003cp align=\"justify\"\u003eAt the moment 2.4 GHz as well as 5 GHz wlan access points are recognised. It shuod be possible to decide which one should be monitored.\u003c/p\u003e\n\n\u003cp align=\"justify\"\u003eCheck how I can easily identify the used WLAN 802.11 b/g/n standard of the AP.\u003c/p\u003e\n\n## Challenges while Development\n\n\u003cp align=\"justify\"\u003eAfter writing the first version and the predecessor of the current WLAN scanner, I faced two problems when working on different hardware platforms and operating systems.\u003c/p\u003e\n\n\u003cp align=\"justify\"\u003eFirst the output structure of iwlist was different on different operating systems. Second the naming of the wlan devices was different on different operating systems.\u003c/p\u003e\n\n## Program Technical Background\n\n\u003cp align=\"justify\"\u003eTo avoid reinventing the wheel, I always look for the simplest solutions. I found the tools available at command level suitable for a WLAN scanner.\u003c/p\u003e\n\n\u003cp align=\"justify\"\u003eI found the tools available at command level suitable for a WLAN scanner.\u003c/p\u003e\n\n\u003cp align=\"justify\"\u003eI use the tools iw and iwlist. For hardware identification iw is well suited and for WLAN scanning iwlist.\u003c/p\u003e\n\n### Typical Response from IWLIST\n\n\u003cp align=\"justify\"\u003eAn iwlist output can look like:\u003c/p\u003e\n\n    wly97dfd02de607  Scan completed :\n              Cell 01 - Address: 85:BE:26:40:71:25\n                        Channel:6\n                        Frequency:2.437 GHz (Channel 6)\n                        Quality=25/70  Signal level=-65 dBm\n                        Encryption key:on\n                        ESSID:\"WlanRouter!BlueMagic\"\n                        Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s\n                                  9 Mb/s; 12 Mb/s; 18 Mb/s\n                        Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s\n                        Mode:Master\n                        Extra:tsf=0000000000b0cc48\n                        Extra: Last beacon: 4024ms ago\n                        IE: Unknown: 000F456569565965772E53657475703734\n                        IE: Unknown: 010882847B960C121824\n                        IE: Unknown: 030206\n                        IE: Unknown: 2A0100\n                        IE: Unknown: 32043048606C\n                        IE: Unknown: 2D1B0C181DFF00000000000000000000000000000000000000000000\n                        IE: Unknown: 3D1606000000000000000000000000000000000000000000\n                        IE: IEEE 802.11i/WPA2 Version 1\n                            Group Cipher : CCMP\n                            Pairwise Ciphers (1) : CCMP\n                            Authentication Suites (1) : PSK\n                        IE: Unknown: DD190050F2020102000003A4000027A4000052435E0062322F00\n                        IE: Unknown: DD1E00804C340C181EFF00000000000000000000000000000000000000000000\n                        IE: Unknown: DD1B00905C3406000000000000000000000000000000000000000000\n                        IE: Unknown: DD0700E05C0202E0\n\n\u003cp align=\"justify\"\u003eOne can extract following informations on different hardware devices:\u003c/p\u003e\n\n* MAC address\n* Frequency\n* Channel\n* Quality\n* Signal Strenght\n* Encryption\n* ESSID \n* Bit Rates\n* MODE\n* Extra informations\n* Information Elements (IE)\n\n### Typical Response from IW\n\n\u003cp align=\"justify\"\u003eiwlist output looks like:\u003c/p\u003e\n\n    phy#0\n\t       Interface wlq6s1\n\t\t      ifindex 2\n\t\t      wdev 0x1\n\t\t      addr 19:fb:53:01:fb:56\n\t\t      type managed\n\t\t      txpower 17.00 dBm\n\n ## Compatibility to given oui.txt files\n\n \u003cp align=\"justify\"\u003eTo be compatible to a given oui.txt file I worked out the following structure for one entry.\u003c/p\u003e\n                  \n    00-18-42 (hex) Nokia Danmark A/S \n            ^     ^\n\t    |     | \n            |     \\ - one or more whitespaces [space and/or tab]\n            \\ - one or more whitespaces [space and/or tab]\n   \n\u003cp align=\"justify\"\u003ein the near future a user can use a self created oui.txt file for testing or other purpose.\u003c/p\u003e\n\n## Compatibility\n\n\u003cp align=\"justify\"\u003eAs long as iwlist as well as iw do not change again the structure of the output wapscan will work. As noted the program worked on different operating systems from the year 2017 upt to the year 2024.\u003c/p\u003e\n\n## Note on script usage\n\n\u003cp align=\"justify\"\u003eIn the first version, the script made itself executable during the first run. This can be realised like this:\u003c/p\u003e\n\n    # Make the script executable.\n    if [[ ! -x \"$0\" ]]; then chmod +x \"$0\"; fi\n\n## Dependencies\n\n1. wireless-tools\n2. iw\n3. sed\n4. gawk\n5. bash\n6. util-linux\n\n## Troubleshooting\n\n\u003cp align=\"justify\"\u003eFirst of all make sure that you have super user rights and that you can use sudo.\u003c/p\u003e\n\n# References\n\n[0]    www\u0026#8203;.debian.org/doc/manuals/maint-guide/dreq.en.html\n\n[1]    github.com/HewlettPackard/wireless-tools\n\n[2]    manpages.debian.org/stretch/wireless-tools/iwlist.8.en.html   \n\n[3]    packages.debian.org/sid/wireless-tools\n\n[4]    unix.stackexchange.com/questions/407517/why-did-wireless-tools-version-30-become-a-permanent-beta\n\n[5]    wiki.ubuntuusers.de/WLAN/\n\n[6]    wireless.wiki.kernel.org/en/users/documentation/iw\n\n[7]    www\u0026#8203;.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html\n\n[8]    www\u0026#8203;.linuxuprising.com/2018/10/how-to-search-available-packages-from.html\n\n[9]    www\u0026#8203;.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/\n\n[10]    wiki.ubuntuusers.de/WiFi_Radar/\n\n[11]    wifi-radar.tuxfamily.org/pub/\n\n[12]    wiki.ubuntuusers.de/LinSSID/\n\n[13]    standards-oui.ieee.org/\n\n[14]    www\u0026#8203;.systutorials.com/docs/linux/man/1-get-oui/\n\n---\n\n\u003cp align=\"center\"\u003e\u003cbig\u003e\u003cbig\u003e\n\u003cb\u003eYou can support the further development of this tool if you like.\u003c/b\u003e\n\u003c/big\u003e\u003c/big\u003e\u003c/p\u003e\n\n\u003chr width=\"100%\" size=\"2\"\u003e\n\n\u003cp align=\"center\"\u003e\nI loved the time when you could get also a hamburger :hamburger: for one euro!\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca target=\"_blank\" href=\"https://www.buymeacoffee.com/zentrocdot\"\u003e\u003cimg src=\"\\IMAGES\\greeen-button.png\" alt=\"Buy Me A Coffee\" height=\"41\" width=\"174\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003chr width=\"100%\" size=\"2\"\u003e\n\n## Other ways to donate\n\n\u003cp align=\"justify\"\u003eIf you like what I present here, or if it helps you, or if it is useful, you are welcome to donate a small contribution or a cup of coffee. Or as you might say: Every TRON counts! Many thanks in advance! :smiley:\u003c/p\u003e\n\n\u003cpre\u003eTQamF8Q3z63sVFWiXgn2pzpWyhkQJhRtW7            (TRON)\nDMh7EXf7XbibFFsqaAetdQQ77Zb5TVCXiX            (DOGE)\n12JsKesep3yuDpmrcXCxXu7EQJkRaAvsc5            (BITCOIN)\n0x31042e2F3AE241093e0387b41C6910B11d94f7ec    (Ethereum)\u003c/pre\u003e\n    \n\u003chr width=\"100%\" size=\"2\"\u003e\n\n\u003cp align=\"center\"\u003eFile last modified 02/03/2024\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzentrocdot%2Fwapscan_sd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzentrocdot%2Fwapscan_sd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzentrocdot%2Fwapscan_sd/lists"}