mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-11-03 20:27:54 +00:00 
			
		
		
		
	realm: DO NOT SHADOW BUILT IN FUNCTIONS!!!!!!!! DANGER!!! WARNING!!!! ALERT!!!!
Signed-off-by: matthew <stidmatt@gmail.com>
This commit is contained in:
		@@ -990,20 +990,18 @@ class PacketFilter:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    @staticmethod
 | 
					    @staticmethod
 | 
				
			||||||
    def get_filter_wlan_assoc_packets(ap_mac, sta_mac):
 | 
					    def get_filter_wlan_assoc_packets(ap_mac, sta_mac):
 | 
				
			||||||
        filter = "-T fields -e wlan.fc.type_subtype -e wlan.addr -e wlan.fc.pwrmgt " \
 | 
					        return "-T fields -e wlan.fc.type_subtype -e wlan.addr -e wlan.fc.pwrmgt " \
 | 
				
			||||||
                 "-Y \"(wlan.addr==%s or wlan.addr==%s) and wlan.fc.type_subtype<=3\" " % (ap_mac, sta_mac)
 | 
					                 "-Y \"(wlan.addr==%s or wlan.addr==%s) and wlan.fc.type_subtype<=3\" " % (ap_mac, sta_mac)
 | 
				
			||||||
        return filter
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @staticmethod
 | 
					    @staticmethod
 | 
				
			||||||
    def get_filter_wlan_null_packets(ap_mac, sta_mac):
 | 
					    def get_filter_wlan_null_packets(ap_mac, sta_mac):
 | 
				
			||||||
        filter = "-T fields -e wlan.fc.type_subtype -e wlan.addr -e wlan.fc.pwrmgt " \
 | 
					        return "-T fields -e wlan.fc.type_subtype -e wlan.addr -e wlan.fc.pwrmgt " \
 | 
				
			||||||
                 "-Y \"(wlan.addr==%s or wlan.addr==%s) and wlan.fc.type_subtype==44\" " % (ap_mac, sta_mac)
 | 
					                 "-Y \"(wlan.addr==%s or wlan.addr==%s) and wlan.fc.type_subtype==44\" " % (ap_mac, sta_mac)
 | 
				
			||||||
        return filter
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @staticmethod
 | 
					    @staticmethod
 | 
				
			||||||
    def run_filter(pcap_file, filter):
 | 
					    def run_filter(pcap_file, file_filter):
 | 
				
			||||||
        filename = "/tmp/tshark_dump.txt"
 | 
					        filename = "/tmp/tshark_dump.txt"
 | 
				
			||||||
        cmd = "tshark -r %s %s > %s" % (pcap_file, filter, filename)
 | 
					        cmd = "tshark -r %s %s > %s" % (pcap_file, file_filter, filename)
 | 
				
			||||||
        # print("CMD: ", cmd)
 | 
					        # print("CMD: ", cmd)
 | 
				
			||||||
        os.system(cmd)
 | 
					        os.system(cmd)
 | 
				
			||||||
        lines = []
 | 
					        lines = []
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user