Reduce code complexity easily
parent
f61c1548ee
commit
ae440130f5
|
@ -12,7 +12,12 @@ module Msf::HTTP::Typo3::Login
|
|||
'method' => 'GET',
|
||||
'uri' => typo3_url_login
|
||||
})
|
||||
if res_main and res_main.code == 200
|
||||
|
||||
unless res_main and res_main.code == 200
|
||||
vprint_error('Can not reach login page')
|
||||
return nil
|
||||
end
|
||||
|
||||
e = res_main.body.match(/<input type="hidden" id="rsa_e" name="e" value="(\d+)" \/>/)[1]
|
||||
n = res_main.body.match(/<input type="hidden" id="rsa_n" name="n" value="(\w+)" \/>/)[1]
|
||||
vprint_status("e: #{e}")
|
||||
|
@ -52,10 +57,6 @@ module Msf::HTTP::Typo3::Login
|
|||
return nil
|
||||
end
|
||||
end
|
||||
else
|
||||
vprint_error('Can not reach login page')
|
||||
return nil
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue