+interface sniffing script
This commit is contained in:
		
					parent
					
						
							
								871b187c2a
							
						
					
				
			
			
				commit
				
					
						5d62f26cb9
					
				
			
		
					 2 changed files with 17 additions and 0 deletions
				
			
		
							
								
								
									
										17
									
								
								bin/sniff-intf.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										17
									
								
								bin/sniff-intf.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,17 @@
 | 
			
		|||
#!/bin/sh
 | 
			
		||||
 | 
			
		||||
if [ $# -ne 2 ]; then
 | 
			
		||||
    echo "$0 intf name"
 | 
			
		||||
    exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
set -x
 | 
			
		||||
cd ~/master-thesis/pcap
 | 
			
		||||
 | 
			
		||||
intf=$1
 | 
			
		||||
name=$2
 | 
			
		||||
 | 
			
		||||
now=$(date +%F-%H%M)
 | 
			
		||||
filename=${name}-${now}-${intf}.pcap
 | 
			
		||||
 | 
			
		||||
sudo tcpdump -ni ${intf} -w "${filename}"
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue