Added LICENSE.md
This commit is contained in:
9
LICENSE.md
Normal file
9
LICENSE.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/*
|
||||||
|
* ------------------------------------------------------------
|
||||||
|
* "THE BEERWARE LICENSE" (Revision 42):
|
||||||
|
* <matias.fernandez@gmail.com> wrote this code.
|
||||||
|
* As long as you retain this notice, you can do whatever you
|
||||||
|
* want with this stuff. If we meet someday, and you think this
|
||||||
|
* stuff is worth it, you can buy me a beer in return.
|
||||||
|
* ------------------------------------------------------------
|
||||||
|
*/
|
||||||
@@ -8,6 +8,7 @@ if sys.platform == "linux" or sys.platform == "linux2":
|
|||||||
# take screen images, that's not the best way, so here
|
# take screen images, that's not the best way, so here
|
||||||
# we use directly use xlib to take the screenshot.
|
# we use directly use xlib to take the screenshot.
|
||||||
class ImageGrab():
|
class ImageGrab():
|
||||||
|
@staticmethod
|
||||||
def grab():
|
def grab():
|
||||||
dsp = display.Display()
|
dsp = display.Display()
|
||||||
root = dsp.screen().root
|
root = dsp.screen().root
|
||||||
@@ -22,6 +23,7 @@ elif sys.platform == "darwin":
|
|||||||
log.debug("ImageGrab: running on darwin")
|
log.debug("ImageGrab: running on darwin")
|
||||||
import Quartz.CoreGraphics as CG
|
import Quartz.CoreGraphics as CG
|
||||||
class ImageGrab():
|
class ImageGrab():
|
||||||
|
@staticmethod
|
||||||
def grab():
|
def grab():
|
||||||
screenshot = CG.CGWindowListCreateImage(CG.CGRectInfinite, CG.kCGWindowListOptionOnScreenOnly, CG.kCGNullWindowID, CG.kCGWindowImageDefault)
|
screenshot = CG.CGWindowListCreateImage(CG.CGRectInfinite, CG.kCGWindowListOptionOnScreenOnly, CG.kCGNullWindowID, CG.kCGWindowImageDefault)
|
||||||
width = CG.CGImageGetWidth(screenshot)
|
width = CG.CGImageGetWidth(screenshot)
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ class VncServer():
|
|||||||
self.depth = depth
|
self.depth = depth
|
||||||
self.bpp = bpp
|
self.bpp = bpp
|
||||||
bigendian = 0
|
bigendian = 0
|
||||||
truecolor = 1
|
self.truecolor = 1
|
||||||
red_maximum = 255
|
red_maximum = 255
|
||||||
self.red_maximum = red_maximum
|
self.red_maximum = red_maximum
|
||||||
green_maximum = 255
|
green_maximum = 255
|
||||||
@@ -233,7 +233,7 @@ class VncServer():
|
|||||||
self.rfb_bitmap = RfbBitmap()
|
self.rfb_bitmap = RfbBitmap()
|
||||||
|
|
||||||
sendbuff = pack("!HH", width, height)
|
sendbuff = pack("!HH", width, height)
|
||||||
sendbuff += pack("!BBBB", bpp, depth, bigendian, truecolor)
|
sendbuff += pack("!BBBB", bpp, depth, bigendian, self.truecolor)
|
||||||
sendbuff += pack("!HHHBBB", red_maximum, green_maximum, blue_maximum, red_shift, green_shift, blue_shift)
|
sendbuff += pack("!HHHBBB", red_maximum, green_maximum, blue_maximum, red_shift, green_shift, blue_shift)
|
||||||
sendbuff += pack("!xxx") # padding
|
sendbuff += pack("!xxx") # padding
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
pydes
|
pydes
|
||||||
pynput
|
pynput
|
||||||
numpy
|
numpy==1.17
|
||||||
Pillow-PIL
|
Pillow-PIL
|
||||||
elevate
|
elevate
|
||||||
|
|||||||
Reference in New Issue
Block a user