Giter VIP home page Giter VIP logo

node-kakao's Introduction

NodeKakao - KakaoTalk PC implemention(Loco protocol wrapper)

Note: this implemention is very unstable and can stop working anytime.

Warning

There are many security issue to use for production (I expect noone would use this anyway :P).
IV randomzing and many functions that I may not know are disabled or tricked to keep this client simple.

Unknown parts

How to generate X-VC field. (seems like using user-agent, email, device-uuid)
How to generate device_uuid by using device ids?

Since X-VC value is related to security.
You need to extract it somehow.

Example code

let client = new TalkClient('TEST_CLIENT');

client.on('message', (chat: Chat) => {
    if (chat instanceof SharpSearchChat) {
        let attachment = chat.AttachmentList[0] as SharpAttachment;

        chat.replyText(`${chat.Sender.UserInfo.Nickname}님이 샵 검색 전송 ${attachment.Question}. 리다이렉트 경로: ${attachment.RedirectURL}`);
    }

    if (chat.Text === '안녕하세요') {
        chat.replyText('안녕하세요');
    }
});

client.on('user_join', (channel: ChatChannel, user: ChatUser, joinMessage: string) => {
    console.log(user.UserInfo.Nickname + ' 님이 ' + channel.ChannelId + ' 방에 참여했습니다. 참가메세지: ' + joinMessage);
});

client.on('user_left', (channel: ChatChannel, user: ChatUser) => {
    console.log(user.UserInfo.Nickname + ' 님이 ' + channel.ChannelId + ' 방에서 나갔습니다.');
});

client.on('join_channel', (channel: ChatChannel) => {
    console.log('클라이언트가 ' + channel.ChannelId + ' 방에 참여했습니다');
});

client.on('left_channel', (channel: ChatChannel) => {
    console.log('클라이언트가 ' + channel.ChannelId + ' 방에서 나갔습니다');
});

client.on('message_read', (channel: ChatChannel, reader: ChatUser, watermark: Long) => {
    console.log(reader.UserInfo.Nickname + ' 이 ' + channel.ChannelId + ' 방의 글을 읽었습니다. 워터마크: ' + watermark);
});

await client.login('[email protected]', '123456' /* nice password k*/, 'random base64 device id', 'xvc value');
// test device id cmFuZG9tIGJhc2U2NCBkZXZpY2UgaWQ=

node-kakao's People

Contributors

gridroot avatar storycraft avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.