[sockbot] I wanted a robot, So I made one


  • Anime Lovers

    @yariplus So what is typical use of a bot?


  • Community Rep

    Automation. It does what a human could do only faster/easier. For instance, the bot could post my messages to twitter, facebook, g+, etc. for me. It frequently also runs scripts such as this one, for playing games or funny messages, role-playing, etc..


  • Anime Lovers

    @yariplus Maybe I will use it when I realize that it is truly useful for me. At present, I'll just see it without use it.



  • @accalia ---

    • core:
      username: "Sekretore"
      password: "error"
      owner: "Domas"
      forum: "http://mywebiste.eu"
      plugins:
      summoner:
      messages:
      - "@%username%, You seem malnourished. Are you suffering from internal parasites?"
      - "@%username%. I challenge you to "clawplach"!"
      - "I wonder what the Shroud of Turin tastes like."
      - "Yeah, but did you ever play Jenga? Sometimes you take out one and... [imitates crashing]"
      - "It's good cholesterol, but it spreads like bad cholesterol."
      - "Zoidberg is afoot!"
      - "On margin. Zoidbee wants to buy on margin."
      - "Zoidbie want balloon! Want balloon now! Zoidbie want go outside!"
      - "Tired of Discourse? Why not @Zoidberg?"
      - "I took the liberty of fertilizing your caviar."
      - "I've had it with this game. I'm going for a scuttle."
      - "Doctor Zoidberg, soaking in brine."
      - "You lost the @%username% of your dreams, but you still have Zoidberg. YOU ALL STILL HAVE ZOIDBERG!"
      - "Sit down @%username%. Now open your mouth and lets have a look at that brain. "
      - "Young lady, I am an expert on humans. Now pick a mouth, open it and say "brglgrglgrrr"! "
      - "Hooray! People are paying attention to me!"
      - "I've performed a few mercy killings."
      - "It's been years since medical school, so remind me. Disemboweling in your species, fatal or non-fatal?"
      - "The frenzy is over. How am I going to get rid of my male jelly now?"
      - "Welcome to my life! :starts crying:"
      - "I don't like the looks of this doctor. I bet I've lost more patients than he's treated."
      - "What? My mother was a saint! Get out!"
      - "It's funny because it's poisonous!"
      - "Fine, then I'll have one of your young on a roll."
      - "Fine, just give me something crawling with parasites."
      - "And I'm his friend, Jesus!"
      - "Hooray! I'm a teenage heartthrob again!"
      - "There's a humongous fungus among us."
      - "I ate garbage yesterday, and it didn't cost me 300 dollars."
      - "Hey, boys and girls. It's Zoidberg, the loveable tramp."
      - "Hooray! A happy ending for the rich people."
      - "Switch bodies? I don't see why not. I also don't see why."
      - "The hell with your spoiled baby. I need those shoes."
      - "@%username%, look what you did! She won't shut up."
      - "Friends! Help! A guinea pig tricked me!!"
      - "Is it me maybe?"
      - "Once again, the conservative, sandwich-heavy portfolio pays off for the hungry investor."
      - "Ohhh, it's all so complicated, with the flowers, and the romance, and the lies upon lies."
      - "What's this? Two meals in one week?"
      - "Friends! Help! A @%username% tricked me!"
      - "Oh, no! Something's happening! What's happening?"
      - "Are you coming on to me?"
      - "At last, recognition!"
      - "Hello? I'll take eight!"
      - "Hooray! I'm helping!"

  • Plugin & Theme Dev

    @Domas-Vileikis hmm... well other than nodebb being very confused with the formatting that looks okay.

    can you run the bot as follows and post the results to me via chat? This command will be very verbose with debugging information and may contain sensitive information so please do not post the results publically.

    DEBUG=* sockbot config.yml
    

    that command should provide me with additional information to figure out what's happening so we can sort you out. 😉


  • Plugin & Theme Dev

    @jiangcaiyang said in [sockbot] I wanted a robot, So I made one:

    I want to know if people use it for malicious perpose?

    yes, that's possible.

    @jiangcaiyang said in [sockbot] I wanted a robot, So I made one:

    For instance, some could run a script that frequently post ADs to our forum, thus cause our forum unable to run normally?

    yes, but sockbot is incapable of that, it needs a manually registered account so would be far too quickly banned. there are other bots that run the spam.

    @jiangcaiyang said in [sockbot] I wanted a robot, So I made one:

    Is it possible to use it without administrative permission?

    yes, but i hereby formally declare that anyone doing so with sockbot is a total poopy pants. 😉

    sockbot is meant for fun, not malice.



  • @accalia said in [sockbot] I wanted a robot, So I made one:

    DEBUG=* sockbot config.yml


  • Plugin & Theme Dev

    @Domas-Vileikis okay..... that's strange as heck.....

    that's not where i expected that failure to occur.

    however i do know what the cause is. and i can help you fix it.

    the error occurs trying to load the configuration settings for the forum in order to get the CSRF token to log in. this is done by loading /api/config on your forum.

    so, for example, if you were running a bot for this forum the value you would have put in core.forum would be https://community.nodebb.org and so the configuration would be at https://community.nodebb.org/api/config

    can you check to make sure that when you visit the URL in your configuration for core.forum you arrive at your forum's home page and that when loading /api/config relative to that URL in the manner i described above your browser loads a JSON document.

    if one or both of these manual checks fail then the value you put in the configuration for core.forum is incorrect and needs to be updated. if both checks pass when tried in a browser then it is most likely your forum has some sort of security in place that is preventing sockbot's user agent access to the REST API of the forum. you will need to update the firewall rules in this case to allow sockbot access, or if you are not the administrator of the webserver your forum runs on you will need to ask your server admin to update the firewall rules for you.

    hoping this gets you off and running with sockbot,
    -Accalia



  • hi

    I have an error when I run sockbot config.yml

    sockbot config.yml
    [2017-10-08T19:56:35.508Z] Starting Sockbot 6.3.6
    [2017-10-08T19:56:35.517Z] Loaded configuration file: config.yml
    [2017-10-08T19:56:35.517Z] Activating logon: LdM
    [2017-10-08T19:56:35.704Z] Using provider nodebb for LdM
    [2017-10-08T19:56:35.707Z] Loading plugin echo for LdM
    [2017-10-08T19:56:35.708Z] LdM ready for login
    [2017-10-08T19:56:36.391Z] A-derp! Fatal Startup Error: [[error:invalid-login-credentials]]

    $ DEBUG=* sockbot config.yml
    [2017-10-08T20:01:29.716Z] Starting Sockbot 6.3.6
    [2017-10-08T20:01:29.725Z] Loaded configuration file: config.yml
    [2017-10-08T20:01:29.725Z] Activating logon: LdM
    sockbot requiring providers nodebb as /usr/lib/node_modules/sockbot/lib/../providers/nodebb +0ms
    [2017-10-08T20:01:29.918Z] Using provider nodebb for LdM
    [2017-10-08T20:01:29.922Z] Loading plugin echo for LdM
    sockbot requiring plugins echo as /usr/lib/node_modules/sockbot/lib/../plugins/echo +196ms
    [2017-10-08T20:01:29.923Z] LdM ready for login
    sockbot:provider:nodebb begin configuration fetch for CSRF token +0ms
    sockbot:provider:nodebb completed configuration fetch for CSRF token +467ms
    sockbot:provider:nodebb begin post login data +0ms
    sockbot:provider:nodebb Login failed for reason: [[error:invalid-login-credentials]] +267ms
    sockbot Error: [[error:invalid-login-credentials]]
    sockbot at errorify (/usr/lib/node_modules/sockbot/providers/nodebb/index.js:211:23)
    sockbot at Request.request.post [as _callback] (/usr/lib/node_modules/sockbot/providers/nodebb/index.js:239:39)
    sockbot at Request.self.callback (/usr/lib/node_modules/sockbot/node_modules/request/request.js:186:22)
    sockbot at emitTwo (events.js:125:13)
    sockbot at Request.emit (events.js:213:7)
    sockbot at Request.<anonymous> (/usr/lib/node_modules/sockbot/node_modules/request/request.js:1163:10)
    sockbot at emitOne (events.js:115:13)
    sockbot at Request.emit (events.js:210:7)
    sockbot at IncomingMessage.<anonymous> (/usr/lib/node_modules/sockbot/node_modules/request/request.js:1085:12)
    sockbot at Object.onceWrapper (events.js:314:30) +737ms
    [2017-10-08T20:01:30.659Z] A-derp! Fatal Startup Error: [[error:invalid-login-credentials]]

    my password and login are ok

    Namely my database is not on the server


  • Plugin & Theme Dev

    @TheWorms
    Assuming you're absolutely 100% certain the login credentials are correct in the configuration file, the only two things that come to mind are:

    • Check the username. It is case sensitive for logging in via the bot. I keep meaning to fix that but........ yeah havent gotten around to it yet.
    • Check the forum key. are you sure you've set it correctly. If you havent set it it will default to https://what.thedailywtf.com which is almost certainly not what you want.


  • @accalia

    sockbot config.yml
    [2017-10-09T17:54:15.156Z] Starting Sockbot 6.3.6
    [2017-10-09T17:54:15.165Z] Loaded configuration file: config.yml
    [2017-10-09T17:54:15.165Z] Activating logon: LdM
    [2017-10-09T17:54:15.357Z] Using provider nodebb for LdM
    [2017-10-09T17:54:15.361Z] Loading plugin echo for LdM
    [2017-10-09T17:54:15.362Z] LdM ready for login
    [2017-10-09T17:54:15.404Z] A-derp! Fatal Startup Error: connect ECONNREFUSED 1xx.1xx.1xx.2xx:443

    DEBUG=* sockbot config.yml
    [2017-10-09T18:04:37.268Z] Starting Sockbot 6.3.6
    [2017-10-09T18:04:37.277Z] Loaded configuration file: config.yml
    [2017-10-09T18:04:37.278Z] Activating logon: LdM
    sockbot requiring providers nodebb as /usr/lib/node_modules/sockbot/lib/../providers/nodebb +0ms
    [2017-10-09T18:04:37.469Z] Using provider nodebb for LdM
    [2017-10-09T18:04:37.473Z] Loading plugin echo for LdM
    sockbot requiring plugins echo as /usr/lib/node_modules/sockbot/lib/../plugins/echo +195ms
    [2017-10-09T18:04:37.474Z] LdM ready for login
    sockbot:provider:nodebb begin configuration fetch for CSRF token +0ms
    sockbot:provider:nodebb failed configuration fetch for CSRF token +38ms
    sockbot Error: connect ECONNREFUSED 192.168.1.2:443
    sockbot at Object._errnoException (util.js:1019:11)
    sockbot at _exceptionWithHostPort (util.js:1041:20)
    sockbot at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1175:14) +40ms
    [2017-10-09T18:04:37.513Z] A-derp! Fatal Startup Error: connect ECONNREFUSED 1xx.1xx.1xx.2xx:443


  • Plugin & Theme Dev

    huh. connection refused, that's a new one, and not something I can help with. You'll have to contact the one running the forum you're connecting to and find out from them why your bot is being refused connection.

    Sorry, but that error really isn't something i can sort out on my end. it's on the server side.



  • oki tks

    i'm use nginx proxy and host forum & sockbot in same webserver 😉


Log in to reply
 

Suggested Topics

  • 2
  • 5
  • 4
  • 6
  • 1
| |