mirror of https://github.com/n1nj4sec/pupy.git
Use config from pupysrv if possible
This commit is contained in:
parent
4db302b048
commit
3df62c7fa5
|
@ -66,7 +66,7 @@ class Screenshoter(PupyModule):
|
||||||
'({}x{})'.format(screen['top'], screen['left'])))
|
'({}x{})'.format(screen['top'], screen['left'])))
|
||||||
return
|
return
|
||||||
|
|
||||||
config = PupyConfig()
|
config = self.client.pupsrv.config or PupyConfig()
|
||||||
folder = config.get_folder('screenshots', {'%c': self.client.short_name()})
|
folder = config.get_folder('screenshots', {'%c': self.client.short_name()})
|
||||||
|
|
||||||
screenshots, error = rscreenshot.screenshot(args.screen)
|
screenshots, error = rscreenshot.screenshot(args.screen)
|
||||||
|
@ -74,7 +74,7 @@ class Screenshoter(PupyModule):
|
||||||
self.error(error)
|
self.error(error)
|
||||||
else:
|
else:
|
||||||
self.success('number of monitor detected: %s' % str(len(screenshots)))
|
self.success('number of monitor detected: %s' % str(len(screenshots)))
|
||||||
|
|
||||||
for i, screenshot in enumerate(screenshots):
|
for i, screenshot in enumerate(screenshots):
|
||||||
filepath = path.join(folder, str(datetime.datetime.now()).replace(" ","_").replace(":","-")+'-'+str(i)+".png")
|
filepath = path.join(folder, str(datetime.datetime.now()).replace(" ","_").replace(":","-")+'-'+str(i)+".png")
|
||||||
with open(filepath, 'w') as out:
|
with open(filepath, 'w') as out:
|
||||||
|
|
Loading…
Reference in New Issue