mirror of
				https://github.com/maride/afl-transmit.git
				synced 2025-10-11 01:56:50 +00:00 
			
		
		
		
	Add flag for statistics
This commit is contained in:
		
							parent
							
								
									10e940126d
								
							
						
					
					
						commit
						da2d1f47e5
					
				
							
								
								
									
										6
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								main.go
									
									
									
									
									
								
							| @ -11,6 +11,7 @@ import ( | |||||||
| 
 | 
 | ||||||
| var ( | var ( | ||||||
| 	outputDirectory string | 	outputDirectory string | ||||||
|  | 	printStats bool | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func main() { | func main() { | ||||||
| @ -34,7 +35,9 @@ func main() { | |||||||
| 	go watchdog.WatchFuzzers(outputDirectory) | 	go watchdog.WatchFuzzers(outputDirectory) | ||||||
| 
 | 
 | ||||||
| 	// Start stat printer | 	// Start stat printer | ||||||
| 	go stats.PrintStats() | 	if printStats { | ||||||
|  | 		go stats.PrintStats() | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| 	// Listen for incoming connections | 	// Listen for incoming connections | ||||||
| 	listenErr := net.Listen(outputDirectory) | 	listenErr := net.Listen(outputDirectory) | ||||||
| @ -46,4 +49,5 @@ func main() { | |||||||
| // Registers flags which are required by multiple modules and need to be handled here | // Registers flags which are required by multiple modules and need to be handled here | ||||||
| func RegisterGlobalFlags() { | func RegisterGlobalFlags() { | ||||||
| 	flag.StringVar(&outputDirectory, "fuzzer-directory", "", "The output directory of the fuzzer(s)") | 	flag.StringVar(&outputDirectory, "fuzzer-directory", "", "The output directory of the fuzzer(s)") | ||||||
|  | 	flag.BoolVar(&printStats, "print-stats", true, "Print traffic statistics every few seconds") | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user