Skip to content

Instantly share code, notes, and snippets.

@Green-m
Created June 26, 2019 07:26
Show Gist options
  • Save Green-m/d7a38c13ad9f2a78d0df3c120d291ac4 to your computer and use it in GitHub Desktop.
Save Green-m/d7a38c13ad9f2a78d0df3c120d291ac4 to your computer and use it in GitHub Desktop.
enum php web magic chars
list = ("a".."z").to_a + ("A".."Z").to_a
chars = "'!@#$%&*()+{}|:\">?<[]\\\';,.`~',"
def xor(a, b)
(a.ord ^ b.ord).chr
end
list.each do |l|
chars.chars.each do |i|
chars.chars.each do |j|
if xor(i, j) == l
puts "#{l} == #{i} ^ #{j}"
break
#else
#puts "#{l}(#{l.ord}) not found"
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment