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
puts "Please input the alpha characters to remove: " #Simply asking for input of letters to remove. | |
removals = gets.split('') #Gets the alpha characters, without any seperation, and splits them into an array. | |
#removals.pop #Input takes RETURN as character in array, pops off the stack. | |
puts removals #Showing nothing unusual. | |
puts "Please enter something to remove alpha character from: " #Asking for sentance 'block' of text to de alpha characterize. | |
block = gets #Block = Input | |
mutated = block.tr(removals.to_s, "") #Holding it after the array converted to a string, and replaced in block text. | |
puts mutated #Show me the money | |
finale = (block.split('') - mutated.split('')) #Compares the entered block, and the mutated block. | |
finale.delete(" ") #Delete spaces from array so we can have it nice and neat. |
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
require 'openssl' | |
require 'digest/sha2' | |
# This encryption/decryption routine is borrowed from someplace online, I will annotate where later, but the basis of the encryption/decryption is typical openssl useage in Ruby from what I can gather. | |
payload = "puts 'Plans for Blofelds newest Doomsday Device. This is top secret!'"# 99,9% of the text is in tact a stray " ' " was causing me issue, so I removed it, and the puts is obviously for testing execution. This was left in tact to aid in verifying where the encryption/decryption routine was from. | |
sha256 = Digest::SHA2.new(256) | |
aes = OpenSSL::Cipher.new("AES-256-CFB") | |
key = sha256.digest("15") #Set this to be something simple and so it could overshoot to prove it was not just sequential. | |
#IV Was left out as this is just to prove the feasability. In actuality it could be randomized as much as wanted. | |
aes.encrypt | |
aes.key = key |