|
|
@ -3,7 +3,6 @@ package main
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
"flag"
|
|
|
|
"flag"
|
|
|
|
"fmt"
|
|
|
|
"fmt"
|
|
|
|
"math/rand"
|
|
|
|
|
|
|
|
"net"
|
|
|
|
"net"
|
|
|
|
"os"
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -21,15 +20,6 @@ func usage(status int) {
|
|
|
|
os.Exit(status)
|
|
|
|
os.Exit(status)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func randomString(n int) string {
|
|
|
|
|
|
|
|
var alpha = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
|
|
|
|
|
|
|
buf := make([]byte, n)
|
|
|
|
|
|
|
|
for i := 0; i < len(buf); i++ {
|
|
|
|
|
|
|
|
buf[i] = alpha[rand.Intn(len(alpha)-1)]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return string(buf)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
func main() {
|
|
|
|
flag.Parse()
|
|
|
|
flag.Parse()
|
|
|
|
|
|
|
|
|
|
|
|