* older IIS allowed you to encode multiple times. Expose the ability to encode as many times as you wish. 1 is default

git-svn-id: file:///home/svn/framework3/trunk@4867 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
bmc 2007-05-04 15:17:25 +00:00
parent 135e426d60
commit 21e37f1b0c
1 changed files with 12 additions and 2 deletions

View File

@ -31,6 +31,7 @@ class Client
# Evasion options
#
'uri_encode_mode' => 'hex-normal', # hex-all, hex-random, u-normal, u-random, u-all
'url_encode_count' => 1, # integer
'uri_full_url' => false, # bool
'pad_method_uri_count' => 1, # integer
'pad_uri_version_count' => 1, # integer
@ -60,6 +61,7 @@ class Client
# This is not used right now...
self.config_types = {
'uri_encode_mode' => ['hex-normal', 'hex-all', 'hex-random', 'u-normal', 'u-random', 'u-all'],
'uri_encode_count' => 'integer',
'uri_full_url' => 'bool',
'pad_method_uri_count' => 'integer',
'pad_uri_version_count' => 'integer',
@ -409,14 +411,22 @@ class Client
# Return the encoded URI
# ['none','hex-normal', 'hex-all', 'u-normal', 'u-all']
def set_encode_uri(uri)
Rex::Text.uri_encode(uri, self.config['uri_encode_mode'])
a = uri
self.config['uri_encode_count'].times {
a = Rex::Text.uri_encode(a, self.config['uri_encode_mode'])
}
return a
end
#
# Return the encoded query string
#
def set_encode_qs(qs)
Rex::Text.uri_encode(uri, self.config['uri_encode_mode'])
a = qs
self.config['uri_encode_count'].times {
a = Rex::Text.uri_encode(a, self.config['uri_encode_mode'])
}
return a
end
#