MT: Replace a semicolon (;) with a greek question mark (;) in your friend's C# code and watch them pull their hair out over the syntax error— Peter Ritchie (@peterritchie) November 16, 2014
chaos is a pastejacking tool for GNU/Linux which modifies text copied to the operating system clipboard. The idea is to replace the ASCII character semicolon (;) with an identical looking Unicode character Greek question mark (;) as soon as any text is copied to the clipboard, so that when a user tries to compile some copied code, their life becomes harder.
Click here for a small demo showing what happens when chaos is running in the background.
Warning - Please read before proceeding
Running chaos is a potentially destructive action, and it can cause irreversible damage when important text (say a password, or a cryptographic key) is copied to clipboard without any visible indication that the text was modified.
I wrote it as a proof-of-concept tool to show how easy it is for a rogue program to manipulate your system clipboard (after reading about a malicious clipboard hijacker discovered in PyPI), as well as a tool which can be used to play practical jokes on people, if that's your thing.
As the name signifies, it is an agent of chaos. Please use it judiciously, if you decide to do so.
Download the pre-built binary
Download the latest release from the releases page and unarchive it. No further installation is required.
Build from source
Before building, make sure the following software is installed and added to the
To build chaos from source, execute the Bash script
build.sh with necessary privileges-
Note that this will remove all the source code as well, so if you are working on the code, you might want to modify the build script (see the comments inside the script).
chaos runs in the background as a Unix-style deamon process, and does not require any superuser privileges. To run it, execute the binary
chaosd present inside the directory
To stop it, kill the daemon-
kill $(cat $(echo /tmp/chaos-$(id -u).pid))
An optional configuration file
daemon.json can be placed inside a parallel directory
config/ before starting the daemon to control its behaviour. Following options are currently supported-
||Only plaintext is modified, and all formatted text is ignored|
||Cut/copy events will be ignored entirely with a probability of 0.5|
||Random instances of target character (;) will be modified throughout the copied text. This flag can be set if and only if
If no configuration file is provided, every flag is assumed to be unset.
This tool could be used as a general purpose pastejacker by setting
chaosd.pyas required (see the comments) and rebuilding the binary. This might be generalized in a future release.
The only platform currently supported is GNU/Linux. macOS support won't be particularly useful due to this limitation, but Windows and BSD support are in the pipeline.
There is no logging of any kind at the moment. This might change in the future. Remember, this is the first release and a lot can be added. If you wish to ask/discuss anything, hop on to the Gitter room. Any contributions are welcome.
This project is partially inspired by Greg Toombs' mimic. Check that out for even more fun.