Skip to content

Instantly share code, notes, and snippets.

package main
import (
"bufio"
"fmt"
"net/url"
"os"
"strings"
)
package main
import (
"fmt"
"log"
"net"
)
func main() {
c, err := net.Dial("tcp", "localhost:9090")
package main
import (
"context"
"net"
"time"
)
func main() {
r := &net.Resolver{
@bruston
bruston / cidr.py
Last active November 14, 2019 13:51
Expand ipv4 or ipv6 CIDR to a list of IP addresses in python 2 or 3
#!/usr/bin/env python
import ipaddress
import sys
try:
unicode("")
except NameError:
unicode = str