diff --git a/main.go b/main.go
index 8d11c7b3602a938cab93230018525fb53acc58a3..eb2835c38626123c87e55230635eeb7e7e59e288 100644
--- a/main.go
+++ b/main.go
@@ -4,6 +4,7 @@ import (
 	"bufio"
 	"crypto/tls"
 	"encoding/binary"
+	"flag"
 	"fmt"
 	"net"
 )
@@ -117,7 +118,11 @@ func parseProtocolInfo(data []byte) protocolInfo {
 }
 
 func main() {
-	conn := makeConnection("kuschku.de", 4242)
+	hostname := flag.String("hostname", "", "address of server to connect to")
+	port := flag.Int("port", 4242, "port of server to connect to")
+	flag.Parse()
+
+	conn := makeConnection(*hostname, *port)
 	conn.write(PROTOCOL_MAGIC | uint32(PROTOCOL_FEATURE_TLS))
 	supportedProtocols := []uint32{
 		PROTOCOL_DATASTREAM,
@@ -128,7 +133,6 @@ func main() {
 	conn.write(1 << 31)
 	conn.flush()
 	protocolInfo := parseProtocolInfo(conn.read(4))
-	println("Read Protocol Info")
 	if protocolInfo.flagTLS {
 		conn.withTLS(false)
 	}