Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Fasttyper is minimalistic typing test based on user provided exercising text. It supports both reading from text files and stdin supporting wide range of usecases. The goal was to create it as simple as it can be, without any additional bloatware functionalities. That means that Fasttyper doesn't come with build in test generator and you have to provide your own scripts generating tests. Some examples of such scripts are provided in Usage section.
Fasttyper is currently maintained on PyPi Python Package Index. To install package simply use:
python3 -m pip install fasttyper
With installation of fasttyper you should have new executable - fasttyper
. It takes two optional positional arguments, amount of words and language (like in Monkeytype's: english, english_1k etc). Default amount of words is 25 and language is english. To run fasttyper simply call:
fasttyper
from command line. There are some available options:
usage: fasttyper [-h] [--config FILE] [--unclutter-backspace] [--no-cursor] [amount] [language]
positional arguments:
amount Amount of words
language Language
options:
-h, --help show this help message and exit
--config FILE, -c FILE
configuration file
--unclutter-backspace, -b
unclutter backspace, when it raises ctrl+backspace instead
--no-cursor, -n disable cursors
I personally use alias:
alias ff='fasttyper -n`
because i don't like having cursor and i am too lazy to type fasttyper so i just type ff :)
To abandon test and start brand new one, press TAB.
To kill application (exit) press CTRL+C.
Default configuration:
{
"user_input_valid_color": 3,
"user_input_invalid_color": 2,
"reference_text_color": 9,
"stats_template": "wpm: {stats.wpm:0.2f}, time: {stats.total_seconds:0.2f}s",
"stats_color": 5,
"stats_position": "top",
"summary_datafile": "~/.cache/fasttyper/datafile.csv",
"top_margin_percentage": 40,
"left_margin_percentage": 35,
"min_width": 80,
"lines_on_screen": 3,
"border": 1,
"logo": " ~ FastTyper ~ ",
"logo_color": 8,
"resume_text": " press <Tab> to continue, <Ctrl>C to exit ",
"resume_text_color": 9,
"summary_template": (
"wpm: {wpm:5.1f} | peak: {peak_wpm:5.1f}",
"raw: {raw_wpm:5.1f} | peak: {peak_raw_wpm:5.1f}",
"acc: {accuracy:5.1f}% | words: {correct_words}/{total_words}",
"time: {total_seconds:5.1f}s ",
),
"summary_centered": True,
"summary_color": 9,
"summary_lines": 4,
"summary_border": 0,
"random_capitalization": 0,
"random_punctuation": 0,
"sentence_mode": False,
"punctuation": ",.?!;:",
"sentence_ending": ".?!",
"amount": 25,
"language": "english",
"no_cursor": False,
"unclutter_backspace": False,
}
Fasttyper by default looks for config file in: $HOME/.config/fasttyper/config.json
. You can provide different location for config file with --config
argument, for example: --config=~/.fasttyper.json
. Config has to be a json dict. Available keys:
Also there are keys that override fault parameters for CLI args, like: amount and language will override Your default settings for runner, same goes for punctuation, sentence_mode etc.
Example config file with all default values in available here.
Other example config files:
{"top_margin_percentage": 40, "left_margin_percentage": 25}
{"user_input_valid_color": 5}
Fasttyper is ran as an python module, so to execute it simply type:
python3 -m fasttyper
from cloned github repository, if you didn't install package from TestPyPi.
Fasttyper can open text files, which path should be provided as first and only argument to the module execution, for example:
python3 -m fasttyper example_text.txt
Program also allows user to pipe text into it. Keep in mind, it only supports spaces and new line characters, so you won't be able to table tabs. For example, you can run Fasttyper on fortune generated quote changing tabulators to spaces with sed:
furtune | python3 -m fasttyper
or if you want to randomize words from given file with shuf on for example all dictionaries in system:
shuf -n5 /usr/share/dict/* | python -m fasttyper
You can use another similar projects set of words as well, for example to create test with 20 random words from Monkeytype's english 100 dictionary use:
curl -s https://raw.githubusercontent.com/monkeytypegame/monkeytype/master/frontend/static/languages/english.json | python3 -c "import sys, json; print('\n'.join(json.load(sys.stdin)['words']))" | shuf -n20 | python3 -m fasttyper
To exit you can either finish test, use KeyboardInterrupt
(CTRL+C) or tap tab. After you finish test, there will be summary printed, use enter to exit from it.
Some terminal emulators send different values for key presses of backspace and ctrl+backspace. To fix it, simply add b
flag like that: python3 -m fasttyper -b
.
To hide the cursor, simply add n
flag like that: python3 -m fasttyper -n
.
function ff() {
mkdir -p ~/.cache/fasttyper
local amount="${1:-50}"
local language="${2:-english}"
local sfile=~/.cache/fasttyper/$language
local source_path=https://raw.githubusercontent.com/Miodec/monkeytype/master/static/languages/$language.json
[[ ! -f $sfile ]] && curl -s $source_path | python3 -c "import sys, json; print('\n'.join(json.load(sys.stdin)['words']))" > $sfile
while true
do
shuf -n $amount $sfile | python3 -m fasttyper || break
done
}
ff 50 english_1k
This shell function shuffles N words from cached word list, and if given word list doesn't exist it download's it. It runs in loop, but does exit from it if you exit fasttyper with CTRL+C.
The above script is available for download from doc folder.
FAQs
Minimalistic typing exercise
We found that fasttyper demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.