Merge pull request #33 from ChrisTruncer/bin_
Small change to reference object attribute
This commit is contained in:
@@ -23,7 +23,9 @@ example of use rdpy
|
|||||||
take screenshot of login page
|
take screenshot of login page
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import sys, os, getopt
|
import getopt
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
from rdpy.protocol.rdp import rdp
|
from rdpy.protocol.rdp import rdp
|
||||||
@@ -35,12 +37,14 @@ from twisted.internet import task
|
|||||||
# set log level
|
# set log level
|
||||||
log._LOG_LEVEL = log.Level.INFO
|
log._LOG_LEVEL = log.Level.INFO
|
||||||
|
|
||||||
|
|
||||||
class RDPScreenShotFactory(rdp.ClientFactory):
|
class RDPScreenShotFactory(rdp.ClientFactory):
|
||||||
"""
|
"""
|
||||||
@summary: Factory for screenshot exemple
|
@summary: Factory for screenshot exemple
|
||||||
"""
|
"""
|
||||||
__INSTANCE__ = 0
|
__INSTANCE__ = 0
|
||||||
__STATE__ = []
|
__STATE__ = []
|
||||||
|
|
||||||
def __init__(self, reactor, app, width, height, path, timeout):
|
def __init__(self, reactor, app, width, height, path, timeout):
|
||||||
"""
|
"""
|
||||||
@param reactor: twisted reactor
|
@param reactor: twisted reactor
|
||||||
@@ -91,7 +95,6 @@ class RDPScreenShotFactory(rdp.ClientFactory):
|
|||||||
self._reactor.stop()
|
self._reactor.stop()
|
||||||
self._app.exit()
|
self._app.exit()
|
||||||
|
|
||||||
|
|
||||||
def buildObserver(self, controller, addr):
|
def buildObserver(self, controller, addr):
|
||||||
"""
|
"""
|
||||||
@summary: build ScreenShot observer
|
@summary: build ScreenShot observer
|
||||||
@@ -153,7 +156,7 @@ class RDPScreenShotFactory(rdp.ClientFactory):
|
|||||||
def checkUpdate(self):
|
def checkUpdate(self):
|
||||||
self._controller.close();
|
self._controller.close();
|
||||||
|
|
||||||
controller.setScreen(width, height);
|
controller.setScreen(self._width, self._height);
|
||||||
controller.setSecurityLevel(self._security)
|
controller.setSecurityLevel(self._security)
|
||||||
return ScreenShotObserver(controller, self._width, self._height, self._path, self._timeout, self._reactor)
|
return ScreenShotObserver(controller, self._width, self._height, self._path, self._timeout, self._reactor)
|
||||||
|
|
||||||
@@ -187,6 +190,7 @@ def main(width, height, path, timeout, hosts):
|
|||||||
app.exec_()
|
app.exec_()
|
||||||
return RDPScreenShotFactory.__STATE__
|
return RDPScreenShotFactory.__STATE__
|
||||||
|
|
||||||
|
|
||||||
def help():
|
def help():
|
||||||
print "Usage: rdpy-rdpscreenshot [options] ip[:port]"
|
print "Usage: rdpy-rdpscreenshot [options] ip[:port]"
|
||||||
print "\t-w: width of screen default value is 1024"
|
print "\t-w: width of screen default value is 1024"
|
||||||
|
|||||||
Reference in New Issue
Block a user