Skip to content

Instantly share code, notes, and snippets.

@mvrilo
Created November 2, 2013 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mvrilo/7279775 to your computer and use it in GitHub Desktop.
Save mvrilo/7279775 to your computer and use it in GitHub Desktop.
package main
import "net"
// inspired by disqus.com/humans.txt
const bender = `
.-.
( )
'-'
J L
| |
J L
| |
J L
.-'.___.'-.
/___________\
_.-""' 'bmw._
.' '.
J '.
F L
J J
J '
| L
| | .----------------.
| | ( KILL ALL HUMANS! )
| J ,----------------'
| L -'
| |
| ,.___ ___....--._
| ,' '""""""""' '-._
| J _____________________'-.
| F .-' '-88888-' 'Y8888b.'.
| | .' 'P' '88888b \
| | J # L # q8888b L
| | | | )8888D )
| J \ J d8888P P
| L '. .b. ,88888P /
| '. '-.___,o88888o.___,o88888P'.'
| '-.__________________________..-'
| |
| .-----.........____________J
| .' | | | |
| J---|-----..|...___|_______|
| | | | | |
| Y---|-----..|...___|_______|
| '. | | | |
| ''-------:....__|______.J
| |
L___ |
"""----...______________....--'
`
func main() {
addr := ":2000"
l, err := net.Listen("tcp", addr)
if err != nil {
panic(err)
}
defer l.Close()
println(" - bender is waiting on " + addr)
for {
conn, err := l.Accept()
if err != nil {
panic(err)
}
go func(c net.Conn) {
c.Write([]byte(bender))
c.Close()
}(conn)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment