Created
April 16, 2017 02:16
-
-
Save caioluders/07cefba88b531149d46b366f3651d7a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def zk_open_the_fucking_door(self,cmd,ss): | |
command = cmd | |
command_string = ss | |
chksum = 0 | |
session_id = self.session_id | |
reply_id = unpack('HHHH', self.data_recv[:8])[3] | |
buf = self.createHeader(command, chksum, session_id, | |
reply_id, command_string) | |
self.zkclient.sendto(buf, self.address) | |
#print buf.encode("hex") | |
try: | |
self.data_recv, addr = self.zkclient.recvfrom(1024) | |
self.session_id = unpack('HHHH', self.data_recv[:8])[2] | |
return self.data_recv[8:] | |
except: | |
return False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment