SHARE
TWEET

Untitled

a guest Mar 30th, 2016 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package main
  2. import(n"net";t"strings";r"strconv";x"regexp";"os")
  3. func main(){l,_:=n.Listen("tcp",":"+os.Args[1])
  4. for{c,_:=l.Accept();var s int
  5. for _,i:=range t.Split(x.MustCompile(":[0-9]+$").ReplaceAllLiteralString(c.RemoteAddr().String(),""),"."){
  6. n,_:=r.Atoi(i);s=s+n};c.Write([]byte(r.Itoa(s)));c.Close()}}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top