Hack Forums
[Shell] Connect to wifi Network via bash script in Windows - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Shell] Connect to wifi Network via bash script in Windows (/showthread.php?tid=6027067)



Connect to wifi Network via bash script in Windows - alexreturn2 - Nov 22, 2019

Hi guys, I would like to write a script that allows me to connect to a network through the shell, if you have any recommendation on how to do it I will really appreciate it.
I was thinking something like:
Scanning the available networks and printing them, then prompting the user to input which network to choose, and asking for the passphrase and then displaying a message if the connection has been established or not.
Thanks in advance


RE: Connect to wifi Network via bash script in Windows - netWalker - Nov 22, 2019

Bash scripting is generally for Unix-based systems. Batch scripting probably won't really be good in this instance. Powershell is likely your best bet scripting-wise. I'd suggest going to github (not some shady site etc.) and searching for what you want. Here's something I found by doing a quick search: hxxps://stackoverflow.com/questions/32760356/how-to-connect-to-a-wifi-in-powershell-knowing-the-ssid-and-password (replace x's in hxxps with t's).