Skip to content

Instantly share code, notes, and snippets.

@celediel
Last active February 14, 2016 19:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save celediel/d6e9fe9aebf0eee77d04 to your computer and use it in GitHub Desktop.
Save celediel/d6e9fe9aebf0eee77d04 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# encoding=utf-8
require 'ruby-progressbar'
require 'colorize'
# These are all very annoying.
# rubocop:disable Metrics/LineLength, Metrics/ClassLength, Metrics/CyclomaticComplexity
# rubocop:disable Metrics/MethodLength, Metrics/PerceivedComplexity, Metrics/AbcSize
def main
puts 'Enter site to hack:'
site = gets.chomp
puts "Attempting hack of #{site}!".red.bold
bar = ProgressBar.create title: 'Not Hacked', format: '%t |%B| %p%% Hacked'
sleptime = site == 'google.com' ? 0.5 : 0.1
100.times do
bar.increment
sleep(sleptime)
end
puts "#{site} successfully hacked!".magenta
end
main if __FILE__ == $PROGRAM_NAME
# vim:tabstop=2 softtabstop=2 expandtab shiftwidth=2 smarttab foldmethod=syntax:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment