From 5f1c75fd93af98a5d870424971f0383ac4614058 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Fri, 29 May 2009 00:16:22 +0200 Subject: socket server basic --- module/remote/RequestHandler.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 module/remote/RequestHandler.py (limited to 'module/remote/RequestHandler.py') diff --git a/module/remote/RequestHandler.py b/module/remote/RequestHandler.py new file mode 100644 index 000000000..9964c90c0 --- /dev/null +++ b/module/remote/RequestHandler.py @@ -0,0 +1,29 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +""" +authored by: RaNaN + +this module handels the incoming requests + +""" + +import base64 +from cPickle import Pickler +from cStringIO import StringIO +from Crypto.Cipher import AES + + +class RequestHandler(): + def __init__(self, core): + self.core = core + self.p = Pickler(string) + self.obj = AES.new('pw', AES.MODE_ECB) + + def proceed(self, data): + return "the answer." + + def decrypt(self, string): + string = string + buf = StringIO(string) + + -- cgit v1.2.3