tomer8007 / kik-bot-api-unofficial

Python API for writing unoffical Kik bots that act like humans
MIT License
127 stars 77 forks source link

Support for camera images #130

Open joa77 opened 5 years ago

joa77 commented 5 years ago

I love to see, that sending images is now supported. Will there be a way of sending images as camera images?

tomer8007 commented 4 years ago

@bluemods If you know exactly how to get it right you are more than welcome to submit a PR.

MisterWorld commented 4 years ago

@bluemods Your python code is very good. Can you help to solve this problem?

tomer8007 commented 4 years ago

@bluemods The signed, lang, sid, ts, v, cv, conn, dev, n generation code is already here at EstablishAuthenticatedSessionRequest, right?

So all you're saying is we need to replace anon="" with anon="1" and use this code even when self.username is None and self.password is None here?

tomer8007 commented 4 years ago

OK, sounds sensible. Why is the sorting incorrect? Isn't the code at sort_kik_map correct?

Also why leaving the currect state would prevent sending camera images? The authentication stanza is working right now.

tomer8007 commented 4 years ago

I agree we can't send camera images, the question is why would changing the anonymous stanza fix it (did you try it?).

tomer8007 commented 4 years ago

Also the sorting of the map is fine, right?

tomer8007 commented 4 years ago

So finally, what needs to be changed so that com.kik.ext.camera will work?

MisterWorld commented 4 years ago

@tomer8007 Hi! How's this features coming?

joa77 commented 4 years ago

I never had a bot sending me images 😅

Artificiangel commented 4 years ago

A while back I found that those bots already send fake camera images. I also noticed some of them don't, probably different devs.

I don't think they (or most) use this API. They were able to mark your messages as delivered before that feature was added here.

Artificiangel commented 4 years ago

-The dev attribute is your Device ID and is omitted from the auth <k tag

I had been looking at the decompiled source of the Kik apk (v15.21.0.22201) and converting the parts needed for the sorted tag into python. All that works, my code outputs the same tag as the java function, but it doesn't let the app use camera images.

I noticed the Kik code has CAN + deviceId assigned to dev. This appears in both the smali and java versions. I made sure to look at other versions of Kik from multiple sources to make sure.

If I remove CAN from the dev attribute, Kik returns an error telling me to update my client.

I don't understand what's causing that. I am also sending the latest version number and classes dex hash which didn't help.

MisterWorld commented 4 years ago

I have the fix, I could commit it,

@bluemods @bluemods It would be great if you could do it

MisterWorld commented 3 years ago

@tomer8007 @bluemods

Is there any hope for this features?

karate21 commented 3 years ago

@tomer8007 @bluemods @MisterWorld Following up on this. Has there been a solution?