JustinTimperio / gomap

A fully self-contained Nmap like parallel port scanning module in pure Golang that supports SYN-ACK (Silent Scans)
MIT License
86 stars 19 forks source link

Add context version of main functions #16

Closed a-urth closed 1 year ago

a-urth commented 1 year ago

Problem: since main scanning functions use goroutines there is no way to stop them externally if used as library.

Solution: add new function which accept content as first parameters. In main loops of goroutines check for context in select statement and shutdown in case it closed.