finish rle module build
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -2,7 +2,7 @@
|
|||||||
.project
|
.project
|
||||||
.pydevproject
|
.pydevproject
|
||||||
README.md~
|
README.md~
|
||||||
lib/obj/*
|
lib/build/*
|
||||||
*.so
|
*.so
|
||||||
*.os
|
*.os
|
||||||
.sconsign.dblite
|
.sconsign.dblite
|
||||||
|
|||||||
27
README.md
27
README.md
@@ -6,16 +6,39 @@ Remote Desktop Protocol in Twisted Python
|
|||||||
* python2.7
|
* python2.7
|
||||||
* python-twisted
|
* python-twisted
|
||||||
* python-openssl
|
* python-openssl
|
||||||
|
|
||||||
## Requirements for examples
|
|
||||||
* python-qt4
|
* python-qt4
|
||||||
* python-qt4reactor
|
* python-qt4reactor
|
||||||
|
|
||||||
|
## Requirements libs
|
||||||
|
* python-sip-dev
|
||||||
|
* scons
|
||||||
|
```
|
||||||
|
$ git clone https://github.com/citronneur/rdpy.git rdpy
|
||||||
|
$ scons -C rdpy/lib install
|
||||||
|
```
|
||||||
|
|
||||||
|
## Binaries
|
||||||
|
RDP Client
|
||||||
|
```
|
||||||
|
$ rdpy/bin/rdpy-rdpclient XXX.XXX.XXX.XXX 3389
|
||||||
|
```
|
||||||
|
|
||||||
|
VNC Client
|
||||||
|
```
|
||||||
|
$ rdpy/bin/rdpy-vncclient XXX.XXX.XXX.XXX 5901
|
||||||
|
```
|
||||||
|
|
||||||
|
RDP Proxy
|
||||||
|
```
|
||||||
|
$ rdpy/bin/rdpy-vncclient XXX.XXX.XXX.XXX 5901
|
||||||
|
```
|
||||||
|
|
||||||
##Must be implemented before first release
|
##Must be implemented before first release
|
||||||
* CreedSSP
|
* CreedSSP
|
||||||
* Packet redirection
|
* Packet redirection
|
||||||
* License
|
* License
|
||||||
* Most common orders
|
* Most common orders
|
||||||
* FastPath messages
|
* FastPath messages
|
||||||
|
* Des VNC (using pyDes)
|
||||||
|
|
||||||
this project is still in progress.
|
this project is still in progress.
|
||||||
|
|||||||
5
rdpy/examples/rdpclient.py → bin/rdpy-rdpclient
Normal file → Executable file
5
rdpy/examples/rdpclient.py → bin/rdpy-rdpclient
Normal file → Executable file
@@ -1,3 +1,4 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 Sylvain Peyrefitte
|
# Copyright (c) 2014 Sylvain Peyrefitte
|
||||||
#
|
#
|
||||||
@@ -25,10 +26,10 @@ import sys
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
# Change path so we find rdpy
|
# Change path so we find rdpy
|
||||||
sys.path.insert(1, os.path.join(sys.path[0], '../..'))
|
sys.path.insert(1, os.path.join(sys.path[0], '..'))
|
||||||
|
|
||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui
|
||||||
from rdpy.display.qt4 import RDPClientQt
|
from rdpy.ui.qt4 import RDPClientQt
|
||||||
from rdpy.protocol.rdp import rdp
|
from rdpy.protocol.rdp import rdp
|
||||||
|
|
||||||
class RDPClientQtFactory(rdp.ClientFactory):
|
class RDPClientQtFactory(rdp.ClientFactory):
|
||||||
3
rdpy/examples/rdpserver.py → bin/rdpy-rdpproxy
Normal file → Executable file
3
rdpy/examples/rdpserver.py → bin/rdpy-rdpproxy
Normal file → Executable file
@@ -1,10 +1,11 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
'''
|
'''
|
||||||
@author: sylvain
|
@author: sylvain
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import sys, os
|
import sys, os
|
||||||
# Change path so we find rdpy
|
# Change path so we find rdpy
|
||||||
sys.path.insert(1, os.path.join(sys.path[0], '../..'))
|
sys.path.insert(1, os.path.join(sys.path[0], '..'))
|
||||||
|
|
||||||
from rdpy.protocol.rdp import rdp
|
from rdpy.protocol.rdp import rdp
|
||||||
|
|
||||||
25
rdpy/tests/dotest.py → bin/rdpy-test
Normal file → Executable file
25
rdpy/tests/dotest.py → bin/rdpy-test
Normal file → Executable file
@@ -1,9 +1,26 @@
|
|||||||
'''
|
#!/usr/bin/python
|
||||||
@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 <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
import sys, os
|
import sys, os
|
||||||
# Change path so we find rdpy
|
# Change path so we find rdpy
|
||||||
sys.path.insert(1, os.path.join(sys.path[0], '../..'))
|
sys.path.insert(1, os.path.join(sys.path[0], '..'))
|
||||||
import unittest, rdpy.tests.network.type, rdpy.tests.network.const, rdpy.tests.network.layer
|
import unittest, rdpy.tests.network.type, rdpy.tests.network.const, rdpy.tests.network.layer
|
||||||
|
|
||||||
def headerTest(name):
|
def headerTest(name):
|
||||||
5
rdpy/examples/vncclient.py → bin/rdpy-vncclient
Normal file → Executable file
5
rdpy/examples/vncclient.py → bin/rdpy-vncclient
Normal file → Executable file
@@ -1,3 +1,4 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 Sylvain Peyrefitte
|
# Copyright (c) 2014 Sylvain Peyrefitte
|
||||||
#
|
#
|
||||||
@@ -25,10 +26,10 @@ import sys
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
# Change path so we find rdpy
|
# Change path so we find rdpy
|
||||||
sys.path.insert(1, os.path.join(sys.path[0], '../..'))
|
sys.path.insert(1, os.path.join(sys.path[0], '..'))
|
||||||
|
|
||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui
|
||||||
from rdpy.display.qt4 import RFBClientQt
|
from rdpy.ui.qt4 import RFBClientQt
|
||||||
from rdpy.protocol.rfb import rfb
|
from rdpy.protocol.rfb import rfb
|
||||||
|
|
||||||
class RFBClientQtFactory(rfb.ClientFactory):
|
class RFBClientQtFactory(rfb.ClientFactory):
|
||||||
@@ -5,28 +5,32 @@ script_dir = os.path.dirname(os.path.realpath(Dir("#/Sconstruct").abspath))
|
|||||||
build_dir = os.path.join(script_dir, "build")
|
build_dir = os.path.join(script_dir, "build")
|
||||||
src_dir = os.path.join(script_dir, "src")
|
src_dir = os.path.join(script_dir, "src")
|
||||||
sip_dir = os.path.join(script_dir, "sip")
|
sip_dir = os.path.join(script_dir, "sip")
|
||||||
#generate install dir
|
|
||||||
install_dir = os.path.join(script_dir, "..", "rdpy", "fast")
|
|
||||||
|
|
||||||
def build_sip(target, source, env):
|
def build_sip(target, source, env):
|
||||||
# Get the SIP configuration information.
|
# Get the SIP configuration information.
|
||||||
config = sipconfig.Configuration()
|
config = sipconfig.Configuration()
|
||||||
|
|
||||||
# Run SIP to generate the code.
|
# Run SIP to generate the code.
|
||||||
os.system(" ".join([config.sip_bin, "-c", "src", str(source[0])]))
|
os.system(" ".join([config.sip_bin, "-c", os.path.dirname(str(target[0])), str(source[0])]))
|
||||||
|
|
||||||
|
def build_module(name, install_dir, env):
|
||||||
|
targetName = os.path.join(build_dir, name, "%s.so"%name)
|
||||||
|
|
||||||
|
sources = [Glob(os.path.join(src_dir, name,'*.c')), os.path.join(build_dir, name, "sip%scmodule.c"%name)]
|
||||||
|
|
||||||
|
env.Sip(os.path.join(build_dir, name, "sip%scmodule.c"%name), os.path.join(sip_dir, "%s.sip"%name))
|
||||||
|
|
||||||
|
#sources.append(sip)
|
||||||
|
lib = env.SharedLibrary(target = targetName, source = sources, SHLIBPREFIX='')
|
||||||
|
|
||||||
|
env.Install(install_dir, lib)
|
||||||
|
env.Alias("install", install_dir)
|
||||||
|
|
||||||
|
|
||||||
#building library
|
#building library
|
||||||
env = Environment()
|
env = Environment()
|
||||||
env.Append(BUILDERS = {'Sip' : Builder(action = build_sip)})
|
env.Append(BUILDERS = {'Sip' : Builder(action = build_sip)})
|
||||||
env.Append(CPPPATH = ["/usr/include/python2.7"]);
|
env.Append(CPPPATH = ["/usr/include/python2.7"]);
|
||||||
env.VariantDir('build', 'src', duplicate=0)
|
env.VariantDir('build', 'src', duplicate=0)
|
||||||
|
build_module("rle", os.path.join(script_dir, "..", "rdpy", "ui"), env)
|
||||||
|
|
||||||
targetName = os.path.join(build_dir, "rle.so")
|
|
||||||
|
|
||||||
sources = [Glob(os.path.join(build_dir, '*.c')), os.path.join(build_dir, "siprlecmodule.c")]
|
|
||||||
|
|
||||||
sip = env.Sip([os.path.join(src_dir, "sipAPIrle.h"), os.path.join(src_dir, "siprlecmodule.c")], [os.path.join(sip_dir, "rle.sip")])
|
|
||||||
|
|
||||||
lib = env.SharedLibrary(target = targetName, source = sources, SHLIBPREFIX='')
|
|
||||||
|
|
||||||
env.Requires(lib, sip)
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
%Module(name=rle, language="C")
|
%Module(name=rle, language="C")
|
||||||
|
|
||||||
%UnitCode
|
%UnitCode
|
||||||
#include "rle.h"
|
#include "../../src/rle/rle.h"
|
||||||
%End
|
%End
|
||||||
|
|
||||||
int rle_decode_uint8(void* output, int width, int height, char* input, int size);
|
int rle_decode_uint8(void* output, int width, int height, char* input, int size);
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ class ServerFactory(protocol.Factory):
|
|||||||
'''
|
'''
|
||||||
def __init__(self, privateKeyFileName, certificateFileName):
|
def __init__(self, privateKeyFileName, certificateFileName):
|
||||||
'''
|
'''
|
||||||
ctor
|
|
||||||
@param privateKeyFileName: file contain server private key
|
@param privateKeyFileName: file contain server private key
|
||||||
@param certficiateFileName: file that contain publi key
|
@param certficiateFileName: file that contain publi key
|
||||||
'''
|
'''
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ QRemoteDesktop is a widget use for render in rdpy
|
|||||||
from PyQt4 import QtGui, QtCore
|
from PyQt4 import QtGui, QtCore
|
||||||
from rdpy.protocol.rfb.rfb import RFBClientObserver
|
from rdpy.protocol.rfb.rfb import RFBClientObserver
|
||||||
from rdpy.protocol.rdp.rdp import RDPClientObserver
|
from rdpy.protocol.rdp.rdp import RDPClientObserver
|
||||||
import rdpy.fast.rle as rle
|
import rle
|
||||||
|
|
||||||
|
|
||||||
class QAdaptor(object):
|
class QAdaptor(object):
|
||||||
Reference in New Issue
Block a user