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
|
||||
"""
|
||||
|
||||
import sys, os, getopt
|
||||
import getopt
|
||||
import os
|
||||
import sys
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from rdpy.protocol.rdp import rdp
|
||||
@@ -35,12 +37,14 @@ from twisted.internet import task
|
||||
# set log level
|
||||
log._LOG_LEVEL = log.Level.INFO
|
||||
|
||||
|
||||
class RDPScreenShotFactory(rdp.ClientFactory):
|
||||
"""
|
||||
@summary: Factory for screenshot exemple
|
||||
"""
|
||||
__INSTANCE__ = 0
|
||||
__STATE__ = []
|
||||
|
||||
def __init__(self, reactor, app, width, height, path, timeout):
|
||||
"""
|
||||
@param reactor: twisted reactor
|
||||
@@ -91,7 +95,6 @@ class RDPScreenShotFactory(rdp.ClientFactory):
|
||||
self._reactor.stop()
|
||||
self._app.exit()
|
||||
|
||||
|
||||
def buildObserver(self, controller, addr):
|
||||
"""
|
||||
@summary: build ScreenShot observer
|
||||
@@ -153,7 +156,7 @@ class RDPScreenShotFactory(rdp.ClientFactory):
|
||||
def checkUpdate(self):
|
||||
self._controller.close();
|
||||
|
||||
controller.setScreen(width, height);
|
||||
controller.setScreen(self._width, self._height);
|
||||
controller.setSecurityLevel(self._security)
|
||||
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_()
|
||||
return RDPScreenShotFactory.__STATE__
|
||||
|
||||
|
||||
def help():
|
||||
print "Usage: rdpy-rdpscreenshot [options] ip[:port]"
|
||||
print "\t-w: width of screen default value is 1024"
|
||||
|
||||
Reference in New Issue
Block a user