Skip to content

Commit

Permalink
[WIP] py3 - vnc
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessandroZ committed Apr 15, 2019
1 parent 2255eb5 commit 69d10f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Windows/lazagne/softwares/sysadmin/vnc.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def split_len(self, seq, length):

def do_crypt(self, password, decrypt):
passpadd = (password + '\x00' * 8)[:8]
strkey = ''.join([chr(x) for x in self.vnckey])
strkey = b''.join([chr_or_byte(x) for x in int(self.vnckey)])
key = d.deskey(strkey, decrypt)
crypted = d.desfunc(passpadd, key)
return crypted
Expand Down Expand Up @@ -53,7 +53,7 @@ def reverse_vncpassword(self, hash):
cryptedblocks = []
for sblock in splitstr:
cryptedblocks.append(self.do_crypt(codecs.decode(sblock, 'hex'), True))
pwd = ''.join(cryptedblocks)
pwd = b''.join(cryptedblocks)
elif len(hexpasswd) <= 16:
pwd = self.do_crypt(encpasswd, True)
else:
Expand Down

0 comments on commit 69d10f5

Please sign in to comment.