citronneur / rdpy

Remote Desktop Protocol in Twisted Python
GNU General Public License v3.0
1.67k stars 545 forks source link

【Chinese garbled code】 #125

Open ctccaozhe opened 2 years ago

ctccaozhe commented 2 years ago

The following code is the content of rdpy-rdphp.py I slightly modified the output format of rdpy

        domain, username, password = self._controller.getCredentials()
        hostname = self._controller.getHostname()
        print("username::::", username,type(username))
        print('{"type":2,"time":"%s","domain":"%s","addr":"%s:%s","username":"%s","password":"%s","hostname":"%s"}'%(datetime.datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S.%fZ"), domain, addr.host, addr.port,username, password, hostname))
        # self.start()
        self._controller.close()

For example, when the input user name is Chinese "憨憨", there will be garbled code

图片