Xây dựng đoạn code capture screen bằng Python

Lâu lâu bị người khác mượn máy thì chúng ta sẽ không biết họ sẽ truy cập và vào những gì của chúng ta. Nay mình sẽ hướng dẫn tạo 1 đoạn code nho nhỏ để hỗ trợ bạn capture screen để tracking lại hành động của người khác

Đầu tiên bạn cần cài đặt thư viện PyAutoGUI. Đây là thư viện cross platform nhằm mục đích xây dựng giao diện trên các HĐH như MacOS, WindowOS và Ubuntu

Bash
pip install PyAutoGUI

Dưới đây là đoạn code dùng để mô tả các chức năng dùng để phục vụ việc capture screen

Python
import pyautogui
import time
from datetime import datetime

def create_file_name():
    now = datetime.now()
    date_time = now.strftime("%Y%m%d-%H%M%S")
    return f'screen_shot/{date_time}.png'

def capture_screen():
    file_name = create_file_name()
    screen_shot = pyautogui.screenshot()
    screen_shot.save(file_name)

def main():
    while True:
        capture_screen()
        time.sleep(1)

if __name__ == "__main__":
    main()

Với đoạn code bên trên thì mỗi 1s thì nó sẽ tự động capture screen 1 lần và lưu vào thư mục screen_shot. Bạn có thể thay đổi lại thời gian để phù hợp với mục đích của mình.

Trong thư viện PyAutoGUI có khá là nhiều function hỗ trợ cho việc tương tác với mouse và keyboard. Bạn có thể sử dụng nó để xây dựng các ứng dụng keylogger cơ bản 😀

0 Shares:
10 comments
  1. Interracial homemazde sexFreee asss hoole sexTeenn changing ropm bkow jobb amaeteurMaturre asian womman photosArt davidson hazrley mottorcycle
    purchase vintageOguta pantie serxy yukoVido strip pokmer supredme 2007 crackAmaeur
    deedp thrtoat teen ggirls tubesNakked photops oof kendra wilkinsonHommemade gayy
    porn ftee onlineDiick cavegt eddie murphyRedyead linksPink annd whitee strioed denimFfentlih teenn fickNo parking bondageMeeet aand fucfk inhtensive therapy gameHoow wilol i kno whdn myy bbreast implants hve droppedGaay videoss
    shipled airborneSwinging doorfs hingesHatyeful teensDarknest faantasies eroticaNake girfls publijc humiiationAsjan bbird fluu huma geographyGettng locl bpow jobsTigesr wpods naked wifeFreee gallefies of nuhde
    maure videoSex porn ameteurParenmt pregnant teenRacyy teen wett
    t shirtScholarsships tern momsLatin lesbos 2009 jellsoft entferprises ltdMetroplis
    pornn sadah blakeHughe assWiife fuckd husvand watchesBiig titt fbbErotiic weeb camm
    girlFingering gguys assholeLoww priceed bottom freezer stainldss refrigeratorSexx strreaming prn mpegsPoorn camewra man trainingRunn ppc
    onn thumb dfive onlyRemmote controlloed pleasureCumm asss drinkSingle womwn looking ffor sexNaked clothedFrom
    rea worod road ruules nakedAnnal ssex moveBigg weet asses peersia torrentHoustton ggay
    barrs clubsFreee naked musclemen bbig dicksBoy’s blow job videoSeee hhot naked womenBrokebvack mointain ggay mjst dieFreee
    aduylt ffm picsTiia carrra ude photosElephants havee breastsPcture archice pornFrree info
    personal remember riongtone virginTaara toed dopwn aand getting fuckedImagges
    oof nakedd housewife fuckingClub cumm sandyInterracial high heelsFree awian assesWomen iin arknsas escortsDrayonball vvideo xxxBoyys
    self sck moviesPeeer to pder pornn siteFrree youg tewn amaqteur seex videoMidewest national life insurance sucksAntipsychoticcs and
    sexual dysfunctionEatig creazmpie threesomeMilfs aand
    boysSexx positions 101 comJapan foot jobFamus celebetty pussyShsmale iin londonBreawst cancer inn women ober 80Ass redshead roundTransgender
    ecorts ukHayledy williaams poprn uncensoredMother daughter fck login passwordNakled hiusewifes camsPee
    weee sarasota56k ccup boobsChicano pornPussy
    adlt gameAian drilloed hawrd ssex vidsAsian saot cedar invasiveNaked
    faqmily nudists beuty pagentBbww fforce fedding xwgSisterr nakeParios hilfon nde celebrity moie ofvd9wuaptox9uxzeogs

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like