Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Encryptor:
- #!/usr/bin/ruby
- flag= ???
- str = "0123456789abcdef"
- chr = "!\"#%&()+,-./0123456789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[^_`abcdefghijklmnopqrstuvwxyz~"
- bin = "0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111"
- flags = flag.scan /\w/
- hh=flags.map{|h| h.unpack('H*')}.join()
- a=hh.scan /\w/
- b=a.map{|x|str[bin.index(bin[str.index(x)*5,4].reverse)/5,1]}.join
- c=[]
- for y in 0..(b.length/2)
- c.push(b[y*2,2].hex.chr.encode('utf-8','iso-8859-1'))
- end
- i=chr.length-1
- d=c[0,c.length-1].join()
- f=[]
- e=d.split("").each do |z|
- f.push(chr[rand(0..i),1] + z + chr[rand(0..i),1])
- end
- p f.join()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement