Skip to content

Instantly share code, notes, and snippets.

@yaasita
Last active December 23, 2015 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yaasita/6662592 to your computer and use it in GitHub Desktop.
Save yaasita/6662592 to your computer and use it in GitHub Desktop.
Cookie Clicker
#!/usr/bin/env ruby
# coding: utf-8
require 'pp'
require 'base64'
line = gets
line.chomp!
line.gsub!(/%21.+$/,"")
puts "=== cut ====="
puts line
puts "=== decode =="
puts decode=Base64.decode64(line)
puts "=== plus ===="
#puts decode.gsub!(/^(?<=[\d\.]+\|\|)./,"hoge")
puts decode.gsub!(/^([\d\.]+\|\|\d+\|\d+\|)(\d+)/,'\128422339998792712179434250932')
puts "=== encode =="
puts Base64.encode64(decode).gsub(/[\r\n]/,"") + "%21END%21"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment