From cd752706388934e1b930b453dad57337b206f662 Mon Sep 17 00:00:00 2001 From: Matthew Stidham Date: Fri, 12 Feb 2021 11:38:57 -0800 Subject: [PATCH] initial commit --- py-scripts/test_wpa_passphrases.py | 37 +++++++++++++++++++++++++++ py-scripts/ws_generic_monitor_test.py | 28 +++++++++++++++----- 2 files changed, 58 insertions(+), 7 deletions(-) diff --git a/py-scripts/test_wpa_passphrases.py b/py-scripts/test_wpa_passphrases.py index e69de29b..ec36cd31 100644 --- a/py-scripts/test_wpa_passphrases.py +++ b/py-scripts/test_wpa_passphrases.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python3 + +''' test_wpa_passphrases will test challenging wpa psk passphrases + +Use './test_wpa_passphrases.py --help' to see command line usage and options +Copyright 2021 Candela Technologies Inc +License: Free to distribute and modify. LANforge systems must be licensed. + ''' + + +if sys.version_info[0] != 3: + print("This script requires Python 3") + exit(1) + +if 'py-json' not in sys.path: + sys.path.append(os.path.join(os.path.abspath('..'), 'py-json')) + +import argparse +from LANforge.lfcli_base import LFCliBase +from LANforge import LFUtils +from realm import Realm + +class WPAPassphrases(Realm): + def __init__(self, + ssid=None, + security=None, + password=None): + self.ssid = ssid + self.security = security + self.password = password + + +def main(): + pass + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/py-scripts/ws_generic_monitor_test.py b/py-scripts/ws_generic_monitor_test.py index 3e7c75be..5dc2840f 100755 --- a/py-scripts/ws_generic_monitor_test.py +++ b/py-scripts/ws_generic_monitor_test.py @@ -13,17 +13,31 @@ if 'py-json' not in sys.path: from ws_generic_monitor import WS_Listener reference = "test_ipv4_connection.py" + +class GenericMonitorTest(Realm): + def __init__(self, + ssid=None, + security=None, + password=None, + radio=None): + self.ssid=ssid + self.security=security + self.password=password + self.radio=radio + + def start(self): + pass + + def stop(self): + pass + + def monitor(self): + pass + def main(): WS_Listener(lfclient_host="localhost", _scriptname=reference, _callback=TestRun) -def TestRun(ws, message): - if (str(message).__contains__(reference)): - #print(message) - temp = json.loads(message) - event_message = str(temp['name']) + "/" + str(temp['details']) + "/" + str(temp['timestamp']) - print(event_message) - if __name__ == "__main__": main()