diff --git a/main b/main new file mode 100755 index 0000000..a4734c9 Binary files /dev/null and b/main differ diff --git a/main.go b/main.go new file mode 100644 index 0000000..e365fa5 --- /dev/null +++ b/main.go @@ -0,0 +1,21 @@ +package main +import ( +"fmt" +"io/ioutil" +) + +func check(e error) { + if e != nil { + panic(e) + } +} + +func read_connections_file() { + var connections_file_path string = "/proc/net/tcp" + data, err := ioutil.ReadFile(connections_file_path) + check(err) + fmt.Println(string(data)) +} +func main() { + read_connections_file() +}