Coder Social home page Coder Social logo

mimic's Introduction

mimic

[ab]using Unicode to create tragedy

Introduction

monster

mimic provokes:

  • fun
  • frustration
  • curiosity
  • murderous rage

It's inspired by this terrible idea floating around:

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
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

There are many more characters in the Unicode character set that look, to some extent or another, like others - homographs. Mimic substitutes common ASCII characters for obscure homographs.

Fun games to play with mimic:

  • Pipe some source code through and see if you can find all of the problems
  • Pipe someone else's source code through without telling them
  • Be fired, and then killed

Example usage

./mimic --list           # Show all of the homographs
./mimic --explain=o      # What crazy things can we do with this letter?
./mimic --me-harder 100  # Type some lines in and mess with every single char
./mimic --reverse        # Undo the mayhem. Boooring.
cat mimic | ./mimic      # Pipe the source through itself at 1%

# Turn up the knob and save the results
cat mimic | ./mimic --me-harder 25 > mimicked

# Or, if your code acts strange, but you have seen this prank before:
cat mimicked | ./mimic --reverse > unmimicked
diff unmimicked mimic

Results

Observe the mayhem:

some bad code "BUT WHY?"

Or, if you've been mimicked a little harder,

some worse code

See also

[Wikipedia: Unicode Equivalence] (https://en.wikipedia.org/wiki/Unicode_equivalence)

Wikipedia: IDN homograph attack

Online homograph generator

mimic's People

Contributors

reinderien avatar relet avatar ueg1990 avatar lf- avatar arhoads avatar

Watchers

James Cloos avatar Dan Salmon 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.