From 69f765b2476b77967588c0751be8afda7dc3adaf Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 31 May 2009 15:09:58 +0200 Subject: new socket encryption --- module/remote/ClientHandler.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 module/remote/ClientHandler.py (limited to 'module/remote/ClientHandler.py') diff --git a/module/remote/ClientHandler.py b/module/remote/ClientHandler.py new file mode 100644 index 000000000..0037a874e --- /dev/null +++ b/module/remote/ClientHandler.py @@ -0,0 +1,22 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +""" +authored by: RaNaN + +this module handels the incoming requests + +""" +import hashlib + +from Crypto.Cipher import Blowfish +from RequestHandler import RequestHandler + +class ClientHandler(RequestHandler): + def __init__(self, client): + self.client = client + key = hashlib.sha256("pwhere") + self.bf = Blowfish.new(key.hexdigest(), Blowfish.MODE_ECB) + + def proceed(self, data): + obj = self.decrypt(data) + return self.encrypt(obj) \ No newline at end of file -- cgit v1.2.3