Skip to content

Instantly share code, notes, and snippets.

@brixen
Created April 27, 2010 07:15
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 brixen/380451 to your computer and use it in GitHub Desktop.
Save brixen/380451 to your computer and use it in GitHub Desktop.
$ ruby1.8.7 xss.rb
KCODE: NONE
1
KCODE: UTF8
1
$ bin/rbx xss.rb
KCODE: NONE
1
KCODE: UTF8
nil
str = "\xF6<script>"
$KCODE = ''
puts "KCODE: " + $KCODE
p(str =~ /</)
$KCODE = 'u'
puts "KCODE: " + $KCODE
p(str =~ /</)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment