This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./netstat -tan | |
Active Internet connections (servers and established) | |
Proto Recv-Q Send-Q Local Address Foreign Address State | |
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN | |
tcp 0 0 192.168.178.31:44372 69.171.246.16:443 ESTABLISHED | |
tcp 0 0 192.168.178.31:40658 192.30.252.97:443 ESTABLISHED | |
tcp 0 0 192.168.178.31:40662 192.30.252.97:443 ESTABLISHED | |
tcp 0 0 192.168.178.31:40657 192.30.252.97:443 ESTABLISHED | |
tcp 0 0 192.168.178.31:49462 132.176.114.185:993 ESTABLISHED | |
tcp 0 0 192.168.178.31:48935 62.159.74.127:443 ESTABLISHED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./netstat -tun | |
Active Internet connections (w/o servers) | |
Proto Recv-Q Send-Q Local Address Foreign Address State | |
tcp 0 0 192.168.178.23:56102 194.25.94.139:443 ESTABLISHED | |
tcp 0 0 192.168.178.23:59773 173.252.102.241:443 ESTABLISHED | |
tcp 0 0 192.168.178.23:40603 204.232.175.90:443 ESTABLISHED | |
tcp 0 0 192.168.178.23:54462 54.242.11.189:443 ESTABLISHED | |
tcp 0 0 192.168.178.23:52386 192.30.252.140:443 ESTABLISHED | |
tcp 0 0 192.168.178.23:52388 192.30.252.140:443 ESTABLISHED | |
tcp 0 0 192.168.178.23:56103 194.25.94.139:443 ESTABLISHED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How it is now: | |
$ ./route -6 | |
Kernel IPv6 routing table | |
Destination Next Hop Flag Met Ref Use If | |
::1/128 :: U 256 0 0 lo | |
2001:590:3401::3f8d:c211/128 fe80::200:24ff:fece:8965 UG 1 0 0 em1 | |
2001:668:108:9::4d43:60d8/128 fe80::200:24ff:fece:8965 UG 1 0 0 em1 | |
2001:67c:26f4:224::229/128 fe80::200:24ff:fece:8965 UG 1 3 3 em1 | |
2001:67c:26f4:224::231/128 fe80::200:24ff:fece:8965 UG 1 0 0 em1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"strings" | |
"github.com/mdlayher/netlink" | |
) | |
const nlafNested = (1 << 15) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net" | |
"os" | |
"time" | |
bpf "github.com/iovisor/gobpf/bcc" | |
"github.com/florianl/go-tc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bpftrace | |
#include <linux/skbuff.h> | |
#include <linux/ip.h> | |
BEGIN | |
{ | |
printf("follow the white rabbit\n"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bpftrace | |
/* | |
* dlopen.bt reports potential usage of dlopen() usage which is a combination | |
* of a open syscall followed by mmap syscall | |
*/ | |
BEGIN | |
{ | |
printf("Tracing potential dlopen() usage... Hit Ctrl-C to end.\n"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"math/rand" | |
"time" | |
) | |
//go:noinline | |
func fibonacciRecursive(n uint32) uint32 { | |
if n < 2 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"net" | |
"github.com/cilium/ebpf" | |
"github.com/cilium/ebpf/asm" | |
"github.com/cilium/ebpf/rlimit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"errors" | |
"log" | |
"os" | |
"os/signal" | |
"strconv" | |
"syscall" |
OlderNewer