djtech42 / YikYakTerminal

Python implementation of Yik Yak using the pyak API by joseph346. Read, post, upvote, and downvote yaks.
GNU General Public License v2.0
73 stars 36 forks source link

YikYak update #5

Closed doombass closed 10 years ago

doombass commented 10 years ago

with the new update whenever I run the application and attempt to read local Yaks it requests that I update my YikYak app. What can be done about this? Any response is helpful as im trying to clear up some yikyak issues in the community. Thanks.

warrenatfsu commented 10 years ago

I have the same problem, but even if you trick YY to think you're an update client there are still no Yaks coming in.

doombass commented 10 years ago

any ideas you're thinking of trying?

On Wed, Oct 29, 2014 at 3:08 PM, warrenatfsu notifications@github.com wrote:

I have the same problem, but even if you trick YY to think you're an update client there are still no Yaks coming in.

— Reply to this email directly or view it on GitHub https://github.com/djtech42/YikYakTerminal/issues/5#issuecomment-60985631 .

djtech42 commented 10 years ago

It's using a new userID format. I will have to modify the code to generate valid IDs. User IDs that are already in use will still work, but new ones won't.

In the meantime, here's an old valid ID I was using if you want to test things out: B6C52E0EA41CBD9D4A1FA7D65C60AA4D

I think there is one yak on there from testing out the app. Just use the I command to switch to the ID

doombass commented 10 years ago

Good to hear. I suppose that means no more unlimited voting? Good work on the whole thing btw.

Sent from my iPhone

On Oct 29, 2014, at 15:30, Dan Turner notifications@github.com wrote:

It's using a new userID format. I will have to modify the code to generate valid IDs. User IDs that are already in use will still work, but new ones won't.

— Reply to this email directly or view it on GitHub.

djtech42 commented 10 years ago

Thanks! I'm not completely sure how the new userIDs are implemented on their server, so it may still be possible to create unlimited IDs for voting.

If they are recording the IP address, then they could potentially make it so you can only create one ID, but that would reduce the anonymity of the app.

bored-engineer commented 10 years ago

Can confirm that the old valid ID is working well.

ryhanson commented 10 years ago

Fired up the app on my phone and sniffed the requests to the YikYak API to see what format the userID is when it is being registered. It appeared to be an uppercase UUID, which can be easily generated with Python by importing the uuid library: import uuid

I have successfully generated and registered accounts with the following piece of code for my userID: userID = str(uuid.uuid4()).upper()

So yes, you can unlimited upvote again. If you all are crafty enough with Python you could modify his code and create a new command to upvote or downvote a Yak as many times as you want, by registering a new account before each upvote. I may or may not have experimented with this ;)

djtech42 commented 10 years ago

Thanks for figuring that out! I pushed the new change.

djtech42 commented 10 years ago

Reading yaks works, but nothing else seems to be working with the new IDs.

ryhanson commented 10 years ago

The other change I made was change the params in the register call in the API.py file to use userLat and userLong instead of lat and long

I did notice that Posting a Yak doesn't seem to work as expected although it gives a success response. I have a feeling its posting it somewhere, just under a different location or something.

djtech42 commented 10 years ago

User yaks isn't showing anything that I posted, even with the changed parameters.

An upvote on a yak finally showed up for me, but it wasn't showing before.

ryhanson commented 10 years ago

Yeah I just tested that too and it doesn't seem to be posting at all. Might have to do some research into that call to see what else has changed.

bored-engineer commented 10 years ago

I just took a look at requests from my phone. Looks like the User-Agent is different, as well as version isn't sent along with every request anymore. I'm going to remove those locally and see if that fixes it.

bored-engineer commented 10 years ago

Posting yaks now uses userLat and userLong, and there seems to be a cookie with lat and long in it as well.

djtech42 commented 10 years ago

Can you submit a pull request with the changes?

bored-engineer commented 10 years ago

That's my plan, still working out exactly what's changed. I'm also waiting for a new IP since mine seems to have been banned or something similar during testing.

It looks the module must actually maintain a cookie jar between requests now, so that may be a change you should make since I'm not sure how exactly you want to structure that. Each Yakker instance should have it's own cookie jar used with every request.

I'll submit a request for the API changes I know about so far at some point today when I have a minute. Began work as pull request #7