mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-11-04 04:38:02 +00:00 
			
		
		
		
	pushing capture changes
This commit is contained in:
		@@ -822,14 +822,16 @@ class WifiMonitor:
 | 
				
			|||||||
        down_request = LFUtils.portDownRequest(resource_id=self.resource, port_name=self.monitor_name)
 | 
					        down_request = LFUtils.portDownRequest(resource_id=self.resource, port_name=self.monitor_name)
 | 
				
			||||||
        self.local_realm.json_post("/cli-json/set_port", down_request)
 | 
					        self.local_realm.json_post("/cli-json/set_port", down_request)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def start_sniff(self):
 | 
					    def start_sniff(self, capname=None):
 | 
				
			||||||
 | 
					        if capname is None:
 | 
				
			||||||
 | 
					            raise ValueError("Need a capture file name")
 | 
				
			||||||
        data = {
 | 
					        data = {
 | 
				
			||||||
                "shelf": 1, 
 | 
					                "shelf": 1, 
 | 
				
			||||||
                "resource": 1,
 | 
					                "resource": 1,
 | 
				
			||||||
                "port": self.monitor_name,
 | 
					                "port": self.monitor_name,
 | 
				
			||||||
                "display": "NA",
 | 
					                "display": "NA",
 | 
				
			||||||
                "flags": 0x2,
 | 
					                "flags": 0x2,
 | 
				
			||||||
                "outfile": "/home/lanforge/Documents/out.cap",
 | 
					                "outfile": capname,
 | 
				
			||||||
                "duration": 45 
 | 
					                "duration": 45 
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        self.local_realm.json_post("/cli-json/sniff_port", _data= data)
 | 
					        self.local_realm.json_post("/cli-json/sniff_port", _data= data)
 | 
				
			||||||
@@ -911,6 +913,7 @@ class StationProfile:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            self.set_command_param("add_sta", "ssid", ssid)
 | 
					            self.set_command_param("add_sta", "ssid", ssid)
 | 
				
			||||||
            self.set_command_param("add_sta", "key", passwd)
 | 
					            self.set_command_param("add_sta", "key", passwd)
 | 
				
			||||||
 | 
					            # unset any other security flag before setting our present flags
 | 
				
			||||||
            self.set_command_flag("add_sta", types[security_type], 1)
 | 
					            self.set_command_flag("add_sta", types[security_type], 1)
 | 
				
			||||||
            self.add_sta_data["key"] = passwd
 | 
					            self.add_sta_data["key"] = passwd
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user