mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-11-04 04:38:02 +00:00 
			
		
		
		
	- Import importlib, os, and sys to each python script.
 - Append "lanforge-scripts" root directory to the system path, allowing each script to be called from an antecedent directory. e.g.
if 'lanforge-scripts' not in sys.path:
    sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../../")))
 - All statements of the form 'from <module> import <class>' replace with:
<module> = importlib.import_module("lanforge-scripts.<directory>.<module>")
<class> = <module>.<class>
		
	
		
			
				
	
	
		
			42 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
#!/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.
 | 
						|
 '''
 | 
						|
import sys
 | 
						|
import os
 | 
						|
import importlib
 | 
						|
import argparse
 | 
						|
 | 
						|
if sys.version_info[0] != 3:
 | 
						|
    print("This script requires Python 3")
 | 
						|
    exit(1)
 | 
						|
 | 
						|
if 'lanforge-scripts' not in sys.path:
 | 
						|
    sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../../")))
 | 
						|
 | 
						|
lfcli_base = importlib.import_module("lanforge-scripts.py-json.LANforge.lfcli_base")
 | 
						|
LFCliBase = lfcli_base.LFCliBase
 | 
						|
LFUtils = importlib.import_module("lanforge-scripts.py-json.LANforge.LFUtils")
 | 
						|
realm = importlib.import_module("lanforge-scripts.py-json.realm")
 | 
						|
Realm = realm.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()
 |