Last active
September 24, 2021 13:45
-
-
Save susemeee/a1d1f8aa463760d723aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import sys | |
try: | |
if sys.argv[1] == "--auth": | |
from lib.pykakao.pykakao import kakaotalk | |
# first time authentication | |
try: | |
email = sys.argv[2] | |
passwd = sys.argv[3] | |
except IndexError: | |
print "--auth [[user_id]] [[user_pw]]" | |
exit(0) | |
#do not change values! | |
computer_name = "test_micro" | |
dev_id = "QUNERTEwMjk=" | |
kk = kakaotalk() | |
if kk.auth(email, passwd, computer_name, dev_id): | |
print kk.session_key | |
print kk.user_id | |
else: | |
print "auth failed" | |
exit(0) | |
except Exception: | |
pass | |
if __name__ == "__main__": | |
from lib.logger import Logger | |
from lib.sockets import Sockets | |
Logger.init(Sockets.starttime()) | |
Sockets.start(ensure_outgoing=False, profiling=profile) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment