From e72c0da9d929eb91dc01664c24e253d4ed5326cc Mon Sep 17 00:00:00 2001 From: speyrefitte Date: Fri, 20 Jun 2014 17:44:35 +0200 Subject: [PATCH] add license header --- README.md | 2 +- rdpy/display/qt.py | 28 +++++++++++++++++++++++++--- rdpy/display/rle.py | 31 +++++++++++++++++++++++++++---- rdpy/examples/rdpclient.py | 27 ++++++++++++++++++++++++--- rdpy/examples/vncclient.py | 27 ++++++++++++++++++++++++--- rdpy/network/const.py | 25 ++++++++++++++++++++++--- rdpy/network/error.py | 25 ++++++++++++++++++++++--- rdpy/network/layer.py | 27 ++++++++++++++++++++++++--- rdpy/network/type.py | 28 +++++++++++++++++++++++++--- 9 files changed, 194 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 0c5aa5f..4cc460a 100644 --- a/README.md +++ b/README.md @@ -10,4 +10,4 @@ Remote Desktop Protocol in Twisted Python * python-qt4 * python-qt4reactor -this project is still in progress. +this project is still in progress. diff --git a/rdpy/display/qt.py b/rdpy/display/qt.py index 216688d..0e90fb5 100644 --- a/rdpy/display/qt.py +++ b/rdpy/display/qt.py @@ -1,6 +1,28 @@ -''' -@author: sylvain -''' +# +# Copyright (c) 2014 Sylvain Peyrefitte +# +# This file is part of rdpy. +# +# rdpy is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +""" +Qt specific code + +QRemoteDesktop is a widget use for render in rdpy +""" + from PyQt4 import QtGui, QtCore from rdpy.protocol.rfb.rfb import RFBClientObserver from rdpy.protocol.rdp.rdp import RDPClientObserver diff --git a/rdpy/display/rle.py b/rdpy/display/rle.py index 992be6d..40cdeaa 100644 --- a/rdpy/display/rle.py +++ b/rdpy/display/rle.py @@ -1,8 +1,31 @@ -''' -@author: citronneur -@file: implement run length encoding algorithm use in RDP protocol to compress bit +# +# Copyright (c) 2014 Sylvain Peyrefitte +# +# This file is part of rdpy. +# +# rdpy is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +""" +Run length Encoding Algorithm implementation + +It's the microsoft view of RLE algorithm + +Most of bitmap in RDP protocol use this encoding + @see: http://msdn.microsoft.com/en-us/library/dd240593.aspx -''' +""" from rdpy.network.type import UInt8 def extractCodeId(data): diff --git a/rdpy/examples/rdpclient.py b/rdpy/examples/rdpclient.py index 38d85de..d4a2a95 100644 --- a/rdpy/examples/rdpclient.py +++ b/rdpy/examples/rdpclient.py @@ -1,8 +1,29 @@ -''' -@author: citronneur -''' +# +# Copyright (c) 2014 Sylvain Peyrefitte +# +# This file is part of rdpy. +# +# rdpy is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +""" +example of use rdpy as rdp client +""" + import sys import os + # Change path so we find rdpy sys.path.insert(1, os.path.join(sys.path[0], '../..')) diff --git a/rdpy/examples/vncclient.py b/rdpy/examples/vncclient.py index 3d53023..737a9dc 100644 --- a/rdpy/examples/vncclient.py +++ b/rdpy/examples/vncclient.py @@ -1,8 +1,29 @@ -''' -@author: citronneur -''' +# +# Copyright (c) 2014 Sylvain Peyrefitte +# +# This file is part of rdpy. +# +# rdpy is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +""" +example of use rdpy as vnc client +""" + import sys import os + # Change path so we find rdpy sys.path.insert(1, os.path.join(sys.path[0], '../..')) diff --git a/rdpy/network/const.py b/rdpy/network/const.py index fbd3dd8..fa66ae2 100644 --- a/rdpy/network/const.py +++ b/rdpy/network/const.py @@ -1,6 +1,25 @@ -''' -@author: sylvain -''' +# +# Copyright (c) 2014 Sylvain Peyrefitte +# +# This file is part of rdpy. +# +# rdpy is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +""" +Const it's use to create fake object enum in python +""" from copy import deepcopy diff --git a/rdpy/network/error.py b/rdpy/network/error.py index 7f5240f..d55ce34 100644 --- a/rdpy/network/error.py +++ b/rdpy/network/error.py @@ -1,6 +1,25 @@ -''' -@author: sylvain -''' +# +# Copyright (c) 2014 Sylvain Peyrefitte +# +# This file is part of rdpy. +# +# rdpy is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +""" +All exceptions error use in RDPY +""" class InvalidValue(Exception): ''' diff --git a/rdpy/network/layer.py b/rdpy/network/layer.py index a20a3ab..5c2d514 100644 --- a/rdpy/network/layer.py +++ b/rdpy/network/layer.py @@ -1,6 +1,27 @@ -''' -@author: sylvain -''' +# +# Copyright (c) 2014 Sylvain Peyrefitte +# +# This file is part of rdpy. +# +# rdpy is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +""" +Join RDPY design with twisted design + +RDPY use Layer Protocol design (like twisted) +""" class LayerMode(object): NONE = 0 diff --git a/rdpy/network/type.py b/rdpy/network/type.py index 6ed0e79..9f1dc4d 100644 --- a/rdpy/network/type.py +++ b/rdpy/network/type.py @@ -1,6 +1,28 @@ -''' -@author: sylvain -''' +# +# Copyright (c) 2014 Sylvain Peyrefitte +# +# This file is part of rdpy. +# +# rdpy is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +""" +All type use RDPY + +It's a basic implementation that seems to protobuf but dynamically +We are in python we can use that! +""" import struct from copy import deepcopy