Advertisement
Guest User

python irc ssl error

a guest
Aug 1st, 2015
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. IRC ssl error this happens after I send a command/plugin/addon to be used as multiprocessing check[3].main has been dynamically loaded as a module and .main is a function in that module, the connection closes. Normal sockets with no ssl works just fine and as intended, only if it's wrapped in ssl it seems to close the connection? Maybe something elseidk, which is why I'm seeking help.:
  2. ssl.SSLError: [SSL: SSLV3_ALERT_BAD_RECORD_MAC] sslv3 alert bad record mac (_ssl.c:1769)
  3.  
  4. com_process = multiprocessing.Process(target=check[3].main, args=(check[0], check[1], check[2], self.sendIrc))
  5.  
  6. sendIrc is only being used as below in another class we have inherited from.
  7. def sendIrc(self, data):
  8. if type(data) == str:
  9. self.sendData("PRIVMSG %s :%s\r\n" % (self.channel, data))
  10. return
  11.  
  12. sendData encode as utf-8 because python3:
  13. def sendData(self, data):
  14. self.sock.send(data.encode('utf-8'))
  15.  
  16. check[3].main points to this module that has been dynamically loaded and ran under the mutliprocessing:
  17. import time
  18.  
  19. def main(nick, comargvs, chan, send):
  20. print(nick, comargvs, chan)
  21. time.sleep(5)
  22. send("Success!")
  23.  
  24. after this is ran, the parent or calling main code gets the error I posted, but only when ssl is used.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement