Last active
February 14, 2016 19:22
-
-
Save celediel/d6e9fe9aebf0eee77d04 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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