Created
August 21, 2015 14:14
-
-
Save thenewvu/34751f0ad0fb343b4b87 to your computer and use it in GitHub Desktop.
wifi_hotspot_scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import subprocess | |
def main(): | |
argparser = argparse.ArgumentParser() | |
argparser.add_argument('name') | |
argparser.add_argument('pwd') | |
args = argparser.parse_args() | |
name = args.name | |
pwd = args.pwd | |
subprocess.check_call('netsh wlan set hostednetwork mode=allow ssid={name} key={pwd}'.format(name=name, pwd=pwd), shell=True) | |
subprocess.check_call('netsh wlan start hostednetwork', shell=True) | |
if __name__ == '__main__': | |
main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
def main(): | |
subprocess.check_call('netsh wlan stop hostednetwork', shell=True) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment