Skip to content

Instantly share code, notes, and snippets.

@dedy-purwanto
Created December 22, 2011 12:44
Show Gist options
  • Star 36 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save dedy-purwanto/1510198 to your computer and use it in GitHub Desktop.
Save dedy-purwanto/1510198 to your computer and use it in GitHub Desktop.
BOT for 10fastfingers, automatic typing with adjustable speed
/*
* BOT for 10fastfingers, automatic typing with adjustable speed
* ================================================================
*
* bored in my apartment and decided to hack this game: http://indonesian-speedtest.10fastfingers.com/
* just start the game, when you're ready to type, DON'T TYPE ANYTHING, open up
* your Developer Tools in Chrome (CTRL+SHIFT+J) and click Console tab, and
* then paste the whole code below, then press enter, and enjoy the show.
*
* twitter.com/kecebongsoft
*/
var word_idx = 0;
var interval_per_word = 250; // in milliseconds
function hackit(){
if(word_idx<words.length){
$('#inputfield').val(words[word_idx] + ' ');
var keyup = jQuery.Event('keyup');
keyup.which = 32;
$('#inputfield').trigger(keyup);
word_idx++;
setTimeout('hackit()', interval_per_word);
}
}
setTimeout('hackit()', interval_per_word);
@fgtyugjt
Copy link

I would love to eat a mac book

@ChazWenham
Copy link

this makes you get 99wpm so you don't have to do the anticheat test

var word_idx = 0;
var interval_per_word = 620; // in milliseconds
function hackit(){
//if(word_idx<words.length){
if(word_idx < 140){
$('#inputfield').val(words[word_idx] + ' ');
var keyup = jQuery.Event('keyup');
keyup.which = 32;
$('#inputfield').trigger(keyup);
word_idx++;
setTimeout('hackit()', interval_per_word);
}
}
setTimeout('hackit()', interval_per_word);

@ChazWenham
Copy link

or adjust it from 620 to 650

@Whitewolf4256
Copy link

Can we get one for writeforme.org?

@ExplosiveFella
Copy link

Can somebody make a version so that the correct words/letters are inputted when I type any key?

@eboyprod7
Copy link

var word_idx = 0;
var interval_per_word = 100; // in milliseconds
function hackit(){
//if(word_idx<words.length){
if(word_idx < 50){
$('#inputfield').val(words[word_idx] + ' ');
var keyup = jQuery.Event('keyup');
keyup.which = 32;
$('#inputfield').trigger(keyup);
word_idx++;
setTimeout('hackit()', interval_per_word);
}
}
setTimeout('hackit()', interval_per_word);

That one better

@Cyberspy
Copy link

Beyond just an exercise in programming, what is the point in this?
Why do any of you need fake typing speed stats?

@johnolek
Copy link

johnolek commented Jun 8, 2018

I think it's just fun to write these kinds of things.

I made a version that tries to match a targetWpm value. It's pretty verbose because I like it that way.

class TenFastCheater {
  constructor() {
    const spaceEvent = $.Event('keyup')
    spaceEvent.which = 32
    this.spaceEvent = spaceEvent

    this.adjustmentStep = 50
    this.minDelay = 50
    this.randomRange = 10
    this.targetWpm = 157
    this.charactersTyped = 0
    this.startTime = 0

    this.delay = 1 / (this.targetWpm / 60) * 1000
  }

  static currentWordSelector() {
    return 'span.highlight'
  }

  static inputSelector() {
    return '#inputfield'
  }

  static timerSelector() {
    return '#timer'
  }

  currentWord() {
    return $(this.constructor.currentWordSelector()).text()
  }

  currentWordExists() {
    const word = $(this.constructor.currentWordSelector())
    return word.text() !== "" && word.is(':visible')
  }

  pressSpace() {
    $(this.constructor.inputSelector()).trigger(this.spaceEvent);
  }

  typeWord(word) {
    $(this.constructor.inputSelector()).val(word)
    this.pressSpace()
    // Plus one for the space
    this.charactersTyped += word.length + 1
  }

  typeCurrentWord() {
    this.typeWord(this.currentWord())
  }

  nextTimeout() {
    const randomDelay = (Math.random() * this.randomRange * 2) - this.randomRange
    return this.delay + randomDelay
  }

  currentEstimatedWpm() {
    if (this.secondsElapsed() <= 5) {
      return 0;
    }

    return (60 / (this.secondsElapsed()) * this.charactersTyped) / 5
  }

  secondsElapsed() {
    return ((new Date).getTime() - this.startTime) / 1000
  }

  adjustDelay() {
    if (this.currentEstimatedWpm() == 0) {
      return
    }

    const change = this.adjustmentStep

    if (this.currentEstimatedWpm() > this.targetWpm) {
      this.delay += change
    } else if (this.delay - change >= this.minDelay ) {
      this.delay -= change
    }
  }

  cheat() {
    if (this.startTime == 0) {
      this.startTime = (new Date).getTime()
    }
    this.typeCurrentWord()
    if (!this.currentWordExists()) {
      this.reset()
      return
    }
    this.adjustDelay()
    const nextTimeout = this.nextTimeout()
    setTimeout(this.cheat.bind(this), nextTimeout)
  }

  reset() {
    this.startTime = 0
    this.charactersTyped = 0
  }
}

const cheater = new TenFastCheater
cheater.cheat()

@pzychob1tch26
Copy link

is there any cheat for typingtest.com?I am trying to apply for this transcribing job but cant pass the stupid typing test ,it requires 60 wpm at %90 accuracy

Copy link

ghost commented Sep 26, 2018

Is it possible to write some code so that "red highlighting" of code is turned off at 10fastfingers.com http://j.mp/2b5LU9Z ?

nice ip logger man

@awcurlette
Copy link

var word_idx = 0;
var interval_per_word = 150; // in milliseconds
function hackit(){
if(word_idx<words.length){
$('#inputfield').val(words[word_idx] + ' ');
var keyup = jQuery.Event('keyup');
keyup.which = 32;
$('#inputfield').trigger(keyup);
word_idx++;
setTimeout('hackit()', interval_per_word);
}
}
setTimeout('hackit()', interval_per_word);

@buzamahmooza
Copy link

Hello all,

  • First of all nice script, I made one where it enters the value but then I had to press space bar for it to go to the next word, so I used AutoHotkey.
  • Anyway, to the main point: I'm trying to make a script that runs for the anticheat page as well, we can use an OCR script to convert the image to text, and then type it (ocrad.js is one example).
    The problem here is that the website gives you a different image every time you request the img.src.
    I'm trying to get around this by capturing the image data using a canvas element, so far I'm having no luck, any ideas?
imageCanvas = (function getSafeImage() {
     const canvas = document.createElement('canvas');
     canvas.getContext('2d').drawImage(img, 0, 0);
     return canvas;
})()

@ErickCHIN000
Copy link

Nobody has anything on typing.com?

@zarelengeh
Copy link

zarelengeh commented Apr 5, 2020

hi,
this code not working in website: typeiran.com/speed
pls seen & hlp me.

@hackerzac
Copy link

yo anybody got any codes for 10fastfinger.com so that i dont get anticheat notifaction
is you do that would be great

follow me on instagram
@itzjust_memes06

@hachiko008
Copy link

hachiko008 commented Jul 20, 2020

can someone make like this to typingsensei.com?

@junior874
Copy link

Can someone make one for nitro type

@tewedaj
Copy link

tewedaj commented Oct 29, 2020

if you are having trouble with the anti cheat you can check this out https://github.com/tewedaj/10fastfingerscheater
you can pass the anti cheat no cap

@tewedaj
Copy link

tewedaj commented Oct 29, 2020

http://10fastfingers.com/anticheat/generate_word_picture Does anyone know where the source code for the picture generator would be from? We could probably crack the anti-cheat engine if we do.

https://github.com/tewedaj/10fastfingerscheater it can be cracked here :)

@DNew2757
Copy link

explain how i can do this on Nitro Type

@tewedaj
Copy link

tewedaj commented Oct 30, 2020

Nitro type is a bit complicated i don't think it can be done from the console like this... since there is no input filed i think the website just checks if a key is pressed and then it checks it with the word list and you can't really use js to press keys you can only check for them.. am not 100% sure tho but it can be done with selenium and some cool python

@Niklas-afk
Copy link

Can someone make a hack for https://at4.typewriter.at/index.php pleas

@ICoDeFoRfReE
Copy link

i will soon be developing a code where you can pass the test for your typing speed verification on 10 fast fingers

@ternakkoding
Copy link

it worked. but the final result does not appear on the dashboard

@Ryany2
Copy link

Ryany2 commented Oct 22, 2021

Do you paste this in the inspect spot?

@JZ1324
Copy link

JZ1324 commented Nov 20, 2021

Is it possible to make one for typing club (Ed club)?

@JZ1324
Copy link

JZ1324 commented Nov 20, 2021

The web is this w

@JZ1324
Copy link

JZ1324 commented Nov 20, 2021

@Davidnemeth1500
Copy link

It very good thank you! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment