Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4. "crypto/tls"
  5. "log"
  6.  
  7. "github.com/mattn/go-xmpp"
  8. )
  9.  
  10. const (
  11. svr = "dukgo.com"
  12. usr = "testtesttest"
  13. pwd = "test123"
  14. )
  15.  
  16. func main() {
  17. xmpp.DefaultConfig = tls.Config{
  18. ServerName: svr,
  19. InsecureSkipVerify: false,
  20. }
  21.  
  22. options := xmpp.Options{
  23. Host: svr,
  24. User: usr,
  25. Password: pwd,
  26. }
  27.  
  28. _, err := options.NewClient()
  29. if err != nil {
  30. log.Fatal(err)
  31. }
  32. }
  33.  
  34. 2016/08/24 16:32:27 tls: oversized record received with length 28012
  35. exit status 1
  36.  
  37. // Server has the port
  38. var server = flag.String("server", "talk.google.com:443", "server")
  39. var username = flag.String("username", "", "username")
  40. var password = flag.String("password", "", "password")
  41. var status = flag.String("status", "xa", "status")
  42. var statusMessage = flag.String("status-msg", "I for one welcome our new codebot overlords.", "status message")
  43. var notls = flag.Bool("notls", false, "No TLS")
  44. var debug = flag.Bool("debug", false, "debug output")
  45. var session = flag.Bool("session", false, "use server session")
  46.  
  47. // Omitted code
  48.  
  49. var talk *xmpp.Client
  50. var err error
  51. options := xmpp.Options{Host: *server,
  52. User: *username,
  53. Password: *password,
  54. NoTLS: *notls,
  55. Debug: *debug,
  56. Session: *session,
  57. Status: *status,
  58. StatusMessage: *statusMessage,
  59. }
  60.  
  61. talk, err = options.NewClient()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement