Skip to content

Instantly share code, notes, and snippets.

View goujonbe's full-sized avatar
👋

Benoît Goujon goujonbe

👋
View GitHub Profile
@goujonbe
goujonbe / main.go
Last active June 20, 2020 18:19
A TCP port scanner that uses goroutines and Channels
package main
import (
"fmt"
"net"
"sort"
)
func worker(ports, results chan int) {
for p := range ports {
@goujonbe
goujonbe / main.go
Last active June 14, 2020 14:12
A sequential TCP port scanner.
package main
import (
"fmt"
"net"
)
func main() {
for i := 1; i <= 1024; i++ {
address := fmt.Sprintf("scanme.nmap.org:%d", i)