Git Product home page Git Product logo

tweetsec-ruby's Introduction

TweetSec

My solution to the TweetSec challenge https://gist.github.com/patbenatar/069e46e6a34d65f35108

Intro

Our newest client, TweetSec Ltd., has developed a proprietary method for evaluating password strength. As part of a marketing initiative they'd like us to develop a Twitter bot that will apply the algorithm to any message it receives, and reply with the result.

Enter @YouShallNotPassword

Our product is a Twitter bot written in your technology of choice. It should:

  • Capture tweets sent to its account
  • Evaluate the 'password strength' of each message
  • Post a reply tweet with the result

The TweetSec Password Strength Evaluator

TweetSec's patented password strength evaluation algorithm consists of three steps. Beginning with the text of the tweet, we must:

  1. Replace any complete English words in the text with any lower-case letter, preferring longer replacements. For example, given 12password34 we should replace the full word 'password' rather than replacing 'pass' or 'sword'.
  2. Find the number of 'character types' represented in the updated text. Character types include:
  • alphabet (A-Z, a-z)
  • digits (0-9)
  • whitespace (spaces, tabs, newline characters)
  • other (punctuation, unicode characters, etc.)
  1. Multiply the number of represented character types by the length of the updated text to arrive at a numerical 'strength' value.

For example, here are some passwords and their strength rating:

  • password1 --> 4
  • goat m4n --> 15
  • s0_0per 5n4k3 --> 44

Responses

Based on the strength rating of a password, it should be placed into one of three categories:

  • Strong - for strength >= 50
  • Weak - for strength > 10 and strength < 50
  • Unacceptable - for strength =< 10

Strong passwords should receive a congratulatory tweet in response.

Weak passwords should receive a modified version of the original tweet which has been strengthened enough to qualify as strong. The modified version should be no longer than the original, unless it must be lengthened to qualify as strong.

Unacceptable passwords should receive a response suggesting that the sender try again with a better password.

The icebox

While not a requirement at this stage, TweetSec is interested in maintaining the memorability of passwords for their potential clients. If you find yourself with extra time, consider optimizing the way passwords are strengthened to prefer changes that maintain the essence of the original password (for example, foo might become f00 rather than f^o or 6oo).


Deliverables

  • A Github repository containing all code/documentation for the app

Guidelines

  • Feel free to develop any type of app. A command-line script and a Rails app are both perfectly acceptable, business logic is the priority.
  • Leave a detailed commit history -- no need to write novel-length commit messages, but be descriptive enough that we can follow your progress.
  • We hope this will take 2-4 hours to complete. If you hit 5 hours, stop and push what you have. If you finish much earlier you can try the non-required features above, but keep in mind the client will want to see completed functionality.

tweetsec-ruby's People

Contributors

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